Postfix: Difference between revisions
Jump to navigation
Jump to search
Line 5: | Line 5: | ||
* [http://www.postfix.org/ADDRESS_REWRITING_README.html ADDRESS_REWRITING_README — Postfix Address Rewriting] |
* [http://www.postfix.org/ADDRESS_REWRITING_README.html ADDRESS_REWRITING_README — Postfix Address Rewriting] |
||
* [http://www.postfix.org/LOCAL_RECIPIENT_README.html LOCAL_RECIPIENT_README — Rejecting Unknown Local Recipients with Postfix] |
* [http://www.postfix.org/LOCAL_RECIPIENT_README.html LOCAL_RECIPIENT_README — Rejecting Unknown Local Recipients with Postfix] |
||
== Installation == |
|||
=== Server === |
|||
TBC |
|||
=== SRS === |
|||
See [[Configuration Noekeon.org]]. |
|||
=== DKIM === |
|||
See [https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-dkim-with-postfix-on-debian-wheezy this excellent guide on digitalocean.com]. |
|||
== Aliases == |
== Aliases == |
Revision as of 12:42, 5 September 2016
References
- ADDRESS_REWRITING_README — Postfix Address Rewriting
- LOCAL_RECIPIENT_README — Rejecting Unknown Local Recipients with Postfix
Installation
Server
TBC
SRS
See Configuration Noekeon.org.
DKIM
See this excellent guide on digitalocean.com.
Aliases
Add static aliases in default configuration
- Edit /etc/aliases
- Then run newaliases:
newaliases
Uses regexp (dynamic) aliases
Edit file /etc/postfix/main.cf as follows [1]:
alias_maps = regexp:/etc/postfix/aliases-regexp
Then create /etc/postfix/aliases-regexp as follows:
/^tom\..*@domain.com$/ tom@other.com /^phil\..*@domain.com$/ phil@other.com
Troubleshooting
Debugging aliases
Use postmap:
postmap -q mip@prime.immie.org hash:/etc/aliases regexp:/etc/aliases-regexp
postmap -q mip hash:/etc/aliases regexp:/etc/aliases-regexp
Handling deferred mail / message queue
Reference:
- View the queue
mailq # ... or ...
postqueue -p
- View a message
postcat -vq XXXXXXXXXX # Replace XXXXXXXXXX with message ID
- Process the queue now
postqueue -f # ... or ...
postfix flush
- Delete the queue
postsuper -d ALL
postsuper -d ALL deferred # Delete only deferred messages