How to send more than 1 email per sec per domain?

classic Classic list List threaded Threaded
15 messages Options
Reply | Threaded
Open this post in threaded view
|

How to send more than 1 email per sec per domain?

Philippe Bloix
Hi!
 

I would like to set a limit rate per domain. I know i can use « destination_rate_delay » and it works ! The problem is that the minimum period is 1s. It permits to send 1 email per domain per second .

If i want to send for example 5 emails per domain per second, how is it possible by using postfix?

 

Thanks

 

PB

Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Dominik George
Hi,

postfwd allows for fine tuning of such limitation.

-nik



Philippe Bloix <[hidden email]> schrieb:
Hi!
 

I would like to set a limit rate per domain. I know i can use « destination_rate_delay » and it works ! The problem is that the minimum period is 1s. It permits to send 1 email per domain per second .

If i want to send for example 5 emails per domain per second, how is it possible by using postfix?

 

Thanks

 

PB


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.
Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

DTNX Postmaster
On Aug 13, 2013, at 15:21, Dominik George <[hidden email]> wrote:

> postfwd allows for fine tuning of such limitation.
>

>> Philippe Bloix <[hidden email]> schrieb:
>> Hi!
>>  
>> I would like to set a limit rate per domain. I know i can use « destination_rate_delay » and it works ! The problem is that the minimum period is 1s. It permits to send 1 email per domain per second .
>> If i want to send for example 5 emails per domain per second, how is it possible by using postfix?

We also use this to enforce certain rate limits. Not sure it supports
rate limiting by domain, as we currently only use per sender rate
limiting, but the feature set is extensive. Have a look at the
available documentation to see if it fits your requirements.

More info @ http://www.postfwd.org/

Mvg,
Joni


Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Philippe Bloix
In reply to this post by Dominik George

Thanks Nik for your response.

I had a look in the postfwd website.  The postfwd rate limit examples show that when the limit is reached, emails are rejected.

 

What i would like is :

For example, my postfix relay accepts about 1000 emails (1 shot) from a SMTP client, then the postfix server relays them with the rate of 5 emails per domain per second without REJECT.

 

Do you know if postfwd permits to have this behaviour ?

 

PB


2013/8/13 Dominik George <[hidden email]>
Hi,

postfwd allows for fine tuning of such limitation.

-nik



Philippe Bloix <[hidden email]> schrieb:
Hi!
 

I would like to set a limit rate per domain. I know i can use « destination_rate_delay » and it works ! The problem is that the minimum period is 1s. It permits to send 1 email per domain per second .

If i want to send for example 5 emails per domain per second, how is it possible by using postfix?

 

Thanks

 

PB


--
Diese Nachricht wurde von meinem Android-Mobiltelefon mit K-9 Mail gesendet.

Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Noel Jones-2
On 8/13/2013 10:26 AM, Philippe Bloix wrote:
> What i would like is :
>
> For example, my postfix relay accepts about 1000 emails (1 shot)
> from a SMTP client, then the postfix server relays them with the
> rate of 5 emails per domain per second without REJECT.

As documented, the minimum delay is 1 second.

>
>  
>
> Do you know if postfwd permits to have this behaviour ?

Not possible; postfwd limits input, not output.



  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

DTNX Postmaster
On Aug 13, 2013, at 17:34, Noel Jones <[hidden email]> wrote:

> On 8/13/2013 10:26 AM, Philippe Bloix wrote:
>> What i would like is :
>>
>> For example, my postfix relay accepts about 1000 emails (1 shot)
>> from a SMTP client, then the postfix server relays them with the
>> rate of 5 emails per domain per second without REJECT.
>
> As documented, the minimum delay is 1 second.
>
>> Do you know if postfwd permits to have this behaviour ?
>
> Not possible; postfwd limits input, not output.

Depends on your setup; we run postfwd on our relay servers, with a very simple ruleset;

==
id=LIMITSEND
        action=rate(sender/150/3600/DEFER '$$sender' exceeding rate limits)
==

In other words, if a sender sends more than 150 messages in one hour, defer the next attempt. This allows people to mail merge in Outlook via their local Exchange server and whatnot, it will just take a number of hours that is roughly equal to the number of messages divided by 150.

As said, this requires that you have a setup where the submission servers relay via the server that runs postfwd, and the retry interval etc. comes into play here. But one could use the multi-instance postfix option for example to set up a submission instance specifically for this type of client, which accepts everything and then relays it through the actual sending server to the outside, with custom retry intervals and such.

Another option may be to put the whole batch on hold, and then run some custom scripting that requeues messages based on limits you specify.

