Skip to content

What is the best way to add a mail received hook to Postfix? #4254

Answered by polarathene
tagadvance asked this question in Q&A
Discussion options

You must be logged in to vote

You can probably use Dovecot Sieve? Our edge docs have a revised version with better examples than the current v14 docs:
https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/mail-sieve/#subaddress-mailbox-routing

Although that's subaddress, you might be able to use a global sieve rule in a similar way. I'm not sure if it'll let you run your own external scripts from sieve, but it'll handle moving mail to where you want it.

If you search discussions and issues, I believe some have added an entry to Postfix master.cf that runs a shell or python script to process mail, which might work for you.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tagadvance
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants