Re: [Exim] Match recipients against an addresslist

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Odhiambo G. Washington
Date:  
À: Hunte Swee
CC: exim-users
Sujet: Re: [Exim] Match recipients against an addresslist
--
* Hunte Swee <hunte@???> [20031015 10:44]: wrote:
> I wanna copy all of inbound messeages sent to paticular address, but it seems very difficult.
>
> exim.conf
> ...
> addresslist inbound_address = user1@??? : user2@??? : user100@???
>
> ...
> begin routers
> ...
> r_copy_inbound_by_address:
> driver = accept
> condition = ${if match {$inbound_address} {\N$local_part@$domain\N}}
> #
> # how to write the condition?
> #
> transport = t_copy_inbound_by_address
> unseen
> ...
>
> It don't work. Please help me.



Since there are many ways of skinning the rat, below is what I use,
based on the shadow_transport option. Perhaps all you will need
to do is to change two lines:

Change
shadow_condition     = ${lookup{$local_part}lsearch{/usr/local/etc/exim/mail_backup_users}{1}{0}}


To:

shadow_condition     = ${lookup{$local_part@$domain}lsearch{/usr/local/etc/exim/mail_backup_users}{1}{0}}




And also Change

file                 = /Mail-backup/${substr_0_7:$tod_log}/${local_part}


To:

file                 = /Mail-backup/${substr_0_7:$tod_log}/${local_part}@${domain}


YMMV.


I don't know if your earlier method would be more efficient though. Since routing
has been done here, I thought the shadow_transport option is faster than running
the mail through many routers.



local_delivery:
 driver              = appendfile
 check_string        =
 directory           = ${home}/Maildir/
 create_directory
 directory_mode      = 0700
 delivery_date_add
 envelope_to_add
 group               = mail
 maildir_format
 maildir_tag         = ,S=$message_size
 message_prefix      = ""
 message_suffix      = ""
 use_fcntl_lock
 use_lockfile
 no_mode_fail_narrower
 quota               = ${lookup {$local_part} lsearch \
                    {/usr/local/etc/exim/quota-maps}{$value}{50}}M
 no_quota_is_inclusive
 quota_size_regex    = ,S=(\d+)$
 quota_warn_message  = "blah..blah,,"
 quota_warn_threshold = 75%
 return_path_add
 mode                 = 0660
 shadow_transport     = backup_delivery
 shadow_condition     = ${lookup{$local_part}lsearch{/usr/local/etc/exim/mail_backup_users}{1}{0}}


##

backup_delivery:
 driver               = appendfile
 delivery_date_add
 envelope_to_add
 file                 = /Mail-backup/${substr_0_7:$tod_log}/${local_part}
 mode                 = 0600
 user                 = exim
 group                = mail
 return_path_add






        cheers
       - wash
+----------------------------------+-----------------------------------------+
Odhiambo Washington                     . WANANCHI ONLINE LTD (Nairobi, KE)  |
<wash at wananchi dot com>              . 1ere Etage, Loita Hse, Loita St.,  |
GSM: (+254) 722 743 223                 . # 10286, 00100 NAIROBI             |
GSM: (+254) 733 744 121                 . (+254) 020 313 985 - 9             |
+---------------------------------+------------------------------------------+
"Oh My God! They killed init! You Bastards!"
                         --from a /. post
--
[ Content of type application/x-pkcs7-signature deleted ]
--