[Exim] recipe: archive user's outgoing mail

Pàgina inicial
Delete this message
Reply to this message
Autor: Jonathan Vanasco
Data:  
A: exim-users
Assumpte: [Exim] recipe: archive user's outgoing mail
One router, One Transport

Router checks for authenticated_id. if so, runs archiver transport
unseen (remote smtp and local delivery transports are subsequently run).
Transport delivers to 'sent-mail' folder of sender address IF it
matches the authenticated id. If the authenticated id is not the same
as the sender address, the sending address gets the mail in a
'forged-mail' subfolder.

Notes:
1) On my system server_set_id is the users email address is after
authentication
2) On my system, only authenticated users can send mail to arbitrary
hosts.

Eventually, i'll add some logic in the router or transport to handle
users with multiple addresses, and tie in ldap prefs to turn this off
for Mail.app users (who can apparently auto-store in a server sent-mail
in addition to local)
This works nicely for now though.

==

Routers:
(this is first on the list, above outgoing smtp)

archive_authenticated:
   driver        = accept
   transport     = maildir_archive
   condition     = $authenticated_id
   unseen


Transports:
(can go anywhere. in mine, USERDIR is an ldap lookup)

maildir_archive_outgoing:
   driver         = appendfile
   hide directory = ${if eq
{$sender_address}{$authenticated_id}{USERDIR/.sent-mail}{USERDIR/
.forged-mail}}
   maildir_format
   group         = mail
   directory_mode     = 0770
   mode         = 0660
   create_directory
   delivery_date_add
   envelope_to_add
   return_path_add