Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

"You tweachewous miscweant!" -- Elmer Fudd


computers / comp.mail.sendmail / Re: Fastest way to inject a lot of mail?

SubjectAuthor
* Fastest way to inject a lot of mail?John Levine
+- Re: Fastest way to inject a lot of mail?Grant Taylor
+* Re: Fastest way to inject a lot of mail?Marco Moock
|`* Re: Fastest way to inject a lot of mail?John Levine
| `* Re: Fastest way to inject a lot of mail?HQuest
|  `* Re: Fastest way to inject a lot of mail?Claus Aßmann
|   `* Re: Fastest way to inject a lot of mail?HQuest
|    `- Re: Fastest way to inject a lot of mail?Claus Aßmann
+- Re: Fastest way to inject a lot of mail?Grant Taylor
`* Re: Fastest way to inject a lot of mail?Claus Aßmann
 `* Re: Fastest way to inject a lot of mail?John Levine
  +* Re: Fastest way to inject a lot of mail?Grant Taylor
  |`* Re: Fastest way to inject a lot of mail?John Levine
  | +- Re: Fastest way to inject a lot of mail?Grant Taylor
  | `* Re: Fastest way to inject a lot of mail?Claus Aßmann
  |  `- Re: Fastest way to inject a lot of mail?John Levine
  +- Re: Fastest way to inject a lot of mail?Andrzej Adam Filip
  `- Re: Fastest way to inject a lot of mail?Claus Aßmann

1
Fastest way to inject a lot of mail?

<us8204$2viu$1@gal.iecc.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1949&group=comp.mail.sendmail#1949

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: johnl@taugh.com (John Levine)
Newsgroups: comp.mail.sendmail
Subject: Fastest way to inject a lot of mail?
Date: Tue, 5 Mar 2024 21:14:44 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <us8204$2viu$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Tue, 5 Mar 2024 21:14:44 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="97886"; mail-complaints-to="abuse@iecc.com"
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Tue, 5 Mar 2024 21:14 UTC

One of my clients has an application that builds several hundred customized
messages reporting what changed in the past day, and sends each one to a
list of people who have subscribed to it. (This isn't spam, they complain
when they don't get it.)

We currently send the mail by putting all the recipients on the bcc:
line and running /usr/sbin/sendmail -t and feeding it the message
through a pipe. By the time all the messages are done this takes a
while. Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: Fastest way to inject a lot of mail?

<us8h1o$3cd$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1950&group=comp.mail.sendmail#1950

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.omega.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Tue, 5 Mar 2024 19:31:36 -0600
Organization: TNet Consulting
Message-ID: <us8h1o$3cd$1@tncsrv09.home.tnetconsulting.net>
References: <us8204$2viu$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 6 Mar 2024 01:31:36 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="omega.home.tnetconsulting.net:198.18.1.140";
logging-data="3469"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <us8204$2viu$1@gal.iecc.com>
 by: Grant Taylor - Wed, 6 Mar 2024 01:31 UTC

Hi John,

On 3/5/24 15:14, John Levine wrote:
> One of my clients has an application that builds several hundred
> customized messages reporting what changed in the past day, and sends
> each one to a list of people who have subscribed to it. (This isn't
> spam, they complain when they don't get it.)

;-)

> We currently send the mail by putting all the recipients on the bcc:
> line and running /usr/sbin/sendmail -t and feeding it the message
> through a pipe. By the time all the messages are done this takes a
> while. Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?

Please clarify -- I'm trying to understand / confirm -- are sending
multiple envelope recipients per customized report? Or are you sending
individual messages per recipient?

Also, what delivery mode are you using? Queued / interactive? (That
might not be the proper nomenclature.)

--
Grant. . . .

Re: Fastest way to inject a lot of mail?

<us9eba$aiki$1@dont-email.me>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1951&group=comp.mail.sendmail#1951

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: mm+usenet-es@dorfdsl.de (Marco Moock)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Wed, 6 Mar 2024 10:51:37 +0100
Organization: A noiseless patient Spider
Lines: 17
Message-ID: <us9eba$aiki$1@dont-email.me>
References: <us8204$2viu$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Injection-Date: Wed, 6 Mar 2024 09:51:38 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="ee0792b6ed937d91dae7bef974a0daa2";
logging-data="346770"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/Hb2nrtxY8Xeu48qGA5wO0"
Cancel-Lock: sha1:0B9lVYE/J/05rHh7sZGdJPXUwHE=
 by: Marco Moock - Wed, 6 Mar 2024 09:51 UTC

On 05.03.2024 um 21:14 Uhr John Levine wrote:

> We currently send the mail by putting all the recipients on the bcc:
> line and running /usr/sbin/sendmail -t and feeding it the message
> through a pipe. By the time all the messages are done this takes a
> while. Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?

Can you find the reason for that?
You can check the logs when the mail from the MSP reached the MTA.
Are milters in use?

--
kind regards
Marco

Send spam to 1709669684muell@cartoonies.org

Re: Fastest way to inject a lot of mail?

<usalen$1a5$1@gal.iecc.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1952&group=comp.mail.sendmail#1952

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: johnl@taugh.com (John Levine)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Wed, 6 Mar 2024 20:59:04 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <usalen$1a5$1@gal.iecc.com>
References: <us8204$2viu$1@gal.iecc.com> <us9eba$aiki$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 6 Mar 2024 20:59:04 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="1349"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <us8204$2viu$1@gal.iecc.com> <us9eba$aiki$1@dont-email.me>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Wed, 6 Mar 2024 20:59 UTC

It appears that Marco Moock <mm+usenet-es@dorfdsl.de> said:
>On 05.03.2024 um 21:14 Uhr John Levine wrote:
>
>> We currently send the mail by putting all the recipients on the bcc:
>> line and running /usr/sbin/sendmail -t and feeding it the message
>> through a pipe. By the time all the messages are done this takes a
>> while. Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?
>
>Can you find the reason for that?

Yeah, because it's doing a lot of work sending tens of thousands of
messages. There's no milters on the system where they're injected.
They go through a smarthost with a DKIM signing milter but it seems
plenty fast.

In answer to another question, the number of recipients per message
varies but is typically between 10 and 50. At some point we should
redo it to do individual deliveries so we can customize them more
but not any time soon.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: Fastest way to inject a lot of mail?

<usb5b9$4qa$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1953&group=comp.mail.sendmail#1953

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.omega.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Wed, 6 Mar 2024 19:30:17 -0600
Organization: TNet Consulting
Message-ID: <usb5b9$4qa$1@tncsrv09.home.tnetconsulting.net>
References: <us8204$2viu$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Thu, 7 Mar 2024 01:30:17 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="omega.home.tnetconsulting.net:198.18.1.140";
logging-data="4938"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <us8204$2viu$1@gal.iecc.com>
 by: Grant Taylor - Thu, 7 Mar 2024 01:30 UTC

On 3/5/24 15:14, John Levine wrote:
> By the time all the messages are done this takes a while.

Please quantify "all the messages" and "takes a while".

How many messages (SMTP envelopes)?

How long does it take (seconds / minutes / hours / days)?

--
Grant. . . .

Re: Fastest way to inject a lot of mail?

<usblhb$vuu$1@news.misty.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1954&group=comp.mail.sendmail#1954

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Thu, 7 Mar 2024 01:06:35 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <usblhb$vuu$1@news.misty.com>
References: <us8204$2viu$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Thu, 7 Mar 2024 06:06:35 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="32734"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Thu, 7 Mar 2024 06:06 UTC

John Levine wrote:

> Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?

First you need to identify the bottleneck(s),
then you can work on solutions.

BTW: did you read the fine documentation?
(hint: "TUNING"...)

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: Fastest way to inject a lot of mail?

<99e62c2b98ba555ae362b54fff8ff3c4@www.novabbs.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1955&group=comp.mail.sendmail#1955

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!.POSTED!not-for-mail
From: hquest@hquest.pro.br (HQuest)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 00:59:38 +0000
Organization: novaBBS
Message-ID: <99e62c2b98ba555ae362b54fff8ff3c4@www.novabbs.com>
References: <us8204$2viu$1@gal.iecc.com> <us9eba$aiki$1@dont-email.me> <usalen$1a5$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="1235822"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 3d3517e5dd24387fdf8da64199401ea731577ab2
X-Rslight-Site: $2y$10$S21ijB2uAQbIp2ckE6FGYeEt/vDlVaHoHwchE8CN.O2KPN.fkhQSO
 by: HQuest - Fri, 8 Mar 2024 00:59 UTC

Aside of the recommended "Tuning" by Claus, your workflow the way I read felt inefficient. You prep the mail, fire up a sendmail MSA instance (just to wrap the message with proper mail headers), handle to another sendmail MTA or whatever (to add DKIM headers) and move it forward... if you already have a trusted MTA elsewhere, why don't you just deliver the message right into that MTA via the application itself?

If you are lazy (as I am), a rudimentary, poorly written, very insecure and extremely lazy bash script can do the job:
echo ${mail_message_complete_with_envelope_headers_and_ehlo} > /dev/tcp/$smtpsrv/$smtpport

Assuming you trust it enough to cut the authentication and StartTLS pieces to save precious CPU cycles. The DKIM header will still be added by the MTA, but by not spinning multiple MSAs which, combined with its dynamic libraries, you save quite some time to get messages moving.

Or if you really want to use sendmail as MSA because authentication/TLS/reasons, keep one running, and deliver the email message to it via TCP/IP. A fork() is always much faster than a full load.

Re: Fastest way to inject a lot of mail?

<use84l$4uq$1@news.misty.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1956&group=comp.mail.sendmail#1956

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 00:36:21 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <use84l$4uq$1@news.misty.com>
References: <us8204$2viu$1@gal.iecc.com> <us9eba$aiki$1@dont-email.me> <usalen$1a5$1@gal.iecc.com> <99e62c2b98ba555ae362b54fff8ff3c4@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 05:36:21 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="5082"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Fri, 8 Mar 2024 05:36 UTC

HQuest wrote:

> echo ${mail_message_complete_with_envelope_headers_and_ehlo} >
> /dev/tcp/$smtpsrv/$smtpport

That might fail due to "unauthorized PIPELINING".

Re: Fastest way to inject a lot of mail?

<bc2809f5d1d98cbe112fc768034be39d@www.novabbs.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1957&group=comp.mail.sendmail#1957

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!.POSTED!not-for-mail
From: hquest@hquest.pro.br (HQuest)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 12:48:58 +0000
Organization: novaBBS
Message-ID: <bc2809f5d1d98cbe112fc768034be39d@www.novabbs.com>
References: <us8204$2viu$1@gal.iecc.com> <us9eba$aiki$1@dont-email.me> <usalen$1a5$1@gal.iecc.com> <99e62c2b98ba555ae362b54fff8ff3c4@www.novabbs.com> <use84l$4uq$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
logging-data="1290684"; mail-complaints-to="usenet@i2pn2.org";
posting-account="t+lO0yBNO1zGxasPvGSZV1BRu71QKx+JE37DnW+83jQ";
User-Agent: Rocksolid Light
X-Spam-Checker-Version: SpamAssassin 4.0.0
X-Rslight-Posting-User: 3d3517e5dd24387fdf8da64199401ea731577ab2
X-Rslight-Site: $2y$10$YSzTO/Nq0mroQawqt1RhOOgerjkZNxCEJoGTwIGiN8ZWuncTuUk0i
 by: HQuest - Fri, 8 Mar 2024 12:48 UTC

Claus Aßmann wrote:
> That might fail due to "unauthorized PIPELINING".

My cron scripts and/or sendmail.cf would beg to differ, but my point is that it is much superior to deliver a message to a running MSA/MTA than spinning up a new copy of sendmail for every message to be delivered.

Re: Fastest way to inject a lot of mail?

<usfr0r$2vd$1@news.misty.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1958&group=comp.mail.sendmail#1958

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 15:04:43 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <usfr0r$2vd$1@news.misty.com>
References: <us8204$2viu$1@gal.iecc.com> <99e62c2b98ba555ae362b54fff8ff3c4@www.novabbs.com> <use84l$4uq$1@news.misty.com> <bc2809f5d1d98cbe112fc768034be39d@www.novabbs.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Fri, 8 Mar 2024 20:04:43 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="3053"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Fri, 8 Mar 2024 20:04 UTC

HQuest wrote:
> Claus Aßmann wrote:
> > That might fail due to "unauthorized PIPELINING".

> My cron scripts and/or sendmail.cf would beg to differ, but my point is

Do you run 8.18? Did you disable the extra checks?
What happens if your MTA is "too busy" (421) or replies with some
error to one of the commands?

> that it is much superior to deliver a message to a running MSA/MTA than
> spinning up a new copy of sendmail for every message to be delivered.

That might be the case, but AFAICT it does not apply to the way the
OP is submitting mails (a single mail with a large list of recipients).

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: Fastest way to inject a lot of mail?

<usga9o$21st$1@gal.iecc.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1959&group=comp.mail.sendmail#1959

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: johnl@taugh.com (John Levine)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 9 Mar 2024 00:25:28 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <usga9o$21st$1@gal.iecc.com>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 00:25:28 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="67485"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Sat, 9 Mar 2024 00:25 UTC

According to Claus A�mann <INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org>:
>John Levine wrote:
>
>> Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?
>
>First you need to identify the bottleneck(s),
>then you can work on solutions.

Well, yeah, that's why I was wondering whether running the sendmail program
is likely to be slow.

>BTW: did you read the fine documentation?
>(hint: "TUNING"...)

I did and unless I missed something, it says nothing about injecting
mail via the sendmail command other than the obvious thing that you
want to queue rather than delivering synchronously.

So here's a question: I have on the order of 10,000 messages, each
with a dozen or so recipients. It's currently running the sendmail
command for each one. If I opened a connection to 127.0.0.1 and
did a sequence of MAIL FROM/RCPT TO/DATA, would that be faster? How
about if I did it with N processes in parallel for some modest N? It
currently takes about 6 hours on a moderately fast VPS.

If nobody has any idea, OK, but it's hard to believe I'm the first person
ever to wonder about this.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: Fastest way to inject a lot of mail?

<usgel6$met$2@tncsrv09.home.tnetconsulting.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1960&group=comp.mail.sendmail#1960

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.omega.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 19:39:50 -0600
Organization: TNet Consulting
Message-ID: <usgel6$met$2@tncsrv09.home.tnetconsulting.net>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com>
<usga9o$21st$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 9 Mar 2024 01:39:50 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="omega.home.tnetconsulting.net:198.18.1.140";
logging-data="23005"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <usga9o$21st$1@gal.iecc.com>
 by: Grant Taylor - Sat, 9 Mar 2024 01:39 UTC

On 3/8/24 18:25, John Levine wrote:
> So here's a question: I have on the order of 10,000 messages, each
> with a dozen or so recipients.

That's quite a few discrete messages.

> It currently takes about 6 hours on a moderately fast VPS.

Rough math, that's a little over 2 seconds per message.

On one hand that seems a little slow, but on the other hand, maybe not.

How big are the messages? There's a big difference if it's a few kB of
text vs multiple MB of attachments.

Depending on the VPS and the disk(s) backing it, I could see how this
may be a disk I/O performance issue. This seems especially germane on a
VPS which is likely shared and may have disk I/O throttling.

I'd suggest looking at this from an OS performance perspective.

If it's Linux, `iostat -x 1` or `sar` or `nmon` are good candidates.

I don't remember, are there any milters in Sendmail?

What are you using for the DNS server? Is it local to the system or are
you dependent on something across the network. If it's across the
network, how far across the network is it?

Are there any errors in any logs?

I would naively think that Sendmail itself could handle messages quite a
bit faster. But I'm probably thinking about SMTP interface vs command
line forking.

--
Grant. . . .

Re: Fastest way to inject a lot of mail?

<usgkgo$2nar$1@gal.iecc.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1961&group=comp.mail.sendmail#1961

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: johnl@taugh.com (John Levine)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 9 Mar 2024 03:19:52 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <usgkgo$2nar$1@gal.iecc.com>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com> <usga9o$21st$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 03:19:52 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="89435"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com> <usga9o$21st$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Sat, 9 Mar 2024 03:19 UTC

According to Grant Taylor <gtaylor@tnetconsulting.net>:
>On 3/8/24 18:25, John Levine wrote:
>> So here's a question: I have on the order of 10,000 messages, each
>> with a dozen or so recipients.
>
>That's quite a few discrete messages.
>
>> It currently takes about 6 hours on a moderately fast VPS.
>
>Rough math, that's a little over 2 seconds per message.
>
>On one hand that seems a little slow, but on the other hand, maybe not.
>
>How big are the messages? There's a big difference if it's a few kB of
>text vs multiple MB of attachments.

Not large, plain text, maybe 10K.

>If it's Linux, `iostat -x 1` or `sar` or `nmon` are good candidates.
>
>I don't remember, are there any milters in Sendmail?

Not on this machine.

>What are you using for the DNS server? Is it local to the system or are
>you dependent on something across the network. If it's across the
>network, how far across the network is it?

I'll have to check but I believe there's a local cache on the LAN. It's
sending it all to a smarthost so I wouldn't expect a lot of DNS traffic.

>Are there any errors in any logs?

No, it all works, just not terribly fast.

>I would naively think that Sendmail itself could handle messages quite a
>bit faster. But I'm probably thinking about SMTP interface vs command
>line forking.

Right. Hey, here's a question: if I injected the mail via SMTP to
127.0.0.1, would that be faster than forking and running sendmail?
Slower? Or am I the first person in sendmail's 35 year history to ask
this question?

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

Re: Fastest way to inject a lot of mail?

<usgl7h$jg3$1@tncsrv09.home.tnetconsulting.net>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1962&group=comp.mail.sendmail#1962

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!tncsrv06.tnetconsulting.net!tncsrv09.home.tnetconsulting.net!.POSTED.omega.home.tnetconsulting.net!not-for-mail
From: gtaylor@tnetconsulting.net (Grant Taylor)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Fri, 8 Mar 2024 21:32:01 -0600
Organization: TNet Consulting
Message-ID: <usgl7h$jg3$1@tncsrv09.home.tnetconsulting.net>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com>
<usga9o$21st$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net>
<usgkgo$2nar$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Sat, 9 Mar 2024 03:32:01 -0000 (UTC)
Injection-Info: tncsrv09.home.tnetconsulting.net; posting-host="omega.home.tnetconsulting.net:198.18.1.140";
logging-data="19971"; mail-complaints-to="newsmaster@tnetconsulting.net"
User-Agent: Mozilla Thunderbird
Content-Language: en-US
In-Reply-To: <usgkgo$2nar$1@gal.iecc.com>
 by: Grant Taylor - Sat, 9 Mar 2024 03:32 UTC

On 3/8/24 21:19, John Levine wrote:
> Not large, plain text, maybe 10K.

ACK

> I'll have to check but I believe there's a local cache on the LAN.
> It's sending it all to a smarthost so I wouldn't expect a lot of
> DNS traffic.

I'm inclined to agree with you. But I don't know what type of DNS
queries Sendmail might be doing. I think that a sniffer would answer
that in short order.

> No, it all works, just not terribly fast.

ACK

Have you considered wrapping your call to the sendmail binary in time
and seeing how long things are taking?

Is there a chance that the vast majority are very fast and after some
threshold something slows down considerably for a period of time?

Dare I say it, this is where more data tends to help.

> Right. Hey, here's a question: if I injected the mail via SMTP to
> 127.0.0.1, would that be faster than forking and running sendmail?
> Slower? Or am I the first person in sendmail's 35 year history to
> ask this question?

I would be flabbergasted if you are the first to ask this. I suspect
many -> most that have are not paying attention to this newsgroup to answer.

--
Grant. . . .

Re: Fastest way to inject a lot of mail?

<usgv6b$ehc$1@news.misty.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1963&group=comp.mail.sendmail#1963

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 9 Mar 2024 01:22:03 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <usgv6b$ehc$1@news.misty.com>
References: <us8204$2viu$1@gal.iecc.com> <usga9o$21st$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net> <usgkgo$2nar$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 06:22:03 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="14892"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Sat, 9 Mar 2024 06:22 UTC

John Levine wrote:
> According to Grant Taylor <gtaylor@tnetconsulting.net>:

> >What are you using for the DNS server? Is it local to the system or are

> I'll have to check but I believe there's a local cache on the LAN. It's
> sending it all to a smarthost so I wouldn't expect a lot of DNS traffic.

Seems like a wrong expectation - or did you turn off DNS lookups?
It's explained in the fine documentation mentioned earlier:
* DNS Lookups

If it's one mail with lots of addresses: all of this is done
sequentially in one process - so hopefully all the data is in a
local cache.

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: Fastest way to inject a lot of mail?

<anfi+05a2kyivvf-o396@wp.eu>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1964&group=comp.mail.sendmail#1964

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!eternal-september.org!feeder3.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anfi@onet.eu (Andrzej Adam Filip)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 09 Mar 2024 08:29:22 +0100
Organization: It is for me to know and for you to find out.
Lines: 54
Message-ID: <anfi+05a2kyivvf-o396@wp.eu>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com>
<usga9o$21st$1@gal.iecc.com>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="07f5e9b4280821b0e5dcaf87d54ef269";
logging-data="2335782"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+y6QjFvVvhv6gzD7ixPuII"
Cancel-Lock: sha1:gsgtURZeWhRGfgP03UIy+0Syj8M=
sha1:imUsUar2NROFZrPj74AfcRTD7+I=
 by: Andrzej Adam Filip - Sat, 9 Mar 2024 07:29 UTC

John Levine <johnl@taugh.com> wrote:
> According to Claus A.mann <INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org>:
>>John Levine wrote:
>>
>>> Is there a faster way to do it? SMTP to 127.0.0.1? LMTP?
>>
>>First you need to identify the bottleneck(s),
>>then you can work on solutions.
>
> Well, yeah, that's why I was wondering whether running the sendmail program
> is likely to be slow.
>
>>BTW: did you read the fine documentation?
>>(hint: "TUNING"...)
>
> I did and unless I missed something, it says nothing about injecting
> mail via the sendmail command other than the obvious thing that you
> want to queue rather than delivering synchronously.
>
> So here's a question: I have on the order of 10,000 messages, each
> with a dozen or so recipients. It's currently running the sendmail
> command for each one. If I opened a connection to 127.0.0.1 and
> did a sequence of MAIL FROM/RCPT TO/DATA, would that be faster? How
> about if I did it with N processes in parallel for some modest N? It
> currently takes about 6 hours on a moderately fast VPS.
>
> If nobody has any idea, OK, but it's hard to believe I'm the first person
> ever to wonder about this.

Hints about injecting a few thousand emails to local sendmail:
1. Inject multiple messages via the same SMTP connection
to avoid needles forking of local sendmail processes
2. Group recipients by recipient's domain
to reduce number of outgoing SMTP sessions
3. Use parallel SMTP injections with VERB SMTP command
to avoid merely queuing due to high local system load.
VERB turns on "sequential delivery" with reporting delivery progress
so your parallel submits won't merely put messages to the queue for
later delivery. It may require allowing VERB from 127.0.0.1 *ONLY*.
Start with a few SMTP sessions. Consider slow increase to a few
dozens.

AFAIR Sympa mail list manager provides some useful hints.
Queue fast and send out fast does not mean the same for mass mailing.

Anyway: Expect a few+ surprises from anti-spam measures of receiving
servers, fresh/new surprises *too* . Usenet message short advises
must be incomplete so do expect a few nasty surprises.

About lack of recipes: People tend to avoid providing too easy recipes
also for (incompetent) spammers.

--
[Andrew] Andrzej A. Filip

Re: Fastest way to inject a lot of mail?

<ush759$oag$1@news.misty.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1965&group=comp.mail.sendmail#1965

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!.POSTED.veps.esmtp.org!not-for-mail
From: INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org (Claus Aßmann)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 9 Mar 2024 03:38:01 -0500 (EST)
Organization: MGT Consulting
Sender: <ml+sendmail(-no-copies-please)@esmtp.org>
Message-ID: <ush759$oag$1@news.misty.com>
References: <us8204$2viu$1@gal.iecc.com> <usblhb$vuu$1@news.misty.com> <usga9o$21st$1@gal.iecc.com>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 08:38:01 -0000 (UTC)
Injection-Info: news.misty.com; posting-host="veps.esmtp.org:155.138.203.148";
logging-data="24912"; mail-complaints-to="abuse@misty.com"
Mail-Copies-To: never
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: ca@x2.esmtp.org (Claus Assmann)
 by: Claus Aßmann - Sat, 9 Mar 2024 08:38 UTC

John Levine wrote:

> >(hint: "TUNING"...)

> I did and unless I missed something, it says nothing about injecting

You are looking for an answer to one specific question - but maybe
your question does not address the actual problem?

As others have told you: if you don't know what's "slow", you won't
be able to solve the problem -- except maybe by trying different things.

So you could just try your alternative (one SMTP session, multiple
transactions) to see what happens.

PS: someone once complained that some MTA was slow sending mail
until I asked them about the actual data... which showed their
(outgoing) internet bandwidth was completely used by the MTA (because
they sent one RCPT per TA with "lots" of RCPTs and large mails).
That is, unless you know which bottleneck is actually "hit"
it's hard to tell what to do differently...

--
Note: please read the netiquette before posting. I will almost never
reply to top-postings which include a full copy of the previous
article(s) at the end because it's annoying, shows that the poster
is too lazy to trim his article, and it's wasting the time of all readers.

Re: Fastest way to inject a lot of mail?

<usidrh$2kdq$1@gal.iecc.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1966&group=comp.mail.sendmail#1966

  copy link   Newsgroups: comp.mail.sendmail
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!news.misty.com!news.iecc.com!.POSTED.news.iecc.com!not-for-mail
From: johnl@taugh.com (John Levine)
Newsgroups: comp.mail.sendmail
Subject: Re: Fastest way to inject a lot of mail?
Date: Sat, 9 Mar 2024 19:38:25 -0000 (UTC)
Organization: Taughannock Networks
Message-ID: <usidrh$2kdq$1@gal.iecc.com>
References: <us8204$2viu$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net> <usgkgo$2nar$1@gal.iecc.com> <usgv6b$ehc$1@news.misty.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 9 Mar 2024 19:38:25 -0000 (UTC)
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970";
logging-data="86458"; mail-complaints-to="abuse@iecc.com"
In-Reply-To: <us8204$2viu$1@gal.iecc.com> <usgel6$met$2@tncsrv09.home.tnetconsulting.net> <usgkgo$2nar$1@gal.iecc.com> <usgv6b$ehc$1@news.misty.com>
Cleverness: some
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: johnl@iecc.com (John Levine)
 by: John Levine - Sat, 9 Mar 2024 19:38 UTC

According to Claus A�mann <INVALID_NO_CC_REMOVE_IF_YOU_DO_NOT_POST_ml+sendmail(-no-copies-please)@esmtp.org>:
>> I'll have to check but I believe there's a local cache on the LAN. It's
>> sending it all to a smarthost so I wouldn't expect a lot of DNS traffic.
>
>Seems like a wrong expectation - or did you turn off DNS lookups?
>It's explained in the fine documentation mentioned earlier:
>* DNS Lookups

Ah, it's hiding in the TUNING file. I suppose I can turn off the
canonify stuff. The DNS caches are on the same LAN with ping times
under a millisecond so cache location is not likely to be a problem,
but the addreesses in the list should all be real ones.

Does sendmail really replace CNAMEs in recipient host names? That's
been deprecated for 25 years.

I must say it's pretty impressive that sendmail's internal structure is so
opaque that nobody has any idea whether running the sendmail program is
likely to be faster or slower than TCP submission.

--
Regards,
John Levine, johnl@taugh.com, Primary Perpetrator of "The Internet for Dummies",
Please consider the environment before reading this e-mail. https://jl.ly

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor