----- Forwarded message from Lindsey Smith <[EMAIL PROTECTED]> -----

From: Lindsey Smith <[EMAIL PROTECTED]>
Date: Mon, 20 Aug 2007 13:19:50 -0700
To: Joey Hess <[EMAIL PROTECTED]>
Subject: Re: Re: Bug#436939: OVERRIDE_FROM should override email address

Thanks for patch. I've been swamped with other things, but I'm
starting to get to work on a new rss2email version. Currently I'm
trying to sort out which bugs, patches, etc. to accept, so this one
will definitely get a good looking over.

regards,
Lindsey


On 8/20/07, Joey Hess <[EMAIL PROTECTED]> wrote:
> The forwarded patch adds what I think is a very nice feature, the
> ability to change the from address on a per-feed basis.
>
> The full conversation about this can be found at
> http://bugs.debian.org/436939
>
> I hope that there's a new version of rss2email soon, and that you
> consider including this patch into it.
>
> ----- Forwarded message from Bernhard Kauer <[EMAIL PROTECTED]> -----
>
> From: Bernhard Kauer <[EMAIL PROTECTED]>
> Date: Mon, 20 Aug 2007 19:01:24 +0200
> To: Joey Hess <[EMAIL PROTECTED]>
> Cc: [EMAIL PROTECTED]
> Subject: Re: Bug#436939: OVERRIDE_FROM should override email address
> User-Agent: Mutt/1.5.16 (2007-06-11)
>
> On Thu, Aug 09, 2007 at 08:23:56PM -0700, Joey Hess wrote:
> > Bernhard Kauer wrote:
> > > The ability to override the From: field of the mail via
> > > OVERRIDE_FROM is misleading. It just allows to override
> > > the From: name, but not the email address. The attached
> > > patch correct this. Additionally it is an simpler way
> > > as #349061 proposes to get a mail that is easy filterable
> > > by procmail.
> >
> > Won't changing what OVERRIDE_FROM currently does break existing users of
> > it? Seems that something would need to be done to handle current uses of
> > OVERRIDE_FROM.
>
> Yep, that's a problem. I added yet another config option named OVERRIDE_EMAIL
> instead of reusing the OVERRIDE_FROM one. Should be backward compatible now...
>
>
> Thanks,
>
>         Bernhard
>
> --- rss2email.py.old    2007-08-09 17:24:12.000000000 +0200
> +++ rss2email.py        2007-08-20 18:54:05.000000000 +0200
> @@ -74,6 +74,9 @@
>  # Set this to override From addresses. Keys are feed URLs, values are new 
> titles.
>  OVERRIDE_FROM = {}
>
> +# Set this to override From email addresses. Keys are feed URLs, values are 
> new emails.
> +OVERRIDE_EMAIL = {}
> +
>  # Set this to override the timeout (in seconds) for feed server response
>  FEED_TIMEOUT = 60
>
> @@ -368,11 +371,15 @@
>
>         return name
>
> -def getEmail(feed, entry):
> +def getEmail(r, entry):
>         """Get the best email_address."""
>
>         if FORCE_FROM: return DEFAULT_FROM
>
> +       feed = r.feed
> +       if r.url in OVERRIDE_EMAIL.keys():
> +               return OVERRIDE_EMAIL[r.url]
> +
>         if 'email' in entry.get('author_detail', []):
>                 return entry.author_detail.email
>
> @@ -576,7 +583,7 @@
>
>                                         link = entry.get('link', "")
>
> -                                       from_addr = getEmail(r.feed, entry)
> +                                       from_addr = getEmail(r, entry)
>
>                                         name = getName(r, entry)
>                                         fromhdr = '"'+ name + '" <' + 
> from_addr + ">"
>
>
> ----- End forwarded message -----
>
> --
> see shy jo
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.6 (GNU/Linux)
>
> iD8DBQFGyey8d8HHehbQuO8RAllEAJ9zonaJ9D4XR2ZKV+pwM6vlBjmhAwCfdItl
> jHV+6SQBN4r33pQ1jYMOSo8=
> =OesX
> -----END PGP SIGNATURE-----
>
>

----- End forwarded message -----

-- 
see shy jo

Attachment: signature.asc
Description: Digital signature

Reply via email to