[wplug-bsd] new install: postfix

Bill Moran wmoran at potentialtech.com
Tue Jul 20 00:28:50 EDT 2004


Brandon Kuczenski <brandon at 301south.net> wrote:
> I don't understand what is going on.
> 
> A week ago at the installfest I installed FreeBSD 4.10 on a fresh box and 
> took another step further from institutionalized corporatism and into a 
> world where my computer is in my control.
> 
> or so I hoped/thought.  
> 
> I've enjoyed working with FreeBSD so far but I am just stuck.  I installed 
> postfix from the port, except now everything seems to be completely 
> hosed.  I don't know what more to say except that on bootup I get this 
> error: 
> 
> Jul 19 23:16:33 ocean postfix/sendmail[102]: fatal: usage: sendmail [options]

This probably has to do with your sendmail_enable setting (see below).

> Here's what I did.  The install included sendmail by default.  I installed 
> postfix from the port, modified the config file (main.cf -- I didn't touch 
> master.cf because I couldn't find anything that told me to) to my liking, 
> and then took a week vacation.  When I returned (effectively today) I 
> wanted to really start postfix.  For reasons that can be best described 
> as "grasping at straws" I ran "/usr/ports/mail/postfix/make deinstall" 
> and then make install, this time answering 'y' to the question of 
> whether I want to modify mailer.conf.

This is good, it will cause postfix to be called anywhere sendmail would
usually be called.

> I modified /etc/rc.conf to include:  
> sendmail_enable="NO"

This should be:
sendmail_enable="NONE"

As "NO" tells it to run sendmail configured for local delivery only.  "NONE"
tells it to run nothing sendmail.  IMHO, they should have made NO and NONE
do the same thing, and used something like LOCAL in place of NONE ... I
should probably start a flame war about this on the freebsd-questions list.

> and then created a link in /usr/local/etc/rc.d: 
> # ln -s /usr/local/sbin/postfix postfix.sh

A little unconventional, but it should work.

> which I thought meant that the program would start up by itself.
> 
> But it doesn't, and the only hint I get is that error on bootup, and the 
> fact that when I try to send mail PINE tells me "error 421 SMTP connection 
> went away!"

Postfix is less of a "program" and more of a toolchain.  A typical message
is passed through many different programs as it passes through the Postfix
system, each of which performs a specific, easily definable function (such
as canonicalizing the To: address) so it's hard to easily describe whether
or not the "program" is running.  Generally, something like "postfix reload"
will give you either a happy message, or an error if things aren't right.  If
things go wrong, look in /var/log/maillog

> Running 'mail b at anearbyhost' works (b at anearbyhost gets his mail).
> 
> I have utterly no idea what to do next, no idea what logs to look at or 
> what services to start.  The fact that the postfix executable is also 
> called 'sendmail' is an act of devilish insanity so perverse that I can 
> only laugh at the frustration that is creeping up, like bile, in my 
> throat.

Eww ... that's gross.

The reason it's named "sendmail" is to provide compatibility with programs
that are written on the assumption that sendmail is installed.  qmail does
the same thing.  Read "man mailwrapper" for an interesting discourse on this
subject.  (I especially like the first sentence in the "bugs" section!)

> Please, please help me.

/var/log/maillog is a good place to look.  Check the output of "sockstat -4"
to see if the Postfix process "master" is listening on port 25.  General
system stuff will be in /var/log/messages, just like on Linux.

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com



More information about the wplug-bsd mailing list