procmail
[Top] [All Lists]

Re: sending to group with right reply-to and subject header

1996-06-15 13:40:45
relay(_at_)brainpools(_dot_)com (relay) writes:
I'm using a procmail recipe to operate sort of a mailinglist variation
through my domain that is hosted by a virtual domain provider. The recipe
looks like this:

:0
*$^To: (_dot_)*x(_at_)y(_dot_)com
| formail -i "Reply-To: funds-list(_at_)brainpools(_dot_)com" | $SENDMAIL -oi 
address1,
address2, addressn 



However, the forwarded emails don't show the original subject line written
by the sender. Instead, the subject line shows the name under which my
account at the virtual domain provider has been established.

Is there a way to modify the recipe so that the forwarded mails show the
right subject line?

Since the recipe above isn't modifying the Subject: line, the MTA that
is doing the virtual domain handling must be doing so.  You should examine
the complete headers of a message that arrives at the above account, and
look for something like "Orig-Subject:" or "Real-Subject:" or some such
in which the virtual domain handler is hiding the original subject of the
incoming mail.  If it's there then you should be able to use formail's
-R flag to rename it back to "Subject:".

If you don't see such a header, talk with your VDP and ask them where
the subject line is going.

BTW: I see no reason for the '$' flag on the condition.  You should
also leave out the commas in the address on the sendmail command line.


XLOOP = funds-list(_at_)brainpools(_dot_)com
:0
* ^To(_dot_)*x(_at_)y(_dot_)com
* ! X-Loop: $\XLOOP
| formail -i "Reply-To: $XLOOP" -A "X-Loop: $XLOOP" \
        -I Subject: -R Original-Subject: Subject: | \
        $SENDMAIL -oi address1 address2 addressn


The -I removes the old subject line first.  I've also added code to do
X-Loop processing.  It takes just one looping message to really ruin
your day.  If your procmail is older than 3.11pre, than change that second
condition to:

* $ ! X-Loop: $XLOOP

which isn't as perfect, but is good enough.

Philip Guenther

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