Re: faster than bcc

2001-03-30 Thread Peter van Dijk

On Thu, Mar 29, 2001 at 09:55:06AM -0500, Dave Sill wrote:
[snip]
> 
> Yeah, don't know what I was thinking. But I see another problem with
> that command: it's feeding the list of recipients to xargs via stdin
> and the message to qmail-inject, also via stdin. In my testing, xargs
> is reading the message as stdin and calling qmail-inject with the
> message contents on the command line. Oops.

Good thinking. I think you're right :)

Greetz, Peter.



Re: faster than bcc

2001-03-29 Thread Dave Sill

Charles Cazabon <[EMAIL PROTECTED]> wrote:

>Dave Sill <[EMAIL PROTECTED]> wrote:
>
>> >cat list.txt | xargs qmail-inject -a > >where list.txt is a list of addresses. Is this faster than bcc
>> >anyway?
> 
>> No. That creates one message per recipient--lots of disk I/O to do the
>> same thing as one message, many recipients.
>
>That should still do only one message, multiple recipients, shouldn't it?

Yeah, don't know what I was thinking. But I see another problem with
that command: it's feeding the list of recipients to xargs via stdin
and the message to qmail-inject, also via stdin. In my testing, xargs
is reading the message as stdin and calling qmail-inject with the
message contents on the command line. Oops.

-Dave



RE: faster than bcc

2001-03-28 Thread Brett

Thank you everyone for your input. I know now that I'm on the right track
with bcc.

