Postfix configurations: sendmail only
From wikinotes
NOTE:
I believe this is both postfix and dovecot...
Locations
/etc/mail/mailer.conf
?
Install
FreeBSD
Install
sudo pkg install postfix #( when asked to activate postfix in /etc/mail/mailer.conf say YES )Add user postfix to group mail
pw groupmod mail -m postfix hostname # Verify your hostname is an FQDN sudo newaliases # (Re) Aliases file (mail aliases)Enable postfix, Replace
sendmail
# /etc/rc.conf hostname="mercbugs.mfwbugs.com" # required suffix of domain.com so that it looks like a FDQN (email will be from bugzilla@mfwbugs.com) postfix_enable="YES" # FreeBSD includes sendmail, which we will be replacing with postfix. # You can inform your system which executable to use in rc.conf/periodic.conf # # Disable Sendmail (for postfix) sendmail_enable="NO" sendmail_submit_enable="NO" sendmail_outbound_enable="NO" sendmail_msp_enable="NO"
# /etc/periodic.conf # It may need to be created # Disable Unneeded Sendmail (using postfix) daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO"
Configuration
main.cf
# /usr/local/etc/postfix/main.cf mailbox_command = /usr/local/libexec/dovecot/deliver smtpd_use_tls = no smtpd_sasl_auth_enable = yes smtpd_sasl_path = private/auth smtpd_sasl_type = dovecot smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
Usage
echo "Email Body" \ | mail -s "Test Subject" you@domain.com # confirm email was sent tail -n 30 /var/log/maillog # check for status=sent