procmail
[Top] [All Lists]

Re: Using Formail to remove headers

2005-08-01 18:10:44
Thank you again for your many replies.  I've actually learnt quite a lot 
through watching what you all have to say (the manpages alone are, at best, 
cryptic).  My finished article is below (with email address munged to help 
stop sniffers), but I do have a few questions still (see after)...

:0
* ^X-Original-To:(_dot_)procmail-support(_at_)mydomain\(_dot_)com
* ! $ ^X-Loop: $\LOGNAME(_at_)$\HOSTNAME
    | formail -kz \
        -X Subject: \
        -X In-Reply-To: \
        -X Content-Type: \
        -X MIME-Version: \
        -X Content-Transfer-Encoding: \
        -X Content-Disposition: \
        -X Message-ID: \
        -X References: \
        -I "X-Loop: $LOGNAME(_at_)$HOSTNAME" -X X-Loop: \
        -I "To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE" -X To: \
    | "$SENDMAIL" $SENDMAILFLAGS -t \
        -F "Stephen Allen" \
        -f procmail(_at_)mydomain(_dot_)com


Questions...


        * ! $ ^X-Loop: $\LOGNAME(_at_)$\HOSTNAME

a) I don't understand ! $ ^X-Loop.. etc...  What does the $ mean here?
b) Why do $LOGNAME and $HOSTNAME have a \ after the $ symbols?


        -I "X-Loop: $LOGNAME(_at_)$HOSTNAME" -X X-Loop: \
        -I "To: procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE" -X To: \

a) I've used -I instead of -A, although it seems I could have used either 
(or even -i or -a).  Is -I the 'normal' option to use?


    | "$SENDMAIL" $SENDMAILFLAGS -t \
        -F "Stephen Allen" \
        -f procmail(_at_)mydomain(_dot_)com

a) I've ommitted the From: header and used -f in the SENDMAIL command 
instead.  Is this OK?
b) I've used -t in the SENDMAIL command so it relies on the TO fields, is 
this OK too?


The one last little bit I'm not sure about is how to correct the Message-ID. 
I was informed by someone that I could probably do with changing that to 
reflect the actual source domain (ie. mydomain.com).  At the moment it's 
just pegged with the name of my Windows machine.

       Message-ID: <017401c5952c$70bd9720$c800a8c0(_at_)dangermouse>

I can only think that all my mail (and 99.9% of the rest of the worldss) is 
sent like this, so is it a problem, or just normal?

Thank you very much again,
Steve :)


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail