Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rewrite outgoing emails

Status
Not open for further replies.

BIS

Technical User
Jun 1, 2001
1,893
NL
Hello,

I am in the process of migrating from qmail to something a tad more modern, and for this I have settled on postfix.

One task I do on qmail, is take an outgoing email and rewrite it (add a signature if the sender is a specific string).

Can anyone tell me how to go about doing that on postfix?

My process is
1 - create a virtual domain in tcp.smtp (home/vpopmail/etc/tcp.emtp)
2 - specify a .qmail file for the virtual domain
3 - pipe to a shell script via .qmail file
4 - execute an awk script if sender=[something] (from 822 field), then reinject via qmail-inject

That might be Greek to you folks, I am hoping to do something similar in postfix - any ideas?

 
You should be able to do the same thing with Postfix. The master.cf file is where the daemon processes are configured and having filters and other utilities run in the middle of the stream is a common practice. You would want to configure postfix to deliver (pipe) to your process and then listen on another port for re-injection.

The actual command steps to implement such a system are beyond my skill with Postfix to crank them out for you, but I would look at the various filter examples, like miter, spamassassin, and postgrey, all of which make use of this technique.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top