[ILUG] Postfix questions

Niall O Broin niall at linux.ie
Wed May 9 12:31:34 IST 2001


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 

cd /var/spool/mqueue
rm [dq]fXXXXXX

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`

or is there some other reference to a queued mail which I'd need to clean up ?

2) I have a little script I run to manually send and receive my mail -
essentially all it does is 

fetchmail -a
echo "Sending mail now . . . "
sendmail -q

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" ] ;
do
   sleep 1
done


but that's a bit . . . . although it has the virtue of working :-)


Niall




More information about the ILUG mailing list