Subject: mailer.conf & postfix
To: NetBSD tech-userlevel <tech-userlevel@netbsd.org>
From: James K. Lowden <jklowden@schemamania.org>
List: tech-userlevel
Date: 09/24/2003 23:13:52
Some time ago, I switched to postfix on a 1.6 machine. As far as I could
tell, all that was needed was to remove sendmail from rc.conf, add
postfix=YES, and follow the postfix documentation. That I did, and it
worked.
(I set up an alias for "root" that pointed to a user on another host. You
need that bit of information to understand what happened.)
You may imagine my surprise to find mail in /var/spool/mqueue/, sendmail's
queue.
Examining the messages, I realized they all came from the /etc/daily cron
job, and were all sent during a period when the host that gets root's mail
was down. The crontab entry relies on "sendmail" which, via
mailwrapper(8)and mailer.conf(5) was still pointing to
/usr/libexec/sendmail/sendmail.
I had overlooked mailer.conf.
When sendmail attempted to send mail to "root", postfix (I presume)
rejected it because the other host was down. sendmail then queued the
mail in sendmail's queue. That queue didn't get flushed until I started
wondering where my space had gone, because of course postfix isn't going
to flush sendmail's queues.
I spent this evening figuring all this out, and looked around for the
document/hint to tell me that I should have known to edit mailer.conf. I
didn't find one. The new Guide has a short mention of it in section
13.1.3, which might help newcomers.
IMHO, this suggests two avenues of improvement:
1. postfix(8) should refer to mailer.conf in FILES and mailwrapper in SEE
ALSO.
2. "/etc/rc.d/postfix start" might double-check that mailer.conf is OK,
and complain to stderr and /var/log/messages or /var/log/maillog if it is
not.
Other suggestions? Should I send-pr anything?
--jkl