-Original Message-
From: Charles Cazabon [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 2:26 PM
To: [EMAIL PROTECTED]
Subject: Re: faster than bcc


Dave Sill <[EMAIL PROTECTED]> wrote:

> >cat list.txt | xargs qmail-inject -a  >where list.txt is a list of addresses. Is this faster than bcc
> >anyway?

> No. That creates one message per recipient--lots of disk I/O to do the
> same thing as one message, many recipients.

That should still do only one message, multiple recipients, shouldn't it?
Until, of course, the arg list becomes long enough for xargs to break it
down to 2 serial injections.

Charles
--
---
Charles Cazabon<[EMAIL PROTECTED]>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---




Re: faster than bcc

2001-03-28 Thread Charles Cazabon

Dave Sill <[EMAIL PROTECTED]> wrote:

> >cat list.txt | xargs qmail-inject -a  >where list.txt is a list of addresses. Is this faster than bcc
> >anyway?
 
> No. That creates one message per recipient--lots of disk I/O to do the
> same thing as one message, many recipients.

That should still do only one message, multiple recipients, shouldn't it?
Until, of course, the arg list becomes long enough for xargs to break it
down to 2 serial injections.

Charles
-- 
---
Charles Cazabon<[EMAIL PROTECTED]>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---



RE: faster than bcc

2001-03-28 Thread Brett

Mark, you rule. This has been a tremendous help. Thanks a lot.

Brett.

-Original Message-
From: Mark Delany [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, March 28, 2001 1:45 PM
To: Brett
Cc: [EMAIL PROTECTED]
Subject: Re: faster than bcc


On Wed, Mar 28, 2001 at 12:47:25PM -0800, Brett wrote:
> I remember reading that the fastest way to send one email to a large
number
> of people is through bcc.

Well, the fact that it's Bcc: vs To: is not important wrt speed. The
reason for Bcc: over To: is to ensure that the recipient list isn't
visible to the recipients. That might have privacy implications and it
will certain have mail size implications with a million recipients!

> This was helpful to me because I'm not able to use
> a mailing list since the addresses I send to will be pulled dynamically
from
> a database which is always changing. But somehow, populating the Bcc:
field
> with a million names seems like it might not be the best idea to me. I
> understand qmail deletes this field before sending the message out but I'm
> more concerned with whether or not it will be making efficient use of the
> queue.

The performance gain comes from sending one mail with lots of
recipients. Those recipients traditionally are placed on Bcc: lines.

> Is the queue even used for one message sent to numerous people or is
> it only used for separate messages?

Both. The queue is *always* involved. However, one message with lots
of recipients creates much less work than lots of messages with one
recipient each - that's the key.

> If there's a better method than Bcc:-ing everyone, I'm very open to
> hearing it.

Not particularly. Some suggest usig qmail-queue directly (which
qmail-inject calls), but the interface is more difficult and the cost
saving is too small to measure for a large recipient list.

> One suggestion I got but which I
> can't get to work is:
> cat list.txt | xargs qmail-inject -a  where list.txt is a list of addresses. Is this faster than Bcc: anyway?
Any
> help much appreciated.

In what way can't you get it to work?

I would not use the xargs approach as that makes the recipients
visible and it is also less efficient than this:

( sed 's/^/Bcc: /' 


Re: faster than bcc

2001-03-28 Thread Mark Delany

On Wed, Mar 28, 2001 at 12:47:25PM -0800, Brett wrote:
> I remember reading that the fastest way to send one email to a large number
> of people is through bcc.

Well, the fact that it's Bcc: vs To: is not important wrt speed. The
reason for Bcc: over To: is to ensure that the recipient list isn't
visible to the recipients. That might have privacy implications and it
will certain have mail size implications with a million recipients!

> This was helpful to me because I'm not able to use
> a mailing list since the addresses I send to will be pulled dynamically from
> a database which is always changing. But somehow, populating the Bcc: field
> with a million names seems like it might not be the best idea to me. I
> understand qmail deletes this field before sending the message out but I'm
> more concerned with whether or not it will be making efficient use of the
> queue.

The performance gain comes from sending one mail with lots of
recipients. Those recipients traditionally are placed on Bcc: lines.

> Is the queue even used for one message sent to numerous people or is
> it only used for separate messages?

Both. The queue is *always* involved. However, one message with lots
of recipients creates much less work than lots of messages with one
recipient each - that's the key.

> If there's a better method than Bcc:-ing everyone, I'm very open to
> hearing it.

Not particularly. Some suggest usig qmail-queue directly (which
qmail-inject calls), but the interface is more difficult and the cost
saving is too small to measure for a large recipient list.

> One suggestion I got but which I
> can't get to work is:
> cat list.txt | xargs qmail-inject -a  where list.txt is a list of addresses. Is this faster than Bcc: anyway? Any
> help much appreciated.

In what way can't you get it to work?

I would not use the xargs approach as that makes the recipients
visible and it is also less efficient than this:

( sed 's/^/Bcc: /' 


Re: faster than bcc

2001-03-28 Thread Dave Sill

"Brett" <[EMAIL PROTECTED]> wrote:

>I remember reading that the fastest way to send one email to a large number
>of people is through bcc. This was helpful to me because I'm not able to use
>a mailing list since the addresses I send to will be pulled dynamically from
>a database which is always changing. But somehow, populating the bcc field
>with a million names seems like it might not be the best idea to me. I
>understand qmail deletes this field before sending the message out but I'm
>more concerned with whether or not it will be making efficient use of the
>queue.

Yes, that's efficient.

>Is the queue even used for one message sent to numerous people or is
>it only used for separate messages?

All messages sent using qmail queued.

>If there's a better method than bcc-ing
>everyone, I'm very open to hearing it. One suggestion I got but which I
>can't get to work is:
>cat list.txt | xargs qmail-inject -a where list.txt is a list of addresses. Is this faster than bcc
>anyway?

No. That creates one message per recipient--lots of disk I/O to do the
same thing as one message, many recipients.

-Dave



Re: faster than bcc

2001-03-28 Thread Peter van Dijk

On Wed, Mar 28, 2001 at 12:47:25PM -0800, Brett wrote:
> I remember reading that the fastest way to send one email to a large number
> of people is through bcc. This was helpful to me because I'm not able to use
> a mailing list since the addresses I send to will be pulled dynamically from
> a database which is always changing. But somehow, populating the bcc field
> with a million names seems like it might not be the best idea to me. I
> understand qmail deletes this field before sending the message out but I'm
> more concerned with whether or not it will be making efficient use of the
> queue. Is the queue even used for one message sent to numerous people or is
> it only used for separate messages? If there's a better method than bcc-ing
> everyone, I'm very open to hearing it. One suggestion I got but which I
> can't get to work is:
> cat list.txt | xargs qmail-inject -a  where list.txt is a list of addresses. Is this faster than bcc anyway? Any
> help much appreciated.

Bcc is indeed efficient, because it only injects one message into the
queue.

The xargs method is quite efficient, but not as efficient as the Bcc
trick. Note too that the Bcc trick is only guaranteed to work reliably
when used with qmail-inject.

Greetz, Peter.



Re: faster than bcc

2001-03-28 Thread Charles Cazabon

Brett <[EMAIL PROTECTED]> wrote:
> I remember reading that the fastest way to send one email to a large number
> of people is through bcc.

It's faster than injecting a separate message for each recipient.  As you
suspected, bcc'ing the recipients on one message means only one message
in the queue, with the consequent savings on queue disk bandwidth.

Charles
-- 
---
Charles Cazabon<[EMAIL PROTECTED]>
GPL'ed software available at:  http://www.qcc.sk.ca/~charlesc/software/
Any opinions expressed are just that -- my opinions.
---