procmail
[Top] [All Lists]

a solution ? re: changing SUBJECT lines in procmail messages

1997-01-06 20:54:08
Responding To:  dmuth+3563401061997220539771583412868268(_at_)ot(_dot_)com  
(Doug Muth)
Original Date:  Mon, 6 Jan 1997 22:08:13 -0500 (EST)
Message-ID:     
<199701070308(_dot_)WAA00410(_at_)dmuth(_dot_)ppp(_dot_)ot(_dot_)net>

Actually, I was thinking along the lines of using something to
replace sendmail, parse the outgoing mail, and pass it along to
sendmail. But, since sendmail is too damn complex, I'm not even
going to THINK about attempting it. :-/

If I have to, I'll start cutting and pasting the Subject: line on 
replies to the list.

Replacing sendmail is tricky indeed.

How about an outgoing filter that will remove the "[Procmail]"  
thing from the subject and then feed to sendmail?

Actually, you need to filter
        Subject: Re: [Procmail] Some rest of the Subject
and turn it into
        Subject: Re: Some rest of the Subject


This will do that:

#!/bin/sh

cat - | sed 's/Subject\:\ Re\:\ \[Procmail\]\ /Subject\:\ Re\:\ /g'  
| /usr/lib/sendmail "$@"

exit 0

When you send a message, rather than calling 'sendmail', call that  
script.  At worst you'd have to replace 'sendmail' with this script,  
and move sendmail to say, /usr/lib/sendmail.real (edit the script  
to point to /usr/lib/sendmail.real).

How's that for a solution?  It seemed to work in my testing here  
(to Doug: that's what I was doing when I accidentally sent you that  
message).

I use a script like this for other sendmail manipulating (like  
sending this message from peak.org when I am logged in on my  
competer at home).

TjL

--
        Tj Luoma (luomat(_at_)peak(_dot_)org)
                http://www.next.peak.org/~luomat
                        Awaiting Apple's NeXTStep

<Prev in Thread] Current Thread [Next in Thread>
  • a solution ? re: changing SUBJECT lines in procmail messages, Timothy J Luoma <=