Qmail
[Top] [All Lists]

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

To: qmail@list.cr.yp.to
Subject: Re: temporary stopping remote delivery / php mail() when qmail stopped?
From: Kyle Wheeler <kyle-qmail@memoryhole.net>
Date: Fri, 8 Dec 2006 00:25:44 -0500
Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys
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
Domainkey-signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=memoryhole.net; b=OqFxTW1Hln/MDHXuwzBi/+S6PNxbGs4UlaqXYmzOsxRVfPE1ycf8KvS/Nvz8jUEZbY6usago1Ymg0D28QVrdPJ5xGpLt2YZIv2W2MeqaVUWcWsOJgaeQkzPuNbl1Mt+3WSREwB7tr1angkK+v3p1IRT82kr+f/FPiO9aySea3O8= ;
Domainkey-status: good
In-reply-to: <665836CF-297D-456B-A729-A1E448FD0BAF@omx.ch>
Mail-followup-to: qmail@list.cr.yp.to
Mailing-list: contact qmail-help@list.cr.yp.to; run by ezmlm
References: <665836CF-297D-456B-A729-A1E448FD0BAF@omx.ch>
User-agent: Mutt/1.5.13 (2006-11-28)
On Friday, December  8 at 09:17 AM, quoth Olivier Mueller:
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).

Yes, but chances are it's more of a pain than it's worth. I'd be surprised, though, if remote email delivery would use more than 1% of CPU power.

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? :-)

Yup, that's a perfectly legitimate method. Now, qmailctl stop also stops the smtpd server, which you may not want. Doing:
   svc -d /service/qmail-send

... is sufficient to stop all delivery without stopping all accepting.

Probably the easiest way to stop remote delivery while still allowing local delivery is to simply set concurrencyremote to 0 and then restart qmail-send. That will put remote deliveries on hold until you set concurrencyremote to something else (remove the file for the default) and restart qmail-send again.

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...

That works too.

~Kyle
--
You can not establish sound security, on borrowed money. You can not keep out of trouble, by spending more than you earn.
                                                   -- Abraham Lincoln

Attachment: pgpVn0HnUDzcp.pgp
Description: PGP signature

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