Created
January 30, 2009 18:58
-
-
Save bensie/55208 to your computer and use it in GitHub Desktop.
Configure Postfix to handle all email for a domain/subdomain and forward to a rails app
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/etc/postfix/main.cf: | |
mydestination = localhost.localdomain, localhost, list.domain.com | |
virtual_maps = hash:/etc/postfix/virtual | |
alias_maps = hash:/etc/aliases | |
/etc/postfix/virtual: | |
@list.domain.com rails_mailer | |
/etc/aliases: | |
rails_mailer: "|/path/to/app/lib/mail_handler.rb http://www.example.com/emails 298cc9dceb1f3cac91fef8b42be624c07843fc8e" | |
Run these commands to apply: | |
postmap virtual | |
postalias /etc/aliases | |
postfix reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment