Re: [exim] Help in Catch mail going out for a specific user

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Bill Hacker
Datum:  
To: exim-users
Betreff: Re: [exim] Help in Catch mail going out for a specific user
marius wrote:

> I am struggling in catching all the mail(of a specific user) going out. I can catch all incomming mail for that user.
> We are using exim 4.20 and the users information is stored in a database including the filter (As a field in the database).
> I have tried various different things including
>
> # Exim filter 
> if error_message then finish endif
> if first_delivery then
>    unseen deliver mailaddress
> endif

>
> But it works only if the person receives mail and not when he sends the mail.
>
> Thanks for any help


This works for us. Copies header and body of *all* outbound traffic,
even if it fails.
If you want only a specific user, further conditionals would be needed....


NOTE: Our user/group, storage area, umask are non-standard,
and our way of annotating and specifiying booleans is adapted
to offset Irish Alzheimer's and find stuff faster when editing
=========================

# ROUTE_2A REMOTE: Find remote host address by DNS lookup.
# Forbid internal 0.0.0.0 & loopback interface 127.0.0.0/8 as destinations.
# IF DNS lookup fails, THEN consider address unrouteable AND try no_more.
# ELSE put it out over the network.
# Copy to fascist-logging archiver *regardless*.
#
dnslookup:
driver = dnslookup
domains = ! +local_domains
transport = remote_smtp
ignore_target_hosts = 0.0.0.0 : 127.0.0.0/8 : 193.17.85.216
unseen

# ROUTE_2B REMOTE: 'fascist-logging'.
#
sentarchiver:
driver = dnslookup
domains = ! +local_domains
transport = archive_delivery
no_more
=========================
<other stuff>
=========================
The relevant transport:

# TRANSPORT_3: 'facist-logging'.
#
archive_delivery:
driver = appendfile
user = eximd
group = postal
delivery_date_add
envelope_to_add
return_path_add
maildir_format = true
mode = 0770
directory = /web/mail/archive/Maildir/
create_directory = true
directory_mode = 0770
mode_fail_narrower = false
=========================

HTH,

Bill Hacker