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

qmail-send concurrency limit by recipient IP

147 views
Skip to first unread message

Paspao

unread,
Mar 30, 2011, 6:20:24 AM3/30/11
to
Hello,

I'm using netqmail 1.06 to send mailing from a web application.

As you know some big ISP refuse too many mail sent at the same time from the same server to many users of their domain. This results in delays in delivery or being blacklisted.

I need a simple solution or at least well documented ( I'm a newbie in patching and compiling ) to limit concurrent deliveries to the same SMTP.

I found qmail-send-concurrencyperip.patch by Joshua Megerman but was written for netqmail 1.05.

I could lower concurrencyremote , but I think it is a too much performances limiting solution.

Thank you
Bye
Paolo
--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-...@muc.de

Joshua Megerman

unread,
Mar 30, 2011, 7:46:40 AM3/30/11
to
On Wednesday, March 30, 2011 06:20:24 am Paspao wrote:
> Hello,
>
> I'm using netqmail 1.06 to send mailing from a web application.
>
> As you know some big ISP refuse too many mail sent at the same time from
> the same server to many users of their domain. This results in delays in
> delivery or being blacklisted.
>
> I need a simple solution or at least well documented ( I'm a newbie in
> patching and compiling ) to limit concurrent deliveries to the same SMTP.
>
> I found qmail-send-concurrencyperip.patch by Joshua Megerman but was
> written for netqmail 1.05.
>
The only difference between netqmail 1.05 and netqmail 1.06 is the license
(you'd know that if you read the netqmail changelog). There's no reason why
you can't use my patch for netqmail 1.06 if you want to.

Josh
--
Joshua Megerman
SJGames MIB #5273 - OGRE AI Testing Division
You can't win; You can't break even; You can't even quit the game.
- Layman's translation of the Laws of Thermodynamics
qm...@honorablemenschen.com

Andy Bradford

unread,
Apr 1, 2011, 12:10:40 AM4/1/11
to
Thus said Paspao on Wed, 30 Mar 2011 12:20:24 +0200:

> I need a simple solution or at least well documented ( I'm a newbie in
> patching and compiling ) to limit concurrent deliveries to the same
> SMTP.

serialmail is pretty simple and doesn't require patching of qmail.

http://cr.yp.to/serialmail.html

Andy

Paspao

unread,
Apr 6, 2011, 3:18:52 AM4/6/11
to
Thank you Andy.

I did not find any serialmail usage example.

So I should send to a local maildir all mail for a specific domain and then use serialmail to send mail from maildir to remote SMTP ?

Could some one post an example configuration with the involved control files?

Thank you
P.



Il giorno 01/apr/2011, alle ore 06.10, Andy Bradford ha scritto:

> Thus said Paspao on Wed, 30 Mar 2011 12:20:24 +0200:
>

>> I need a simple solution or at least well documented ( I'm a newbie in
>> patching and compiling ) to limit concurrent deliveries to the same
>> SMTP.
>

> serialmail is pretty simple and doesn't require patching of qmail.
>
> http://cr.yp.to/serialmail.html
>
> Andy
>

Andy Bradford

unread,
Apr 7, 2011, 1:20:36 AM4/7/11
to
Thus said Paspao on Wed, 06 Apr 2011 09:18:52 +0200:

> I did not find any serialmail usage example.

They are in the serialmail package once installed. Look at the files
with all CAPS filenames. There are also man pages.

> So I should send to a local maildir all mail for a specific domain and
> then use serialmail to send mail from maildir to remote SMTP ?

That's the general idea, yes.

Place the domain in question in control/virtualdomains with an
instruction to deliver to a local user/Maildir. If you are using the
domain user for that you could do:

domain.dom:domain

Then create ~domain/.qmail-default and instruct it to deliver emails to
./Maildir/

Then create a script that runs as that user that looks something like:

#!/bin/sh
PATH=$PATH:/usr/local/bin:/var/qmail/bin
exec maildirsmtp /home/domain/Maildir domain- ip.of.mx.for.domain `test -e /var/qmail/control/helohost && cat /var/qmail/control/helohost || cat /var/qmail/control/me`

If you wanted to get clever you could call a program that would pick the
best MX in place of ip.of.mx.for.domain. Something like:

dnsmxip domain.dom | cut -d" " -f1 | head -1

You might want to make it a little more robust though and actually check
for a DNS error condition with dnsmxip. By the way, dnsmxip comes with
qmail but it isn't installed by default.

Then, simply run this script from a cronjob on whatever frequency you
determine is best to attempt deliveries to this domain.

Andy

Markus Stumpf

unread,
May 20, 2011, 6:44:44 AM5/20/11
to
On Wed, Apr 06, 2011 at 11:20:36PM -0600, Andy Bradford wrote:
> Then create a script that runs as that user that looks something like:
> [ ... ]
> Then, simply run this script from a cronjob on whatever frequency you
> determine is best to attempt deliveries to this domain.

Sorry to jump in late ...
You might also want to use some locking.
The daemontools package has a setlock program that comes handy.

\Maex

--
Markus Stumpf

0 new messages