Qmail
[Top] [All Lists]

Re: temporary stopping remote delivery / php mail() when qmail stopped?

To: Olivier Mueller <om-lists-qmail@omx.ch>
Subject: Re: temporary stopping remote delivery / php mail() when qmail stopped?
From: Jeff <jeff@doeshosting.com>
Date: Fri, 8 Dec 2006 18:02:35 -0800
Cc: qmail@list.cr.yp.to
Delivered-to: sp-com-lists@consult.net
Delivered-to: gmail-qmail@securepoint.com
Delivered-to: sp.com.list@gmail.com
Delivered-to: mailing list qmail@list.cr.yp.to
In-reply-to: <665836CF-297D-456B-A729-A1E448FD0BAF@omx.ch>
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <665836CF-297D-456B-A729-A1E448FD0BAF@omx.ch>

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

<Prev in Thread] Current Thread [Next in Thread>