[exim] Re: Backup for Exim emails when using POP

Page principale
Supprimer ce message
Répondre à ce message
Auteur: terry
Date:  
À: exim-users
Sujet: [exim] Re: Backup for Exim emails when using POP

I think what you may need is a shadow transport i found this on Exim
mailing list archives
Works great for me

If you have just one domain to handle, this is trivial using
shadow_transport. But in this case, I will demonstrate "backup" of
incoming mail only.

On your local_delivery transport, add the following two lines:

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


Now create the backup_delivery transport, and it should be something
like below:


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


As root,

mkdir /Mail-backup
chown -R exim_user /Mail-backup    # exim_user is obtained by exim -bP exim_user


The file /usr/local/etc/exim/mail_backup_users contains a list of
local_parts for which you want to make backup copies. If you want to do
for everyone, then comment out the condition above.

Now what happens is that every month, you will get a file like
/Mail-backup/2004-02/luciano - this file is in mbox format. You can
stash that away to some device at the end of every month, then blow away
/Mail-backup/2004-02/. If for some reason luciano wants his mails for
the month of February 2004, and you have procmail installed, you can
do something like

formail -s sendmail lucian@xxxxxxxxxxx <
/path/to/where/you-kept/2004-02/luciano


Hope that helps.
cheers
       - wash
Terry