procmail
[Top] [All Lists]

Re: can't get 'From' field : "This account is currently not available."

2000-11-05 23:24:09
At 21:20 2000-11-05 -0700, mike wrote:

Problem:
I cannot seem to get the "From" field from the incoming email. I have tried
to get it two ways:

From: or From, *OR* the appropriate address to send an autoreply to?

# contains the line, but also with trailing date/time.  This is "From "
:0
* ^From[        ]*\/[^  ].*
{
        REALSENDER=$MATCH
}

# contains the From: line, which may include non-address text
:0
* ^From:[       ]*\/[^  ].*
{
        FROM=$MATCH
}

# The generally accepted was to extract the senders RETURN address:
:0 h
SENDER=|formail -b -rtzxTo:

1.   FROM_=`formail | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
2.   FROM=`^(From[   ]|(Old-|X-)?(Resent-)?(From|Reply-To|Sender):)(.*\<)?`

WTF?  Where did you get these syntaxes from?

#FROM_=`formail | expand | sed -e 's/^[ ]*//g' -e 's/[ ]*$//g'`
FROM=`^(From[   ]|(Old-|X-)?(Resent-)?(From|Reply-To|Sender):)(.*\<)?`

What exactly do you figure this is being passed? This isn't running as a recipe match...


I'm not trying to be harsh here, but BEFORE you try doing autoresponses (which most definatley will affect other people - including those on mailing lists), you should definatley do some further readings on procmail, and before making the rule live, do thorough testing in a testbed environment - one uncontrolled mailloop can ruin your sysadm's day (or night), and potentially annoy a LOT of people on mailing lists.

---
 Please DO NOT carbon me on list replies.  I'll get my copy from the list.

 Sean B. Straw / Professional Software Engineering
 Post Box 2395 / San Rafael, CA  94912-2395

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