procmail
[Top] [All Lists]

Reply messages are not processed properly

2002-04-29 21:47:12
Hello fellows,

I sure hope that one of you can help me. I have looked in
the FAQs without success.  I am stuck with Procmail.  I am
running Redhat Linux 7.1 with apache, Sendmail as MTA and
Procmail as MDA.  I have written Perl scripts to manage a
mailing list.  I placed a recipe in a file called hrlist.rc
which is reached via an INCLUDERC line in .procmailrc.  When
the message arrives, it is piped to the Perl script, which
parses it, obtaining the main headers and then placing the
body of the message in an array. It then verifies that it
comes from one of the emails in the database and then opens
sendmail and emails the message to each of the members of
the list.  It was the only way I could think of of verifying
the sender and stripping any attachments.  All this works
fine.   The problem is that when someone tries to reply to
the message, I get an error matching a "resent-" or
something and it just doesn't work.  I turned verbose=yes
and here is a snip of the log, which I don't understand:

procmail: Assigning
"INCLUDERC=/home/arlen/procmail/autorespond.rc"
procmail: Assigning
"INCLUDERC=/home/arlen/procmail/subscribe.rc"
procmail: Assigning
"INCLUDERC=/home/arlen/procmail/hrlist.rc"
procmail: Executing "date,+%y-%m"
procmail: Assigning "MONTHFOLDER=02-04"
procmail: Executing "test -d $MONTHFOLDER || mkdir
$MONTHFOLDER"
procmail: Assigning "DUMMY="
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparent
ly(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)neighbors(_at_)arlenbeach\
.com"
procmail: No match on
"(^((Original-)?(Resent-)?(To|Cc|Bcc)|(X-Envelope|Apparent
ly(-Resent)?)-To):(.*[^-a-zA-Z0-9_.])?)vecinos(_at_)arlenbeach(_dot_)co
m"
procmail: Locking "/var/spool/mail/arlen.lock"
procmail: Assigning "LASTFOLDER=/var/spool/mail/arlen"
procmail: Opening "/var/spool/mail/arlen"
procmail: Acquiring kernel-lock
procmail: Unlocking "/var/spool/mail/arlen.lock"
From arlen  Mon Apr 29 22:18:41 2002
 Subject: Returned mail: see transcript for details
  Folder: /var/spool/mail/arlen
2479
procmail: Notified comsat: "arlen(_at_)0:/var/spool/mail/arlen"
[root(_at_)dns1 procmail]#

Here is a snip of the maillog:

Apr 29 21:50:02 dns1 sendmail[20810]: g3U1o1120810:
from=<humrod(_at_)telocity(_dot_)com>, size=1259, class=0, nrcpts=1,
msgid=<LNBBLMAKIJOIFLDLCGOIGEBJCJAA(_dot_)humrod(_at_)telocity(_dot_)com>,
proto=SMTP, daemon=MTA-ext, relay=h004.c003.snv.cp.net
[209.228.32.218]
Apr 29 21:50:05 dns1 sendmail[20811]: g3U1o1120810:
to=<neighbors(_at_)arlenbeach(_dot_)com>, delay=00:00:04,
xdelay=00:00:03, mailer=local, pri=30464, dsn=2.0.0,
stat=Sent
Apr 29 21:50:05 dns1 sendmail[20935]: g3U1o5h20935:
from=arlen, size=640, class=0, nrcpts=1,
msgid=<200204300150(_dot_)g3U1o5h20935(_at_)dns1(_dot_)usa-hosts(_dot_)com>,
relay=arlen(_at_)localhost
Apr 29 21:50:05 dns1 sendmail[20937]: g3U1o5h20935:
to=Humberto Rodriguez [mailto:neighbors(_at_)arlenbeach(_dot_)com],
ctladdr=arlen (537/502), delay=00:00:00, xdelay=00:00:00,
mailer=esmtp, pri=30640, relay=arlenbeach.com], dsn=5.1.2,
stat=Host unknown (Name server: arlenbeach.com]: host not
found)
Apr 29 21:50:05 dns1 sendmail[20937]: g3U1o5h20935:
g3U1o5g20937: DSN: Host unknown (Name server:
arlenbeach.com]: host not found)
Apr 29 21:50:09 dns1 sendmail[20937]: g3U1o5g20937:
to=arlen, delay=00:00:04, xdelay=00:00:04, mailer=local,
pri=30740, dsn=2.0.0, stat=Sent

ArlenBeach.com is a virtual host on my server.  The email
that I am using for the list is neighbors(_at_)arlenbeach(_dot_)com and
the variables $listname is "neighbors" and $listdomain is
"arlenbeach.com."  Here is the piece of the script that
mails the message to each member:

print MAIL <<EndofTEXT;
Reply-to: $listname\(_at_)$listdomain
To: $email2
From: "$messfirst $messmiddle
$messlast"<$listname\(_at_)$listdomain>
Date: $date
Subject: $subject

EndofTEXT
foreach $line (@mailbody) {
chomp $line;
print MAIL "$line\n";
}
print MAIL
"\n\n*******************************************************
**";
print MAIL "\nCopyright 2002, HR Financial Consultants,
Inc.\n";
print MAIL "mailto:humberto\(_at_)HRFinancial(_dot_)com\n";
print MAIL "http://HRFinancial.com/\n";;

Here are the headers of the message sent out by the script:

-----Original Message-----
From: Humberto Rodriguez [mailto:neighbors(_at_)arlenbeach(_dot_)com]
Sent: Monday, April 29, 2002 8:31 PM
To: humrod(_at_)telocity(_dot_)com
Subject: test 29

Here are the headers of the reply message which did not work
as it should have:

-----Original Message-----
From: Humberto Rodriguez [mailto:humrod(_at_)telocity(_dot_)com]
Sent: Monday, April 29, 2002 8:32 PM
To: neighbors(_at_)arlenbeach(_dot_)com
Subject: RE: test 29

Here is the recipe I am using:

:0
* ^TO_neighbors(_at_)arlenbeach\(_dot_)com
* ! ^X-Loop: usa(_at_)dns1\(_dot_)usa-hosts\(_dot_)com
*  ! ^FROM_DAEMON
{
:0fwh
 | formail -A"X-Loop: usa(_at_)dns1(_dot_)usa-hosts(_dot_)com"
:0c
${MONTHFOLDER}/neighbors
:0
| perl $HOME/cgi-bin/list/send.cgi
}

Well, what am I doing wrong?  Why is it impossible to reply
to a message and have it behave the same as the original?
Am I missing some necessary header or something?  or... is
there an easier way to verify the email of the sender, strip
attachments and mail messages, reply messages and forward
messages to a list?

Thanks for your help

Humberto Rodriguez
humrod(_at_)telocity(_dot_)com

_______________________________________________
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>