Postfix configurations: sendmail only (simple): Difference between revisions
From wikinotes
(→Usage) |
|||
Line 16: | Line 16: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# /etc/periodic.conf | # /etc/periodic.conf (create) | ||
daily_clean_hoststat_enable="NO" | daily_clean_hoststat_enable="NO" | ||
Line 25: | Line 25: | ||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
# create mailer.conf, replace sendmail with postfix-sendmail | |||
mkdir -p /usr/local/etc/mail | mkdir -p /usr/local/etc/mail | ||
install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf | install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf |
Revision as of 05:11, 19 February 2022
Install
FreeBSD
sudo pkg install postfixAs directed by
pkg
# /etc/rc.conf postfix_enable="YES" sendmail_enable="NONE"# /etc/periodic.conf (create) daily_clean_hoststat_enable="NO" daily_status_mail_rejects_enable="NO" daily_status_include_submit_mailq="NO" daily_submit_queuerun="NO"# create mailer.conf, replace sendmail with postfix-sendmail mkdir -p /usr/local/etc/mail install -m 0644 /usr/local/share/postfix/mailer.conf.postfix /usr/local/etc/mail/mailer.conf sudo reboot
Usage
Piping email with headers (best)
{ echo From: noreply@domain.com echo To: you@gmail.com echo Subject: Foo Bar Baz } | sendmail -tUsing Params (less useful)
echo 'my body' | sendmail \ -f noreply `# ${user}@domain.com (rc.conf hostname, and .localdomain)` \ -F 'No Reply' `# sender name` \