Re: [exim] backup of incoming mail, two deliveries

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Tony Finch
Dátum:  
Címzett: Nicolas Kowalski
CC: exim-users
Tárgy: Re: [exim] backup of incoming mail, two deliveries
On Thu, 16 Dec 2004, Nicolas Kowalski wrote:
>
> I found it: the backup director was put above the system aliases one,
> and the aliases used caused a loop, and so the double backup delivery. I
> moved the backup directory below the system aliases, and now everything
> works well.


If you have more complicated routing with multiple redirects, then this
isn't sufficient to solve the problem. You need to use $address_data, in a
similar way to this stunt router I used for load testing a while back...

-# Deliver a duplicate of some proportion of all messages to a special
-# machine specified in a file, if it exists. The probability of
-# sending a message is the reciprocal of the number in the second
-# colon-separated field in the file. The address_data is used to
-# prevent redirected addresses from being tapped twice.
-
-traffic_tap:
-  driver               = manualroute
-  no_verify
-  require_files                = TABLES/tap_info
-  condition            = ${if eq{a}{${hash {1} \
-                                           {${extract {2}{:} {${readfile{TABLES/tap_info}{:}}} }} \
-                                      {$message_headers$message_body}}} \
-                           {yes} {no} }
-  address_data         = ${if !def:address_data {tapped} fail }
-  route_data           = ${extract {1}{:} {${readfile{TABLES/tap_info}{:}}} }
-  unseen
-  transport            = smtp


Tony.
--
<fanf@???> <dot@???> http://dotat.at/ ${sg{\N${sg{\
N\}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}\
\N}{([^N]*)(.)(.)(.*)}{\$1\$3\$2\$1\$3\n\$2\$3\$4\$3\n\$3\$2\$4}}