It all depends on what you are trying to achieve, though. Is one per second really a problem in terms of delays? A thousand e-mails take less than 20 minutes to deliver to a single destination that way.

HTH,
Joni

Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Stan Hoeppner
In reply to this post by Philippe Bloix
On 8/13/2013 7:43 AM, Philippe Bloix wrote:

> I would like to set a limit rate per domain. I know i can use
> « destination_rate_delay » and it works ! The problem is that the minimum
> period is 1s. It permits to send 1 email per domain per second .
>
> If i want to send for example 5 emails per domain per second, how is it
> possible by using postfix?

Rate problems are rarely encountered with normal mail traffic.  When
recipient domains reject your mail due to rate, you're either sending
spam, bulk mail, running a very busy list server, or an aggregation
relay/proxy for people living in tyrannical countries.

If you're relaying spam we won't help you.  If you're doing one of the
other three the typical solution is to simply contact each receiver who
is rate limiting you and make arrangements with them.  The big
freemailers have forms for this on their websites, i.e. Google, Yahoo,
Hotmail, etc.

As a general rule, if you're sending legitimate bulk or other high
volume mail, not spam, receivers are willing to work with you.  Why?
Their users who pay their bills signed up for the mail you're sending
and they need to keep those users happy.

--
Stan

Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Marko Weber | ZBF
In reply to this post by DTNX Postmaster
Hi,

Am 2013-08-13 18:10, schrieb DTNX Postmaster:

> On Aug 13, 2013, at 17:34, Noel Jones <[hidden email]> wrote:
>
>> On 8/13/2013 10:26 AM, Philippe Bloix wrote:
>>> What i would like is :
>>>
>>> For example, my postfix relay accepts about 1000 emails (1 shot)
>>> from a SMTP client, then the postfix server relays them with the
>>> rate of 5 emails per domain per second without REJECT.
>>
>> As documented, the minimum delay is 1 second.
>>
>>> Do you know if postfwd permits to have this behaviour ?
>>
>> Not possible; postfwd limits input, not output.
>
> Depends on your setup; we run postfwd on our relay servers, with a
> very simple ruleset;
>
> ==
> id=LIMITSEND
> action=rate(sender/150/3600/DEFER '$$sender' exceeding rate limits)
> ==
>
> In other words, if a sender sends more than 150 messages in one hour,
> defer the next attempt. This allows people to mail merge in Outlook
> via their local Exchange server and whatnot, it will just take a
> number of hours that is roughly equal to the number of messages
> divided by 150.
>
> As said, this requires that you have a setup where the submission
> servers relay via the server that runs postfwd, and the retry interval
> etc. comes into play here. But one could use the multi-instance
> postfix option for example to set up a submission instance
> specifically for this type of client, which accepts everything and
> then relays it through the actual sending server to the outside, with
> custom retry intervals and such.
>
> Another option may be to put the whole batch on hold, and then run
> some custom scripting that requeues messages based on limits you
> specify.
>
> It all depends on what you are trying to achieve, though. Is one per
> second really a problem in terms of delays? A thousand e-mails take
> less than 20 minutes to deliver to a single destination that way.
>
> HTH,
> Joni

you can try POLICYD, i limit with this outgoing and incoming mails.

marko
Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Philippe Bloix
In reply to this post by DTNX Postmaster
Thank you for your response.

I'm not administrator of all submission servers then i'm not allowed to set "retry interval"on some application servers.
I thought about putting on hold all the mails but my goal is to send about 10 mails per domain per second but it's quite difficult to implement with this method.
 
PB
 
 
 
2013/8/13 DTNX Postmaster <[hidden email]>
On Aug 13, 2013, at 17:34, Noel Jones <[hidden email]> wrote:

> On 8/13/2013 10:26 AM, Philippe Bloix wrote:
>> What i would like is :
>>
>> For example, my postfix relay accepts about 1000 emails (1 shot)
>> from a SMTP client, then the postfix server relays them with the
>> rate of 5 emails per domain per second without REJECT.
>
> As documented, the minimum delay is 1 second.
>
>> Do you know if postfwd permits to have this behaviour ?
>
> Not possible; postfwd limits input, not output.

Depends on your setup; we run postfwd on our relay servers, with a very simple ruleset;

==
id=LIMITSEND
        action=rate(sender/150/3600/DEFER '$$sender' exceeding rate limits)
==

In other words, if a sender sends more than 150 messages in one hour, defer the next attempt. This allows people to mail merge in Outlook via their local Exchange server and whatnot, it will just take a number of hours that is roughly equal to the number of messages divided by 150.

