Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Rate control for SMTP delivery to speicific domain

93 views
Skip to first unread message

Mike Hutchinson

unread,
Mar 29, 2010, 6:12:30 PM3/29/10
to

Hello Everyone.

 

Our company sends out newsletters to people who have subscribed their mail address in-store (retail). I have been working in attempt to slow down E-Mail deliveries to Hotmail, as our server attempts deliveries too quickly and will get blocked by their servers. I have googled and found some decent information and have even applied it, but it does not appear to do a single thing to slow delivery down for the domain. I have in my configuration files:

 

Master.cf:

smtphotmail      unix       -              -              -              -              3              smtp

 

Transport:

hotmail.com       smtphotmail:hotmail.com

 

Main.cf:

smtphotmail_destination_concurrency_limit = 2

smtphotmail_destination_rate_delay = 3s

 

 

I was using the global limiters and these were working just fine – we were able to deliver OK, until I commented them out:

#initial_destination_concurrency = 3

#local_destination_concurrency_limit = 3

#smtp_destination_concurrency_limit = 3

#smtp_destination_rate_delay = 2s

 

It appears that whenever I use the smtphotmail transport rules, instead of the global ones, delivery attempts to the domain increase as if there was no limitation.. Ie: after a Postfix reload, I follow the mail.info log and find straight after the reload that there are instantly pages and pages of delivery attempts to hotmail.com. To me this doesn’t make sense – the rate limit means I should only see a few, every couple of seconds, right?

 

Am I missing something here?

 

Thanks in advance,

 

Yours Sincerely,

Michael Hutchinson

 

Sahil Tandon

unread,
Mar 29, 2010, 6:31:30 PM3/29/10
to
On Tue, 30 Mar 2010, Mike Hutchinson wrote:

> It appears that whenever I use the smtphotmail transport rules, instead of
> the global ones, delivery attempts to the domain increase as if there was no
> limitation.. Ie: after a Postfix reload, I follow the mail.info log and find
> straight after the reload that there are instantly pages and pages of

> delivery attempts to hotmail.com. To me this doesn't make sense - the rate


> limit means I should only see a few, every couple of seconds, right?
>
> Am I missing something here?

http://www.postfix.org/QSHAPE_README.html#backlog
http://www.postfix.org/DEBUG_README.html#mail

--
Sahil Tandon <sa...@tandon.net>

Wietse Venema

unread,
Mar 29, 2010, 8:23:46 PM3/29/10
to
Mike Hutchinson:

> Hello Everyone.
>
> Our company sends out newsletters to people who have subscribed their mail
> address in-store (retail). I have been working in attempt to slow down
> E-Mail deliveries to Hotmail, as our server attempts deliveries too quickly
> and will get blocked by their servers. I have googled and found some decent
> information and have even applied it, but it does not appear to do a single
> thing to slow delivery down for the domain. I have in my configuration
> files:
>
> Master.cf:
>
> smtphotmail unix - - - - 3 smtp

Who told you to set a wakeup timer of 3 seconds? Remove it.

> Transport:
> hotmail.com smtphotmail:hotmail.com

How do you know that Postfix uses this? The cut-and-paste fragments
from the main.cf file show no evidence of that.

As requested in the mailing list welcome message (see below) do
NOT send cut-and-paste fragments from the main.cf file.

Wietse

TO REPORT A PROBLEM see http://www.postfix.org/DEBUG_README.html#mail

TO (UN)SUBSCRIBE see http://www.postfix.org/lists.html

Thank you for using Postfix.

Mike Hutchinson

unread,
Mar 29, 2010, 9:09:44 PM3/29/10
to
> >
> > smtphotmail unix - - - - 3
> smtp
>
> Who told you to set a wakeup timer of 3 seconds? Remove it.

No-one did. I had intended to set a max processes limit..

As I understand it, this would be setting the Max Processes limit.


smtphotmail unix - - - - 3 smtp

And setting the wakeup timer would be like this:
smtphotmail unix - - - 3 - smtp



> > Transport:
> > hotmail.com smtphotmail:hotmail.com
>
> How do you know that Postfix uses this? The cut-and-paste fragments
> from the main.cf file show no evidence of that.

I have the transport referenced in main.cf, and have used postmap to build
the db.

> As requested in the mailing list welcome message (see below) do
> NOT send cut-and-paste fragments from the main.cf file.

My apologies. Ill go back and start from scratch.

Cheers,
Michael

Sahil Tandon

unread,
Mar 29, 2010, 10:07:24 PM3/29/10
to
On Tue, 30 Mar 2010, Mike Hutchinson wrote:

> As I understand it, this would be setting the Max Processes limit.
> smtphotmail unix - - - - 3 smtp

That is how you set maxproc, but why do you need 3 for this transport?

> And setting the wakeup timer would be like this:
> smtphotmail unix - - - 3 - smtp

That is how you set the timer.

> My apologies. Ill go back and start from scratch.

What version of Postfix is this?

--
Sahil Tandon <sa...@tandon.net>

Wietse Venema

unread,
Mar 30, 2010, 7:09:04 AM3/30/10
to
Mike Hutchinson:

> > >
> > > smtphotmail unix - - - - 3
> > smtp
> >
> > Who told you to set a wakeup timer of 3 seconds? Remove it.
>
> No-one did. I had intended to set a max processes limit..

You're right. Hoewever, with smtphotmail...rate_delay, Postfix will
make at most one connection at a time.

> I have the transport referenced in main.cf, and have used postmap
> to build the db.

We need to know what Postfix uses, not what YOU believe Postfix is
using. This is why we ask for NOT sending cut-and-paste output.

Wietse

Mike Hutchinson

unread,
Mar 30, 2010, 3:16:28 PM3/30/10
to

> -----Original Message-----
> From: owner-pos...@postfix.org [mailto:owner-postfix-
> us...@postfix.org] On Behalf Of Sahil Tandon
> Sent: Tuesday, 30 March 2010 3:07 p.m.
> To: postfi...@postfix.org
> Subject: Re: Rate control for SMTP delivery to speicific domain
>
> On Tue, 30 Mar 2010, Mike Hutchinson wrote:
>
> > As I understand it, this would be setting the Max Processes limit.

> > smtphotmail unix - - - - 3 smtp
>

> That is how you set maxproc, but why do you need 3 for this transport?

This transport points to a rather fragile mail server, in other words, we
are going over their acceptable delivery rate and our Server IP gets banned
unless we do something about rate control. I assumed the Max Processes would
assist with this, but perhaps I am wrong.


> > And setting the wakeup timer would be like this:
> > smtphotmail unix - - - 3 - smtp
>
> That is how you set the timer.

Yes, not what I am doing / want to do.

> > My apologies. Ill go back and start from scratch.
>
> What version of Postfix is this?

Postfix mail_version = 2.5.1

Cheers,
Michael Hutchinson

Victor Duchovni

unread,
Mar 30, 2010, 4:00:54 PM3/30/10
to
On Wed, Mar 31, 2010 at 08:16:28AM +1300, Mike Hutchinson wrote:

> > What version of Postfix is this?
>
> Postfix mail_version = 2.5.1

The rate control features introduced in 2.5.0 were improved in later
patches, you must upgrade to the latest 2.5 release if you want to
enforce inter-message delays.

--
Viktor.

P.S. Morgan Stanley is looking for a New York City based, Senior Unix
system/email administrator to architect and sustain our perimeter email
environment. If you are interested, please drop me a note.

Noel Jones

unread,
Mar 30, 2010, 4:04:08 PM3/30/10
to
>> What version of Postfix is this?
>
> Postfix mail_version = 2.5.1
>
> Cheers,
> Michael Hutchinson
>
>

Postfix 2.5.1 is pretty old, the current 2.5 patchlevel is 10.
There have been some changes that could affect your rate
delay controls.

Anyway, for diagnostics you can add a '-o
syslog_name=smtphotmail' to your master.cf entry to verify the
correct transport is being used, or for more info add a -v to
your smtphotmail transport to see what it's up to.

Also see the "slow" transport example under
http://www.postfix.org/QSHAPE_README.html#backlog


-- Noel Jones

Wietse Venema

unread,
Mar 30, 2010, 4:12:18 PM3/30/10
to
Victor Duchovni:

> On Wed, Mar 31, 2010 at 08:16:28AM +1300, Mike Hutchinson wrote:
>
> > > What version of Postfix is this?
> >
> > Postfix mail_version = 2.5.1
>
> The rate control features introduced in 2.5.0 were improved in later
> patches, you must upgrade to the latest 2.5 release if you want to
> enforce inter-message delays.

According to the change log:

20090305

Bugfix: in the "new queue manager", the _destination_rate_delay
code needed to postpone the job scheduler updates after
delivery completion, otherwise the scheduler could loop on
blocked jobs. Victor & Wietse. File: qmgr/qmgr_entry.c,
qmgr/qmgr_queue.c, qmgr/qmgr_job.c.

This fix was released with Postfix 2.5 Patch 07.

Wietse

Sahil Tandon

unread,
Mar 30, 2010, 4:20:59 PM3/30/10
to
On Mar 30, 2010, at 3:16 PM, "Mike Hutchinson"
<packe...@ping.net.nz> wrote:

>
>
>> -----Original Message-----
>> From: owner-pos...@postfix.org [mailto:owner-postfix-
>> us...@postfix.org] On Behalf Of Sahil Tandon
>> Sent: Tuesday, 30 March 2010 3:07 p.m.
>> To: postfi...@postfix.org
>> Subject: Re: Rate control for SMTP delivery to speicific domain
>>
>> On Tue, 30 Mar 2010, Mike Hutchinson wrote:
>>
>>> As I understand it, this would be setting the Max Processes limit.
>>> smtphotmail unix - - - - 3 smtp
>>
>> That is how you set maxproc, but why do you need 3 for this
>> transport?
>
> This transport points to a rather fragile mail server, in other
> words, we
> are going over their acceptable delivery rate and our Server IP gets
> banned
> unless we do something about rate control. I assumed the Max
> Processes would
> assist with this, but perhaps I am wrong.
>
>
>>> And setting the wakeup timer would be like this:
>>> smtphotmail unix - - - 3 - smtp
>>
>> That is how you set the timer.
>
> Yes, not what I am doing / want to do.
>
>>> My apologies. Ill go back and start from scratch.
>>

>> What version of Postfix is this?
>
> Postfix mail_version = 2.5.1

That's what I suspected. Upgrade; see RELEASE_NOTES for
destination_rate_delay fix last year. Also show logs confirming your
special transport is actually being used.

Mike Hutchinson

unread,
Mar 30, 2010, 5:01:02 PM3/30/10
to
>
> > > What version of Postfix is this?
> >
> > Postfix mail_version = 2.5.1
>
> The rate control features introduced in 2.5.0 were improved in later
> patches, you must upgrade to the latest 2.5 release if you want to
> enforce inter-message delays.
>

Sounds interesting. I shall investigate and persue upgrading our Postfix to
a more recent version.

Thanks for the information

Cheers,
Michael Hutchinson

Mike Hutchinson

unread,
Mar 30, 2010, 5:02:00 PM3/30/10
to
> >
> >>> And setting the wakeup timer would be like this:
> >>> smtphotmail unix - - - 3 - smtp
> >>
> >> That is how you set the timer.
> >
> > Yes, not what I am doing / want to do.
> >
> >>> My apologies. Ill go back and start from scratch.
> >>
> >> What version of Postfix is this?
> >
> > Postfix mail_version = 2.5.1
> >
> > Cheers,
> > Michael Hutchinson
> >
> >
>
> Postfix 2.5.1 is pretty old, the current 2.5 patchlevel is 10.
> There have been some changes that could affect your rate
> delay controls.
>
> Anyway, for diagnostics you can add a '-o
> syslog_name=smtphotmail' to your master.cf entry to verify the
> correct transport is being used, or for more info add a -v to
> your smtphotmail transport to see what it's up to.
>
> Also see the "slow" transport example under
> http://www.postfix.org/QSHAPE_README.html#backlog


Ahh, some direct logging would be nice. Thanks for the information and
links. I will also check out whether my postfix needs to be upgraded.

Cheers,
Michael Hutchinson

Mike Hutchinson

unread,
Mar 30, 2010, 5:03:28 PM3/30/10
to
> >>
> >> What version of Postfix is this?
> >
> > Postfix mail_version = 2.5.1
>
> That's what I suspected. Upgrade; see RELEASE_NOTES for
> destination_rate_delay fix last year. Also show logs confirming your
> special transport is actually being used.

Excellent. Sounds like I have my answer. Thanks for the info, everyone,
including Wietse.

Hopefully all will be resolved today.

Cheers,
Michael Hutchinson.

0 new messages