How to configure postfix to only receive mails and put them into local queue but not actually forwarding mails so they keep inside /var/spool/postfix
Asked
Active
Viewed 1,269 times
2
-
Is there a reason you can't use a tool like MailHog or MailCatcher if you don't actually intend to send the emails? Such tools are explicitly designed to do what you want - catch all sent mail and display it. – Moshe Katz Aug 17 '16 at 12:46
-
My goal was to just temp. forward mails — so like a postsuper -h ALL for future incoming mails – frlan Aug 17 '16 at 13:01
1 Answers
2
Try adding the following:
/etc/postfix/main.cf:
smtpd_recipient_restrictions =
...
check_recipient_access regexp:/etc/postfix/hold.regexp
/etc/postfix/hold.regexp:
/^/ HOLD
If you want to release all messages on hold, use postsuper:
postsuper -H ALL

I_GNU_it_all_along
- 146
- 6
-
I'm getting unused parameter for mtpd_recipient_restrictions and check_recipient_acces – frlan Aug 17 '16 at 10:53
-
"mtpd"? Did you make that typo in the comment or the config file? – I_GNU_it_all_along Aug 17 '16 at 10:55
-
-
-