Last active
January 21, 2022 14:56
-
-
Save AntonTyutin/0b8631cbc4d9707fdc1c330d723d2764 to your computer and use it in GitHub Desktop.
Postfix mailcatcher configuration
This file contains hidden or 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 ========================= | |
# ... | |
catcher_destination_recipient_limit = 1 | |
virtual_mailbox_domains = reply.domain.com | |
virtual_transport = catcher | |
virtual_mailbox_maps = | |
virtual_alias_maps = | |
recipient_delimiter = + | |
# ===================== /etc/postfix/master.cf ========================= | |
# ... | |
catcher unix - n n - - pipe | |
flags=ODRhu user=user argv=/path/to/mailcatcher.sh | |
${sender} ${user} ${extension} | |
# ===================== /path/to/mailcatcher.sh ======================== | |
#!/bin/sh | |
PATH=/bin:/usr/bin:/usr/sbin | |
FROM="$1" | |
USER="$2" | |
CHANNEL="$3" | |
logger -p local0.info -t "postfix/mailcatcher[$$]" "Caught reply from $FROM to channel $CHANNEL" | |
exit 0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment