procmail and gpg
stormer at stormer.org
Thu May 14 08:51:33 CEST 2009
To all that responded,
I got it to work...
Here is how...
First, when executed by .procmailrc, the .gnupg directory needed to be
in the same directory as the .procmailrc file. It had to be
chown:chgrp for that user.
The procmailrc looks like this...
* ^X-ClamAV: clean
| gpg --encrypt -r 3BE2D343 --armor --output -
! email2 at mydomain.com
The only matching thing in all emails was the X-ClamAV: clean
What this does...
When an email comes into that pop account, it encrypts it and forwards
it to email2 at domain.com
On Wed, May 13, 2009 at 11:48 PM, Chris Frey <cdfrey at foursquare.net> wrote:
> On Wed, May 13, 2009 at 01:39:06AM -0400, Stormer's Cgi-Archive wrote:
>> I asked this one before... either no response or no one knows.
>> Has anyone got a procmail recipe that works so that any email sent to
>> a particular pop3 account will be encrypted with a public key?
>> maybe I am on the wrong list? Recommendations?
> You need to make use of the idea of procmail filter rules.
> For example, I use a rule like this to adjust the Subject line of
> mail from the full-disclosure mailing list:
> ####### full-disclosure
> * ^List-Id:.*full-disclosure.lists.grok.org.uk
> # filter delivered mail's subject line for better mutt sorting
> | sed -e '/^Subject: / s/\[Full-disclosure\] //'
> # send to proper mailbox
> The above was copied from a working setup. You'll need to do some testing
> and playing around, but extrapolating from my above rule, I'd likely
> try something like this:
> # send body of email through a gpg filter, and make sure it succeeds
> | gpg --armor -r cdfrey at foursquare.net --encrypt
> Hope that helps,
> - Chris
More information about the Gnupg-users