Re: [exim] how to change a recipient in a transport?

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Beber
Datum: 2006-10-10 16:45 -000
To: Marten Lehmann
CC: exim-users
Betreff: Re: [exim] how to change a recipient in a transport?
Le Tue, 10 Oct 2006 17:17:55 +0200, Marten Lehmann <lehmann@???> a
écrit :

> Hello,
>
> maybe I should explain what I need it for: In my current setup exim is
> delivering directly to a Maildir. If a message is found to be junk and
> the user has configured to move the message to the junk-folder in this
> case, exim is delivering it to the junk-folder:
>
> address_directory:
>    driver = appendfile
>    delivery_date_add
>    envelope_to_add
>    return_path_add
>    maildir_format
>    directory = 
> ${lookup{$local_part@$domain}lsearch*@{/etc/mail/maildirs.txt}}/${if \
>                  and { \

>
> {eq{${lookup{$local_part@$domain}lsearch*@{/etc/mail/antispam.txt}}}{junk-folder}} 
> \
>                         {eq{$spam_score_int}{10}} \
>                     } {.Junk/}{}}
>    quota = ${lookup{$local_part@$domain}lsearch*@{/etc/mail/quotas.txt}}
>    create_directory = false
>    user = nobody
>    group = nobody

>
> Now I'm migrating to cyrus where messages are delivered via the
> smtp-transport using lmtp. To deliver a message into the junk-folder, I
> need to rewrite a recipient address like test@??? to test/Junk@???.
>
> How can I do this?


Personnaly I do like that :

localuserspam:
driver = accept
check_local_user
local_part_suffix = +* : -*
local_part_suffix_optional
condition = ${if >{$spam_score_int}{25}{1}{0}}
transport = spam_delivery

localuser:
driver = accept
check_local_user
local_part_suffix = +* : -*
local_part_suffix_optional
transport = ham_delivery


spam_delivery:
driver = appendfile
maildir_format
create_directory
directory = $home/Maildir/.Spam
delivery_date_add
envelope_to_add
return_path_add
group = mail

ham_delivery:
driver = appendfile
maildir_format
create_directory
directory = $home/Maildir
delivery_date_add
envelope_to_add
return_path_add
group = mail

--
Beber - E-Mail / Jabber (+GMail) : beber_AT_meleeweb.net
http://www.meleeweb.net