Postfix expert needed for dialup config

Martin Schmitt mas at scsy.de
Thu Dec 16 17:05:23 UTC 2004


* Tommy Trussell schrieb/wrote:

> The part at postfix.org about checking to make sure the buffer gets
> flushed confuses me a little -- they  have written a little script to
> make sure each message gets flushed out using the sendmail -q command,
> but it looks like all it does is keep the script busy until the queue
> is empty. I gather this script might go in the ip-up.d directory to
> keep the connection up until the messages are all sent ...?

"sendmail -q" is the same as "postqueue -f". It tells the Postfix queue 
manager to process the messages that are in the deferred queue (a "queue 
run" or "flushing the queue") so they can be transported off the system 
to the smarthost.

> I have her ppp connection to NOT start on demand, so maybe I can leave
> out the defer_transports setting in postfix. (In other words postfix
> can not make the phone dial when she queues a message offline, so I
> don't have to stop postfix from trying.) That way I won't have to put
> sendmail -q in crontab. Not that it would be difficult, but for the
> purposes of my HOWTO I want to touch as few files as I can.

The crontab advice hardly makes any sense to me. Why flush the queue 
from cron, if simply _not_ deferring SMTP deliveries would have the same 
effect? Oh well, the site says to run it every now and then while the 
connection is up, but implementing this in an automatic fashion probably 
won't be too much fun. Touchfiles, anyone? ;-)

I really have no experience with dial-up Postfix configurations (if I 
write mail on my notebook, I simply use Mozilla in offline mode, no MTA 
for me), but what about this one using on-the-fly Postfix reconfiguration:

On connection:
postconf -e defer_transports=
postfix reload
postqueue -f

On disconnection:
postconf -e defer_transports=smtp
postfix reload

This way, Postfix should defer everything while offline, but run in 
"normal" mode when online. Probably worth giving it a try.

-martin


-- 
+-------------------------+------------------------+
| Martin Schmitt          | Schmitt Systemberatung |
| http://www.scsy.de/~mas | http://www.scsy.de     |
+-------------------------+------------------------+
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
URL: <https://lists.ubuntu.com/archives/ubuntu-users/attachments/20041216/3931c687/attachment.sig>


More information about the ubuntu-users mailing list