This is driving me Nuts. If anyone can tell me why it doesn't work and
what I can do to get it to work, I'd appreciate it.
I've set up an Autoresponder script and if in tthe "TO" match line I
put in the actual name of the list and not the variable it works. BUT
if I put in the variable, it never matches. Here's the log output:
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparently(-Resent)?)-To):(.*[^a-zA-Z])?)${LISTNAME}@"
and Here's the recipe
In .procmailrc I have:
LISTNAME=Test_List
ARDOMAIN=TimeVest.com
INCLUDERC=$PMLIB/AutoRespond.rc
And in AutoRespond.rc I have:
(I have tried .*${LISTNAME}@ but it doesn't match either)
:0
* ^TO${LISTNAME}@
* !^X-Loop: ${LISTNAME}(_at_)${ARDOMAIN}
{
##### Assignes the File Name and Log Name to the same name as the
##### email Prefix address Name.
FILE=$LISTNAME.txt
LOG=$LISTNAME.log
EMAIL=$LISTNAME.$ARDOMAIN
##### This puts the message into the mailbox with a note that the Autoreply
##### was sent.
:0 wc
| (cat - ; echo ''; echo '**** Autoreply Sent $LISTNAME ****'; echo '') >>
$DEFAULT
##### This provides the reply header. With a -k, it sends the body as well.
##### without the -k, The message is sent without the body.
##### When I use the sendmail without the -t, it doesn't seem to work for
##### me. I'm not sure why. My thought was that NOT using the -t will
##### help prevent forgers from requesting the file to be sent to someone
##### else. But, since it only seems to work if I have it, I'm keeping it.
:0 wc
| ( formail -rtA 'X-Loop: $EMAIL' \
-A 'From: Autoresponder(_at_)$ARDOMAIN' \
-i 'Subject: Autorespond File you Requested: $LISTNAME'; \
cat $FILEDIR/$FILE) 2>&1 \
| $SENDMAIL -oi -t
##### This keeps a log of the address of the people who made requests.
##### A regular cron job could rename this file for you each day.
:0
| formail -xFrom: >> $FILEDIR/$LOG
}
The $EMAIL in the formail portion is also a change-- but since I don't
match yet, I don't know for sure if that part will work either.
Thanks for your help.
Bob Brown