As said, this requires that you have a setup where the submission servers relay via the server that runs postfwd, and the retry interval etc. comes into play here. But one could use the multi-instance postfix option for example to set up a submission instance specifically for this type of client, which accepts everything and then relays it through the actual sending server to the outside, with custom retry intervals and such.

Another option may be to put the whole batch on hold, and then run some custom scripting that requeues messages based on limits you specify.

It all depends on what you are trying to achieve, though. Is one per second really a problem in terms of delays? A thousand e-mails take less than 20 minutes to deliver to a single destination that way.

HTH,
Joni


Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Philippe Bloix
In reply to this post by Stan Hoeppner
Thanks for your response
 
I'm not a spammer :-), i'm working in a telecom firm where we send emails to our customers.
In fact, it's not easy to contact  some receivers who is rate limiting, then in theses cases the goal is to reduce the rate per sec (about 10 mails per domain per sec); i'm astonished that postfix (without addons) is not allowed to do that but at best  only 1 mail per domain per sec.
 
PB


 
2013/8/14 Stan Hoeppner <[hidden email]>
On 8/13/2013 7:43 AM, Philippe Bloix wrote:

> I would like to set a limit rate per domain. I know i can use
> « destination_rate_delay » and it works ! The problem is that the minimum
> period is 1s. It permits to send 1 email per domain per second .
>
> If i want to send for example 5 emails per domain per second, how is it
> possible by using postfix?

Rate problems are rarely encountered with normal mail traffic.  When
recipient domains reject your mail due to rate, you're either sending
spam, bulk mail, running a very busy list server, or an aggregation
relay/proxy for people living in tyrannical countries.

If you're relaying spam we won't help you.  If you're doing one of the
other three the typical solution is to simply contact each receiver who
is rate limiting you and make arrangements with them.  The big
freemailers have forms for this on their websites, i.e. Google, Yahoo,
Hotmail, etc.

As a general rule, if you're sending legitimate bulk or other high
volume mail, not spam, receivers are willing to work with you.  Why?
Their users who pay their bills signed up for the mail you're sending
and they need to keep those users happy.

--
Stan


Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Noel Jones-2
On 8/14/2013 7:14 AM, Philippe Bloix wrote:
> Thanks for your response
>  
> I'm not a spammer :-), i'm working in a telecom firm where we send
> emails to our customers.
> In fact, it's not easy to contact  some receivers who is rate
> limiting, then in theses cases the goal is to reduce the rate per
> sec (about 10 mails per domain per sec);

Sending one mail per second will deliver over 1000 messages in 20
minutes.  If you need a higher rate than that, contact the receiver
for whitelisting.


> i'm astonished that postfix
> (without addons) is not allowed to do that but at best  only 1 mail
> per domain per sec.

Despite the misunderstanding of others, no policy service can limit
output. If something causes output to stall while the input is still
running, the destination will be flooded when output starts running
again. Maybe that's "close enough" for some purposes.

A working solution would be multiple postfix delivery instances,
each sending 1 message per second, fed round-robin from the main
postfix. Working, but unappetizing.

But really, if 1 message per second is not sufficient, contact the
receiver for whitelisting.


  -- Noel Jones
Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Stan Hoeppner
In reply to this post by Philippe Bloix
On 8/14/2013 7:14 AM, Philippe Bloix wrote:
> Thanks for your response
>
> I'm not a spammer :-), i'm working in a telecom firm where we send emails
> to our customers.

Ok, so you're a telecom company and the receivers in question are your
customers.

> In fact, it's not easy to contact  some receivers who is rate limiting,

So even though the receivers are your customers, it's "not easy to
contact them"?  So you're telling us you do not have contact information
on file for your customers.  How do you bill them for your services?
And yet you want to email addresses at said customer domains at a rate
of 10/sec.  Obviously you do have a way of contacting them, yes?  What
type of emails are you sending your customers whom you're unable to
contact, that require such a rate as to prompt them to rate limit you?

> then in theses cases the goal is to reduce the rate per sec (about 10 mails
> per domain per sec);

You're a "telecom firm".  You're flooding your CUSTOMERS, whom you are
not able to "easily" contact.  They are rate limiting you due to the
flood of mail.  So instead of contacting them to work this out, you
instead want to circumvent their rate limiting.

Sorry "Philippe" but I'm calling BS on this.  Nothing you've said here
makes any sense.  Nobody floods their own customers to the point that
said customers enable rate limits.  They'd contact you first before
enabling limits, yet you claim it's "not easy" to contact them.

All of this is doubletalk Bull$hit.

