Niall O Broin's [niall at linux.ie] 52 lines of wisdom included:
:>I like postfix and I use it on a couple of Internet connected boxes - in
:>fact, it'd take wild horses (or lots of money :-) ) to presuade me to use
:>sendmail again. However, I've still been using sendmail on my home box,
:>because I didn't know what to do with postfix. Anyway, I finally decided it
:>was time to eat my own dogfood and use postfix at home. Been there, done
:>that, works fine (apart from SuSE's magic startup system deciding to rewrite
:>the config file - stop laughing, Bedford !) but I've a couple of questions:
:>:>1) I occasionally write something and change my mind and want to delete it
:>from the queue. Under sendmail, I simply
:>:>where XXXXXX was the queue ID. How do I do the same thing under postfix ? Is
:>it ok simply to do
:>:>rm `find /var/spool/postfix/defer* -type f -name XXXXXX`
New versions of postfix have the postsuper command.
Queue Id: ABCXYZ
postsuper -d ABCXYZ
that deletes the mail with queueid of ABCXYZ
postsuper -d -
also reads in from stdin, so that
postsuper -d - < filename
will read in the Id's from filename.
:>2) I have a little script I run to manually send and receive my mail -
:>essentially all it does is
:>echo "Sending mail now . . . "
:>:>which was fine with sendmail, and also works with postfix BUT (isn't there
:>always a but ?) this script does a little more - if I'm not connected to the
:>net, it initiates a connection, waits until it can see the net, processes
:>the mail as above, and then shuts down the connection. This behaviour was
:>fine under sendmail, but sendmail -q with postfix is asynchronous - it just
:>kicks the qmgr daemon, from under whose feet I then proceed to kick the
:>net connection :-(. Can anyone suggest a nice way of dealing with that ? My
:>immediate thought is something like
:>:>while [ "$(mailq)" != "Mail queue is empty" ] ;
:> sleep 1
# Start deliveries.
# Allow deliveries to start.
# Loop until all messages have been tried at least once.
while mailq | grep '^[^ ]*\*' >/dev/null
Surely you can stick "sendmail -q" in your internet/dialup scripts?
Apart from that,
defer_transports = smtp
should be defined in main.cf
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!