On Dec 7, 2006, at 5:17 PM, Olivier Mueller wrote:
Hello,
For cpu load reason, I'd like to generate some special mails during
the
night, but send them "outside" only during the day. Is there a way
to stop
remote delivery for some time, while having the other qmail
functions up &
running (smtpd & local delivery) ? (dedicated server).
Otherwise what seems to work is to simply stop qmail completely
(lwq's qmailctl
stop), and then send mails via the php mail() function. Qmail is
stopped, but
the mails seems to be stored correctely in the todo/ part of the
queue, and
are delivered when qmail is started again. I don't know if it's the
"good way"
to do it, but at least it seems to work... any comment? :-)
Other way I'm thinking about: create my own mail queue (simply a
directory, with
one file per mail), and qmail-inject them when ready...
Feedback welcome! Thanks & regards,
Olivier
you could make a simple script to have the message be written to a
file, then sleep until you want it sent, then send the message
basically something like this:
generatestuff > mailfile
sleep 5000
cat mailfile | mail -s "statistic message" email@address
-krzee
|