Blocking ISP : use external SMTP

If your ISP restrict the use of smtp port (25), you can't send any email from your server. To fix this, you may :

However, you need another smtp provider. Put the necessary credentials to access this mail account in "/etc/mail/secrets" :

# echo "secret_id user:passphrase" > /etc/mail/secrets

Make sure permissions are appropriate, you don't want everyone to know your password :

# chmod 640 /etc/mail/secrets
# chown root:_smtpd /etc/mail/secrets

Then, edit "/etc/mail/smtpd.conf" so outgoing messages go throught external mail server :

...
table secrets "/etc/mail/secrets"
...
listen on all...
...
action "relay" relay host smtp+tls://secret_id@smtp.example.com \
      auth <secrets> mail-from "@athome.tld"
...
match from any for any action "relay"

Some details :

In the end, reload smtpd.

rcctl restart smtpd

Read the example in the end of smtpd manpage to learn more.