Re: [exim] Yahoo 5 messages per SMTP Connection

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Phil Pennock
Date:  
À: Terry ( 1stKMH )
CC: exim-users
Sujet: Re: [exim] Yahoo 5 messages per SMTP Connection
On 2008-08-18 at 17:05 +0100, Terry ( 1stKMH ) wrote:
> What is the best method to limit the connections to yahoo ?

[ where Subject: highlights that you mean limit the messages per
connection, not the count of concurrent connections ]

Use a separate Router before your normal outbound SMTP router; apply
appropriate restrictions to that router and set connection_max_messages
on the Transport used by that Router.

Note that connection_max_messages is *not* expanded, so you can't use a
per-domain lookup for this. You have to hard-code a limit. The default
value is 500.

For instance,

----------------------------8< cut here >8------------------------------
begin routers

outbound_throttled:
driver = dnslookup
domains = yahoo.com
transport = throttled_smtp

# normal dnslookup Router here, *after* that one

# [...]

begin transports

throttled_smtp:
driver = smtp
connection_max_messages = 5

----------------------------8< cut here >8------------------------------

You probably want to replace the hard-coded "yahoo.com" with a file
reference, matching a file containing a list of domains, or with a
domainlist:

domainlist yahoo_domains = yahoo.com : yahoo.co.uk : ...

which you then refer to as +yahoo_domains :

domains = +yahoo_domains

-Phil