[Exim] archiving outgoing mail to user accounts w/ldap virtu…

Top Page
Delete this message
Reply to this message
Author: Jonathan Vanasco
Date:  
To: exim-users
Subject: [Exim] archiving outgoing mail to user accounts w/ldap virtual accounts
Incoming mail is currently delivered to:
    /var/mail/$domain/${substr_0_1:$local_part}/$local_part/
I'd like to archive a user's outgoing mail to:
    /var/mail/$sender_address_domain/
${substr_0_1:$sender_address_local_part}/$sender_address_local_part/
.sent-mail/


So webmail users will have a mail history, and regular users will have
a backup.

I've searched the list archives (which has an exim3 version of this
under the title 'collecting outgoing mail) and the exim3 faq (which
covered something similar, while the exim4 does not)

The closest to success I have found is using a filter like this:
/usr/exim/configure
    #main configuation
        system_filter = /usr/exim/system_filter.exim
        system_filter_user = exim
        system_filter_directory_transport =
virtuals_maildir_delivery__sentmail
    # begin transports
        virtuals_maildir_delivery__sentmail:
              driver                        = appendfile
              directory =
/var/mail/$sender_address_domain/
${substr_0_1:$sender_address_local_part}/$sender_address_local_part/
.sent-mail/
              create_directory
              delivery_date_add
              envelope_to_add
              return_path_add
              maildir_format
              group = mail
              mode = 0660
              directory_mode = 0770
/usr/exim/system_filter.exim
    save
/var/mail/$sender_address_domain/
${substr_0_1:$sender_address_local_part}/$sender_address_local_part/
.sent-mail/
    unseen
    finish


I've tried a few variations on that theme, which have only resulted in
this at best:
    msg archived to /var/mail/{my hostname}/s/system-filter/.sent-mail
    msg not delivered to recipient


I'm kind of at a loss. I'm know there is a way to accomplish this with
filters, i've come close, and there's probably even with routers and
transports (which would be better, as it allows me to use ldap lookups
and attempts with system_filter show ldap to be unsupported).

I'm running circles around the answers though.

Does anyone have something like this in place?