2
0
mirror of https://github.com/webgefrickel/dotfiles synced 2024-11-09 13:10:27 +00:00
steffen-dotfiles/doc/postfix-local.txt

11 lines
850 B
Plaintext
Raw Normal View History

2015-01-29 10:35:54 +00:00
Capture all emails to prevent accidental spam
edit /etc/postfix/main.cf
add: canonical_maps = regexp:/etc/postfix/canonical-redirect
create /etc/postfix/canonical-redirect
enter: /^.*$/ your_email@domain.com
or, if you're not setting up SMTP relay below, change your_email@domain.com to your username on your Mac, which will deliver mail to your local account (I'm not sure how you'd read it though, so that's why I also set up the SMTP relay business).
From the command line, execute sudo postmap /etc/postfix/canonical-redirect . This command will create the file /etc/postfix/canonical-redirect.db which postfix will find automatically. Just in case, also execute sudo postfix reload although you'll probably get an error message that postfix isn't running (which is OK, but if it was, this would be needed to pick up the changes to main.cf).