Intercepting messages in queue
- Anyone know of any documentation on how to manipulate the incoming message queues? I want to intercept inbound messages and process them with an external program that I will be writing.
- On Sun, Nov 30, 2008 at 11:13:11PM -0600, Johnson, S wrote:
> Anyone know of any documentation on how to manipulate the incominghttp://www.postfix.org/CONTENT_INSPECTION_README.html
> message queues? I want to intercept inbound messages and process them
> with an external program that I will be writing.
Disclaimer: off-list followups get on-list replies or get ignored.
Please do not ignore the "Reply-To" header.
To unsubscribe from the postfix-users list, visit
http://www.postfix.org/lists.html or click the link below:
If my response solves your problem, the best way to thank me is to not
send an "it worked, thanks" follow-up. If you must respond, please put
"It worked, thanks" in the "Subject" so I can delete these quickly.
- I have in master.cf:
#client for sending emails to smtpprox
scan unix - - n - 10 smtp
#return interface for the mail filtered through smtpprox
localhost:10026 inet n - n - 10 smtpd
and in main.cf:
# execute `postsuper -r ALL' & reload if you enable/disable content_filter!
content_filter = scan:[127.0.0.1]:10025
# WARNING! If the content_filter is disabled above, also disable the option below!
receive_override_options = no_address_mappings
That pulls any inbound message through smtpprox (http://bent.latency.net/smtpprox/) which can be modified to do whatever you like. See an archived discussion at http://archives.neohapsis.com/archives/postfix/2008-07/thread.html#999 for ideas. I'll be using this method to remove "**SPAM**" tag from the Subject line (it's placed in spam messages by an external spam filtering service) and then to include a header "X-Spam: yes" instead for easy sorting in the users' mail clients.