I've wrote a relatively simple perl script to extract the data
from my db and create the customized messages, sorted be recipient
domains. I then put each message into the sendmail queue, one at
a time, like this:
open(MAIL, "| /usr/lib/sendmail -O DeliveryMode=d -t -i -U");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Reply-to: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "Date: $gmt\n";
print MAIL "\n$message";
close(MAIL);
Questions:
1. I'm using delivery mode "d", for no dns lookups. Is there any
reason I'd want to use DNS lookups? I assume that sendmail just
wont send the message if the DNS lookup fails?
2. Is there a limit on the size of the queue? If so, how do you
set that?
3. How does sendmail handle the queued messages? If I load 20K
messages into the queue in one shot, will sendmail try to process
them all at once too? How is this regulated? Does sendmail
process each message with a new process and then limit the max
number of concurrent processes, kinda like how apache works?
I just dont want to bring my server down!
4. Basically, I'm looking for any insight on how sendmail will handle
this, or any suggestions about how to optimize this sendmail process.
Many thanks for any insight from the sendmail guru's!!
Rob
> I've got about 20K users that I need to send customized messages
> regarding their accounts on a regular basis.
>
> I've wrote a relatively simple perl script to extract the data
> from my db and create the customized messages, sorted be recipient
> domains. I then put each message into the sendmail queue, one at
> a time, like this:
>
> open(MAIL, "| /usr/lib/sendmail -O DeliveryMode=d -t -i -U");
> print MAIL "To: $to\n";
> print MAIL "From: $from\n";
> print MAIL "Reply-to: $from\n";
> print MAIL "Subject: $subject\n";
> print MAIL "Date: $gmt\n";
> print MAIL "\n$message";
> close(MAIL);
>
> Questions:
>
> 1. I'm using delivery mode "d", for no dns lookups. Is there any
> reason I'd want to use DNS lookups? I assume that sendmail just
> wont send the message if the DNS lookup fails?
DNS lookup may take "some" time, typical DNS time-out is 75s.
It usually takes much less time but sometimes...
> 2. Is there a limit on the size of the queue? If so, how do you
> set that?
AFAIK there is no limit but 40000 files (2 per message)
in one directory breaks file system performance on
many OSes.
> 3. How does sendmail handle the queued messages? If I load 20K
> messages into the queue in one shot, will sendmail try to process
> them all at once too? How is this regulated? Does sendmail
> process each message with a new process and then limit the max
> number of concurrent processes, kinda like how apache works?
> I just dont want to bring my server down!
If you put them with -O DeliveryMode=d (-odd) they will be
send at next queue run by a few sendmail processes.
> 4. Basically, I'm looking for any insight on how sendmail will handle
> this, or any suggestions about how to optimize this sendmail process.
--
Andrzej (Andrew) A. Filip http://bigfoot.com/~anfi
an...@bigfoot.com an...@polbox.com an...@sdf.lonestar.org
Postings: http://deja.com/profile.xp?author=Andrzej%20Filip