OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
Re: Not adding Received hdr for auth'ed users

From: Adam Jacob Muller (lists-postfixadam.gs)
Date: Tue Apr 10 2007 - 18:14:23 CDT


OK, got about 5000 requests for this, so here goes.

http://adam.gs/encrypt/encrypt.tar.bz2

It's written in PHP ;)
you need a cli version of PHP with mcrypt support.

You also need Net_SMTP pear libraries. (pear install Net_SMTP)

Some generic configuration is included, it basically boils down to:
-o content_filter=encrypt
on submission service
establish a new service to accept mail back on smtp.
add encrypt service definition.
encrypt unix - n n - - pipe
        flags= user=<user>:<group> argv=/path/to/encrypt.php $
{client_address} ${client_helo} ${sasl_method} ${sasl_username} $
{sender} ${recipient}

Suggestions are very welcome. I've tried pretty hard to make sure
this thing doesn't loose mail or even bounce it if fucks up, but it's
gotten very little testing, i've only used it personally. I am mostly
concerned about the header handling, i have *no* idea if I did that
right. though, it works for me (Apple Mail, windows mobile mail,
thunderbird, a few other MUAs as well)

-Adam