Clemens Oertel <[EMAIL PROTECTED]> writes:
> So I added in function "make_field" (tmda-inject), around line 160:
>
> if cookie_option and cookie_option.find(':') >= 0:
> from_address = cookie_option.split(':')[1]
> cookie_option = cookie_option.split(':')[0]
>
> and my outgoing filter contains
>
> to [EMAIL PROTECTED] tag
> envelope [EMAIL PROTECTED]:[EMAIL PROTECTED]
> from dated=7d:[EMAIL PROTECTED]
>
> Now, no matter what my mailer uses as from line, I should end up with
> <[EMAIL PROTECTED]> as envelope sender and
> <[EMAIL PROTECTED]> as from-header. Something
> along these lines.
>
> Neither do I know much about about the TMDA code base, nor do I have
> done any python coding before, so this only only a very rough idea.
It looks fine, with the one exception that, if you use ever use the
'tag' action to add a custom header field and that field's contents
contain a colon, you'll run into problems. A suggested change to your
code is to first test that 'cookie_type' is "true":
if cookie_type and cookie_option and cookie_option.find(':') >= 0:
from_address = cookie_option.split(':')[1]
cookie_option = cookie_option.split(':')[0]
Tim
_________________________________________________
tmda-workers mailing list ([EMAIL PROTECTED])
http://tmda.net/lists/listinfo/tmda-workers