Replacing Sendmail With Postfix

From TykWiki
Revision as of 14:00, 9 May 2010 by Tykling (talk | contribs) (Created page with 'It is easy to replace the default FreeBSD system mailer Sendmail with Postfix from ports. == Installing Postfix == To install Postfix from ports: <pre> sudo portmaster /usr/port…')
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

It is easy to replace the default FreeBSD system mailer Sendmail with Postfix from ports.

Installing Postfix

To install Postfix from ports:

sudo portmaster /usr/ports/mail/postfix

I check the TLS option but leave everything else as defaults.

During the installation Postfix asks a few questions, I answer yes to all of them:

...
You need user "postfix" added to group "mail".
Would you like me to add it [y]?
Done.
...
Would you like to activate Postfix in /etc/mail/mailer.conf [n]? y
...

The pkg-message for Postfix contains the following information:

To enable postfix startup script please add postfix_enable="YES" in
your rc.conf

If you not need sendmail anymore, please add in your rc.conf:

sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"

And you can disable some sendmail specific daily maintenance routines in your
/etc/periodic.conf file:

daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"

If /etc/periodic.conf does not exist please create it and add those values.

I go enable Postfix in /etc/rc.conf, disable Sendmail in the same file, and disable the Sendmail specific things in /etc/periodic.conf.

Now I just need to stop Sendmail and start Postfix:

sudo /etc/rc.d/sendmail onestop

..and..

$ sudo /usr/local/etc/rc.d/postfix start