procmail
[Top] [All Lists]

More Matching questions - regexp

2000-09-27 08:13:37

Thank you for your replies.  I have written, with copious
help from this list ;)  the following system for a soccer
club.

Email is generated by a club member who I call an
Originator from a web page/perl script and sent
to a Gatekeeper email account.  I control the To, From,
and Subject.  (Subject always starts "Webmail: ")
The perl script makes sure a subject is entered, and
that an email address is specified, and if I can ever 
get ckaddr.pl to work, I will even do a quick check for
valid email addresses.  I can run perl scripts, but
cant get subroutines from other scripts to run yet.

To:  Gatekeeper
From: Gatekeeper  (don't jump to conclusions)
Subject: Webmail: The user's subject here
(in the body:  name, phone, Originators email address)

** I want to change the subject to include the Originators
   email address, for reasons that will be apparent later -
   I will do that in the Perl script

Subject: Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com

My Procmail script is for the Gatekeeper.
The email is saved and a copy of the email is sent to
a Destination email account, usually a club officer.
Multiple Destination accounts can be chosen.  

To: clubofficer(_at_)bozo(_dot_)com
From: Gatekeeper(_at_)bozo(_dot_)com
Subject: Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com

Now Destination has the email.  Here is where the problem is.
If I try and pass the Originator's email address in some
header field like X-Mail-Comment, Destinations email generator
strips off all header lines when replying (or replying and
including the original message) except for (sic)

Return-Path:
Delivered-To:
Subject:
Sender:
To:
From:

I can't change any of these fields.  The Destination replies to the 
Gatekeeper

To: Gatekeeper(_at_)bozo(_dot_)com
From: clubofficer(_at_)bozo(_dot_)com
Subject: Re: Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com

who in turn sends it back to the Originator - providing there is 
some way to preserve the Originator's email address. 

I want a copy of the original and of the reply in the Gatekeeper account, 
because I write the subjects to a log file, and can
tell if the club officers have responded to the Originators
email.  In the logfile I should see pairs:

Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com
Re: Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com

I absolutely refuse to have folks email the club
and not know if a response from the club got sent.  After
3 days or so, if the club officer did not respond, I respond
or forward the original to someone else to respond to.

Finally, procmail deals with the reply by looking for "Re: Webmail:"
(of course, I will make the first line in the body of the original
to say don't change the subject line when replying).  Here is
where I need to strip out the email address from the subject line:

To: bozo(_at_)bozo(_dot_)com
From: clubofficer(_at_)bozo(_dot_)com
Subject: Re: Webmail: The user's subject here *- bozo(_at_)bozo(_dot_)com

Now, Originator and Destination can reply until hell freezes over,
Gatekeeper is out of the loop.

My procmail script is pretty long - I send out a mailing list
(think *era*) and DO check for mail loops, etc.

This is why I want to do what I do.

Thanks for your help

Tom


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>