[exim] How do you get multiple messages sent via the same sm…

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Adam Nielsen
日付:  
To: exim-users
題目: [exim] How do you get multiple messages sent via the same smarthost SMTP connection?
Hi all,

I've got a Mailman installation on a server that feeds its messages in
to Exim. Since this machine is behind a firewall, all mail is
smarthosted out to another mailserver.

The problem is that this other mailserver (beyond my control) has a rate
limit enforced. This means that after 20 connections in a row further
connections are dropped until traffic stops for a few minutes.

Once Mailman has delivered all the messages to Exim, Exim seems to make
a separate SMTP connection to the smarthost for each message. After 20
messages (20 connections) the IP gets rate limited and Exim can't
deliver any more messages (the rest of the queued messages fail with
"defer (-53): all host address lookups failed temporarily") 15 minutes
later when the next queue runner starts another 20 messages go but
that's it.

From reading the docs it seems that Exim is supposed to reuse SMTP
connections, but for some reason this isn't happening for me. Perhaps
it's because of the "mailman_verp_smtp" transport I have set up?
There's an option in there called "max_rcpt" which limits one recipient
per message which would seem to be causing this problem, but as far as I
understand I can't remove that otherwise the wrong envelope addresses
etc. would be used.

Any ideas would be much appreciated, because at the moment a mailout
takes almost an entire day to complete!

Many thanks,
Adam.

----------
2008-07-01 15:14:19 1KDSVQ-0007ki-QN == someone@???
R=mailman_verp_router T=mailman_verp_smtp defer (0): SMTP error from
remote mail server after initial connection: host smart.host.name
[1.2.3.4]: 421 4.3.2 Connection rate limit exceeded.
2008-07-01 15:14:19 1KDSVQ-0007ki-QN failed to open DB file
/var/spool/exim/db/wait-mailman_verp_smtp: Success
2008-07-01 15:14:19 1KDSVQ-0007ki-QN == someone@???
R=mailman_verp_router T=mailman_verp_smtp defer (-53): all host address
lookups failed temporarily
2008-07-01 15:14:19 1KDSVQ-0007ki-QN failed to open DB file
/var/spool/exim/db/wait-mailman_verp_smtp: Success
2008-07-01 15:14:19 1KDSVQ-0007ki-QN == someone@???
R=mailman_verp_router T=mailman_verp_smtp defer (-53): all host address
lookups failed temporarily
2008-07-01 15:14:19 1KDSVQ-0007ki-QN failed to open DB file
/var/spool/exim/db/wait-mailman_verp_smtp: Success
2008-07-01 15:14:19 1KDSVQ-0007ki-QN == someone@???
R=mailman_verp_router T=mailman_verp_smtp defer (-53): all host address
lookups failed temporarily

mailman_verp_router:
#       driver = dnslookup
         #Send this via a smarthost instead
         driver = manualroute
         route_list = * SMART_HOST
         host_find_failed = freeze


         # we only consider messages sent in through loopback
         condition = ${if \
                 or{ \
                         {eq{$sender_host_address}{127.0.0.1}} \
                 {eq{$sender_host_address}{::1}} \
                 }{yes}{no} \
         }


         # we do not do this for traffic going to the local machine
         domains = !+local_domains:!+mm_domains
         ignore_target_hosts = <; 0.0.0.0; \
                 64.94.110.11; \
                 127.0.0.0/8; \
                 ::1/128;fe80::/10;fe \
                 c0::/10;ff00::/8
         # only the un-VERPed bounce addresses are handled
         senders = "*-bounces@*"
         transport = mailman_verp_smtp


mailman_verp_smtp:
         driver = smtp
         # put recipient address into return_path
         return_path = 
${local_part:$return_path}+$local_part=$domain@${domain:$return_path}
         # must restrict to one recipient at a time
         max_rcpt = 1
         # Errors-To: may carry old return_path
         headers_remove = Errors-To
         headers_add = Errors-To: ${return_path}