[exim] .forward

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Stefan Klatt
Datum:  
To: Exim users mailing list
Alte Treads: [exim] Smarthost to another MTA on the same host?
Betreff: [exim] .forward
Hi,

>i read now a lot of and i thought about this a few days... but i didn't
>found the key to open the door to the solution....

Tonight the door was open :-)

>But how can i defer emails to this user if there is an error at the
>.forward file?


with this configration it works like a charme:


********* exim.conf *********

filtererror:
driver = accept
local_part_prefix = error-
headers_add = Router: filtererror
transport = maildir

user_filter:
driver = redirect
domains = +imap_domains
file = ${LDAP_USRPATH}/.forward
headers_add = Router: user_filter
allow_filter
allow_defer
no_verify
no_expn
no_rewrite
check_ancestor
user = email
group = email
file_transport = address_file
# pipe_transport = address_pipe
reply_transport = address_reply
skip_syntax_errors
syntax_errors_to = error-$local_part@$domain
syntax_errors_text = \
\n\
Router: user_filter\n\
\n\
This is an automatically generated message. An error has\n\
been found in your .forward file. Details of the error are\n\
reported below. While this error persists, you will receive\n\
a copy of this message for every message that is addressed\n\
to you and for each retry to deliver it.
redirect_router = local_error

# Emails, die dank eines Fehlers im .forward File durchkommen werden
deffered
local_error:
driver = redirect
domains = +imap_domains
condition = ${if !eq{{$sender_address_local_part}{"Mailer-Daemon"}}}
debug_print = "**** local_error for $local_part@$domain"
data = :defer:
allow_defer


********* .forward *********

The last rule at the .forward file:

if $h_to: does not contains "error-" then
save "INBOX"
finish
endif

I generate the .forward file with a python script from LDAP data with a
proper INBOX path.


Has anybody a probably simpler idea or any comment to this configuration?

Mfg.
Stefan Klatt


begin:vcard
fn:Stefan Klatt
n:Klatt;Stefan
org:CaC
adr:;;Triftstrasse 9;Frankfurt;Hessen;60528;Germany
email;internet:stefan.klatt@???
title:Netzwerkspezialist
tel;cell:+49-172-6807809
version:2.1
end:vcard