procmail
[Top] [All Lists]

bang versus formail and sendmail

1999-04-22 22:00:41
I have read lots of on-line sources, and face some
confusion with writing a moderately involved yet
pretty useful procmail program.  I am going to post
the things that I can't figure out, and am grateful
for any answers.


This works for the basic forwarding I do, I just
match on predictible text in the body:
===============            
GIRLS_DIRECTOR=white(_at_)macalester(_dot_)edu

:0 Bc
* Girls Director
! $GIRLS_DIRECTOR
====================

bang (!) must do something with sendmail?


I also have a section that is going to have to
deal with manipulating mail headers.  I am trying
to figure out the following and compare to bang:

============
:0 Bc
 * Girls Director
  | formail -cz -A "From: Blackhawks" | $SENDMAIL -oi -t $GIRLS_DIRECTOR
=============

From the MAN pages:

formail
-c   Concatenate continued fields in the header
-z   Ensure a space exists between field name  and  content.
          Zap fields which contain only a space. 
-A headerfield

I guess the -A inserts or overwrites the "From:", will it 
work on ANY headerfield, and how about the envelope.  As I
understand it, your have the first portion that has the "From"
which is the envelope (?) and the second portion that is the
header that starts with the "From:"?

sendmail
-t   Read message for recipients.  To:,  Cc:, and Bcc:

I don't know what the o,i, and t are for.  What goes out
if you leave off the -t ?

-----
Is this formail and sendmail the method when you want to 
add or change header fields?  I don't see listed every
possible header field in the documentation.  I have an
email address that I want to store in the header as the
email moves between my email account and the accounts
like GIRLS_DIRECTOR and the person contacting us.
What field could I use to carry or store this email address 
before finally using it?


Regards 

Tom      tomcat(_at_)visi(_dot_)com

<Prev in Thread] Current Thread [Next in Thread>
  • bang versus formail and sendmail, tomcat <=