User:Hannes Röst/postfix< User:Hannes Röst
Postfix is a free and open-source mail transfer agent (MTA) that routes and delivers electronic mail. You can use postfix for example to
- receive email from a local program that wants to send email
- receive email over SMTP (from an email client or from another server)
- decide what to do with that email (e.g. deliver it locally or relay it to yet another server)
- process it in a number of ways
=> See Postfix Overview for a good overview over the way a message takes when processed through postfix.
The /etc/postfix/main.cf file stores site specific Postfix configuration parameters while /etc/postfix/master.cf defines daemon processes. The Postfix Basic Configuration tutorial covers the core settings that each site needs to consider.
How do I switch between mbox and maildir?Edit
The slash after the directory in /etc/aliases says whether mbox or maildir should be used.
#/etc/aliases # use a maildir testuser: /var/mail/testuser/ # use a mbox othertestuser: /var/mail/othertestuser
How do I relay all undeliverable mailEdit
This creates a "catch-all" address for local relay if no user can be found to relay the mail to (main.config)
# /etc/postfix/main.cf #relay all UNDELIVERABLE email to firstname.lastname@example.org luser_relay = email@example.com local_recipient_maps =
How to use 2 or more content filtersEdit
Try to do that:
Postfix:25 -> ClamAV:10025 -> Postfix:10026 -> dspam:10000 -> Postfix:10027
using those commands: http://www.irbs.net/internet/postfix/0506/2198.html
unanswered forum thread: http://ubuntuforums.org/showthread.php?t=1318718
How do I add a mail filter (e.g. sieve) to a postfix / dovecot setup?Edit
How do I allow one person to send emails for another person?Edit
smtp_generic_maps is a possible solution here since it only rewrite outgoing email.
Create a user, e.g. called send_for_xxx and give it a username/pw. Then use the smtp_generic_maps entry in main.cf
# main.cf smtp_generic_maps = hash:/etc/mail/generic
to add a rewrite of the sender email address:
#/etc/mail/generic send_for_xxx: firstname.lastname@example.org