Re: [Exim] forwarding all mails to a second smtp server with…

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Giuliano Gavazzi
Data:  
Para: Moritz Möller, exim-users
Assunto: Re: [Exim] forwarding all mails to a second smtp server without generating any bounces
At 11:12 pm +0100 2004/01/03, Moritz Möller wrote:
>So, i just read my post and i think i ignored the "first read - then post"
>rule... Sorry for that.
>
>I try to run both systems parallel for a while, so i can test the new
>system. So mails still arive at the old system and are delivered to the
>local maildirs. In addition to that i want the old system to forward each
>mail to the new system by smtp, so i can check filter rules etc. on the new
>system. But, if the new system is down or gives a permanent error response,
>i dont want the old system to generate a bounce - so i need a flag or
>something that says "try this but dont generate bounces/error messages"
>
>So, this time i read the text before posting :)
>


I have tested a system to do this using a per
recipient system filter that does forward a copy
to a backup subdomain or the original domain.
Errors are sent to root so that errors can be
tracked but do not generate unwanted bounces. The
original envelope sender is restored by adding to
the remore_smtp and local_delivery transports the
following:

return_path = $address_data


the filter is:

# Exim filter <<== do not edit or remove this line!
if
$domain does not contains backup and
${original_local_part} is not "root"
then
unseen deliver \

${local_part_prefix}${original_local_part}$local_part_suffix@backup1.$domain
endif


and this is the first router:

#this router does a system level per recipient filtering
#essentially just copying the file to a backup address
#    user = smmsp
   central_filter:
     driver = redirect
     address_data = $sender_address
     errors_to = root@???
#    user = root
     check_local_user
     domains = +local_domains
     local_parts = !lsearch;/etc/mail/domains/${domain}.no_backup
     file = /usr/local/exim/confs/filters/$local_part
     no_verify
     allow_filter
     allow_freeze


here I check the local_parts against a list for
users that do not need backup (this would be
irrelevant in your case). Also the file filter is
local_part dependent. Note that it appears that
local_parts and $local_part have a different
meaning here when aliasing is done. In your case
I would just have a unique filter.

This is neither elegant nor it has been tested
well (in particular with aliases). But I think it
works (but the server on which I am testing it is
not yet an MX...).

Giuliano
--
H U M P H
    || |||
  software


Java & C++ Server/Client/Human Interface applications on MacOS - MacOS X
http://www.humph.com/