[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[vps-mail] Re: sendmail from the command line
- Subject: [vps-mail] Re: sendmail from the command line
- From: Bennett Lanford <benlanford@xxxxxxxxx>
- Date: Tue, 10 Jan 2006 09:57:36 -0700
On 1/10/06, ADNET Ghislain <gadnet@xxxxxxxxxx> wrote:
> Hello to the sendmail guruz :)
>
> i was trying to figure out how to use sendmail from the commmand line to
> send an email with one little thing i want it queued and not sent right
> away (because i use a loop for a lot of emails). i think this is the -O
> QueueOnly like this:
>
> sendmail -t -i -ODeliveryMode=queueonly
>
> am i misleaded or will it do like i think it will, the queue runner
> will pick the mail on the next run right ?
Part of the problem is that sendmail's architecture has changed in the
past couple of releases. Now there are two queues that sendmail uses
(/var/spool/mqueue and /var/spool/clientmqueue). What does it mean to
queue mail with current sendmail?
When you invoke sendmail from the command line in "modern" sendmail,
it calls a set-group-id executable ("safer" than a setuid-rood
executable) that queues the mail in /var/spool/clientmqueue. (Note:
The current sendmail model has interesting similarities with the
Postfix and qmail models!!). The mail submission daemon then reads
queued mail from /var/spool/clientmqueue and initiates an SMTP session
with the sendmail mail-transfer-agent (MTA) daemon, which is listening
on localhost port 25. As the sendmail MTA receives e-mail from the
submission daemon, it may queue the mail in /var/spool/mqueue (the way
"old" sendmail used to).
I'm not certain, but is it possible that when you invoke sendmail with
a queue-only option from the command line, it dutifully obeys (placing
it in /var/spool/clientmqueue), then--not knowing any better--the
submission daemon (sensing something queued in
/var/spool/clientmqueue) dutifully reads the mail, opens an SMTP
session with the MTA daemon on localhost:25, and ... (finally) the
mail is sent?
I'm not certain what (exactly) you need to do to have
command-line-submitted e-mail queue for awhile ... but you see the
issues. I suspect that--if you decide exactly where you want the mail
to be queued--you will will be able to figure out a way to get it to
queue there. (Another--easier--way might be to just have the e-mail
generating script/program throttle its sending of e-mail.)
(If I have any other bright ideas throughout the day, I'll let you know.)
Good luck!
--
Bennett Lanford <benlanford@xxxxxxxxx>
There are 10 kinds of people: those that understand binary and those that don't.
======================================================================
This is <vps-mail@xxxxxxxxxxxx> <http://www.perlcode.org/lists/>
Before posting a question, please search the archives (see above URL).
Main Index |
Thread Index