Skip to content

Instantly share code, notes, and snippets.

@jrenggli
Created January 26, 2015 16:29
Show Gist options
  • Save jrenggli/db14e26512560c266ead to your computer and use it in GitHub Desktop.
Save jrenggli/db14e26512560c266ead to your computer and use it in GitHub Desktop.
mail configuration for development systems: redirect all mails to a distinct mailbox. (Prevent mails being sent to actual recipients)
# File: /etc/postfix/main.cf
...
virtual_alias_maps = regexp:/etc/postfix/virtual
...
# File: /etc/postfix/virtual
# Exceptions for localhost
/(.+)@localhost/ $1@localhost
/(.+)@localhost\.localdomain/ $1@localhost.localdomain
# Exceptions for defined addresses
/admin@example\.com/ admin@example.com
# redirect all other messages to collect@example.com
/.+@.+/ collect@example.com
@visay
Copy link

visay commented Mar 18, 2015

For dockerflow project we are using, we integrated mailhog container and things get so easy - except that it run for our Neos and Flow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment