procmail
[Top] [All Lists]

Wierd error in my logs

2008-12-05 09:43:56
On my personal email account I have minimal logging since I 1) don't get that much email on it and 2) haven't touch the procmailrc in a couple of years. Today, however, i got a reply to a message that I nevr ot the original to. Thinking it'd been marked as spam, I searched the spam, but no, the original was just gone. In tracking it down, I found that it was received on my server and parsed by procmail, but I got this error:

2008-Dec-04 20:40:15 -0700; ARG = TO = Mom <*munged*(_at_)yahoo(_dot_)com>, First Last <*munged*(_at_)gmail(_dot_)com>, "First Last (work)" <*munged*(_at_)*munged*(_dot_)org>, <kreme(_at_)kreme(_dot_)com>
/bin/bash: -c: line 0: syntax error near unexpected token `work'
/bin/bash: -c: line 0: ` /usr/bin/strings .cache_lists | egrep -w " Mom <*munged*(_at_)yahoo(_dot_)com>|First Last <*munged*(_at_)gmail(_dot_)com>|"First Last (work)" <*munged*(_at_)*munged*(_dot_)org>|<kreme(_at_)kreme(_dot_)com>'

[ I munged the other addresses, but left their forms intact ]

So, I know what is happening, even with the minimal logging, the () is screwing up the following match:

:0
* 9876543210^0 ^Cc:.*
* 9876543210^0 ^To:.*,
{
  :0
  * ^To:(.*[^-a-zA-Z0-9_.])?\/.*
  { TTO = $MATCH }
  :0
  * ^Cc:(.*[^-a-zA-Z0-9_.])?\/.*
  { CC = $MATCH }

   :0
   * ^TO_\/.*
   {
      ETO=`echo "$TTO $CC" | sed 's/[, ] \{1,\}/|/g'`
   }
}

* LISTNAME ?? ^^^^
* ! ETO ?? ^^^^
{
   :0

## Match is here
   * $ ? /usr/bin/strings .cache_lists | egrep -w \"$ETO\"
## Match is here
   {
      :0fw
      | formail -I"Status: RO"-I"X-covisp-list: NO"

      :0:
      duplicates

   }
}

This is in the section where I check if a message that doesn't look like a list message is actually a reply to a list message.

So, how do I fix the echo, the sed, or the egrep? I thought the \"$ETO \" would send the value through inside double quotes, thus protecting from these sorts of expansion issues.

The other question is, where's the message? As near as I can tell it's gone.

--
We will fight for Bovine Freedom and hold our large heads high
We will run free with the Buffalo or die

____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

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