OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Limit the number of messages sent per connection?

From: Noel Jones (njonesmegan.vbhcs.org)
Date: Sun Mar 02 2008 - 15:07:10 CST


Noel Jones wrote:
> Patrick Ben Koetter wrote:
>> The Yahoo! guidelines for establishing SMTP connections to Yahoo! Mail
>> require
>> a maximum of 5 messages per SMTP connection:
>>
>> "Are there any guidelines for establishing SMTP connections to
>> Yahoo! Mail?"
>>
>> <http://help.yahoo.com/l/us/yahoo/mail/postmaster/postmaster-277515.html>
>>
>> I know I can use a special default_destination_concurrency_limit to
>> limit the
>> number of parallel connections (which is not what I need) and $max_use
>> works
>> on incomming connections, but not on outgoing as it seems.
>>
>> Is there any parameter to control the maximum number of messages per SMTP
>> connection?
>>
>> prick
>>
>
> Postfix smtp connection caching is time based (how long can a connection
> stay active), not count based, so there is no control to limit the
> number of messages per connection to some arbitrary number.
>
> http://www.postfix.org/postconf.5.html#smtp_connection_cache_on_demand
> http://www.postfix.org/postconf.5.html#smtp_connection_cache_time_limit
>
> You can turn off connection caching for a specific transport in master.cf.
>
> abbreviated example:
> # transport
> yahoo.com nocache:
>
> # master.cf
> nocache unix - - n - - smtp
> -o smtp_connection_cache_on_demand=no
>

After studying yahoo's instructions, it seems they don't
intend to penalize you for attempting more than 5 messages per
connection, they just disconnect after the 5th and force you
to make a new connection if you have more to say. They say in
bold print:
"Reestablish connections if you do not get an error code"

If that's really what they are doing, Postfix should deal with
it gracefully with no changes or special config.

--
Noel Jones