> i'm astonished that postfix (without addons) is not
> allowed to do that but at best  only 1 mail per domain per sec.

Postfix is not a good platform for sending spam.  You should find other
software to do this with.  Maybe botnet rental is a good choice for you.

--
Stan


Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Philippe Bloix
Of course it's easy to contact our customers!
But in some cases, it can be difficult to contact the mail provider of our customers in order to ask to belong to their whitelist...
 
PB

2013/8/14 Stan Hoeppner <[hidden email]>
On 8/14/2013 7:14 AM, Philippe Bloix wrote:
> Thanks for your response
>
> I'm not a spammer :-), i'm working in a telecom firm where we send emails
> to our customers.

Ok, so you're a telecom company and the receivers in question are your
customers.

> In fact, it's not easy to contact  some receivers who is rate limiting,

So even though the receivers are your customers, it's "not easy to
contact them"?  So you're telling us you do not have contact information
on file for your customers.  How do you bill them for your services?
And yet you want to email addresses at said customer domains at a rate
of 10/sec.  Obviously you do have a way of contacting them, yes?  What
type of emails are you sending your customers whom you're unable to
contact, that require such a rate as to prompt them to rate limit you?

> then in theses cases the goal is to reduce the rate per sec (about 10 mails
> per domain per sec);

You're a "telecom firm".  You're flooding your CUSTOMERS, whom you are
not able to "easily" contact.  They are rate limiting you due to the
flood of mail.  So instead of contacting them to work this out, you
instead want to circumvent their rate limiting.

Sorry "Philippe" but I'm calling BS on this.  Nothing you've said here
makes any sense.  Nobody floods their own customers to the point that
said customers enable rate limits.  They'd contact you first before
enabling limits, yet you claim it's "not easy" to contact them.

All of this is doubletalk Bull$hit.

> i'm astonished that postfix (without addons) is not
> allowed to do that but at best  only 1 mail per domain per sec.

Postfix is not a good platform for sending spam.  You should find other
software to do this with.  Maybe botnet rental is a good choice for you.

--
Stan



Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Stan Hoeppner
On 8/14/2013 10:12 AM, Philippe Bloix wrote:
> Of course it's easy to contact our customers!
> But in some cases, it can be difficult to contact the mail provider of our
> customers in order to ask to belong to their whitelist...

If this is truly the case and this is legitimate transactional mail,
then contacting the receiving organizations is the proper way to go
about this.  But since this is difficult, there are some other things
you can try before implementing a multi-instance or multi-host relay
farm.  For instance, setting

smtp_destination_concurrency_limit

to a low value.  The default value is that of

default_destination_concurrency_limit (default: 20)

Decreasing parallel connections will decrease your msg rate.  Start with
a value of 2 and see if that works, and if delivery rate is acceptable
to you.  If yes, and no, increase by 2 until you hit rate limiting at
the receivers or you find the msg rate acceptable.  If you run into rate
limiting, decrease by two, and keep the resulting value.

Receivers may also be rejecting you for delivering too many
recipients/msg, not purely inbound msg or connection rate, if they count
total recipients delivered instead of msgs accepted by smtpd.  So you
can try lowering the value of

smtp_destination_recipient_limit

to 25, lower if necessary.  The default value is that of

default_destination_recipient_limit (default: 50)

Do NOT set this value lower than 2.  See the postconf (5) entry for why.

By tweaking the two values above it should be possible to avoid your
rate limiting problem but without dropping delivery rate all the way
down to 1/sec.  The above are global settings.  You can also do this on
a per receiving domain basis by using a transport table and a
corresponding custom master.cf message delivery transport.

See:

http://www.postfix.org/postconf.5.html#transport_destination_concurrency_limit

http://www.postfix.org/postconf.5.html#transport_destination_recipient_limit

--
Stan

Reply | Threaded
Open this post in threaded view
|

Re: How to send more than 1 email per sec per domain?

Wietse Venema
In reply to this post by Philippe Bloix
Philippe Bloix:
> In fact, it's not easy to contact  some receivers who is rate limiting,
> then in theses cases the goal is to reduce the rate per sec (about 10 mails
> per domain per sec); i'm astonished that postfix (without addons) is not
> allowed to do that but at best  only 1 mail per domain per sec.

First, 1 message/second is almost 100 thousand a day. If you need
to be able to send more, then you need to make arrangements with the
receivers regardless of how Postfix implements outbound rate limits.

Second, what leads you to believe that 0.1s rate delay would improve
mail deliveries? I would not be surprised if some people were talking
bullshit just to get you off their back.

        Wietse