procmail
[Top] [All Lists]

RE: Separate incoming mail into 4 categories - log file??

2007-01-07 01:35:42

Hi,

I have implemented what Sean suggested and got some very confusing log
file:

procmail: [21493] Sun Jan  7 12:04:30 2007
procmail: Assigning "CLEANFROM="
procmail: [21493] Sun Jan  7 12:04:30 2007
procmail: Executing "formail,-IReply-To:,-rtzxTo:"
procmail: Assigning "MATCH="
procmail: Matched "purchase(_at_)penit(_dot_)com"
procmail: Match on "^To:[         ]*\/[^  ].*"
procmail: Assigning "TO=purchase(_at_)penit(_dot_)com"
procmail: Executing "echo ${TO}| sed -e "s/\"[^\"]*\"//"          -e
"s/\(<\([^>]*\)>\)/\2/g" -e "s/^[    ,]*//"          | tr -s "       ,"
"\n""

????  how came this variable get data like this and it happened very
often ????

procmail: Assigning "MY_TO=This account is currently not available."

procmail: Match on ! "^^^^"
procmail: Executing
"grep,-iF,This,account,is,currently,not,available.,to_list"
grep: account: No such file or directory
grep: is: No such file or directory
grep: currently: No such file or directory
grep: not: No such file or directory
grep: available.: No such file or directory
procmail: Assigning "TO_MATCHED="
procmail: Match on ! "^^^^"
procmail: Executing "grep,-i,wodoowuou(_at_)hotmail(_dot_)com,from_list"
procmail: Assigning "FROM_MATCHED="
procmail: No match on ! "^^^^"
procmail: No match on ! "^^^^"
procmail: Executing "/usr/sbin/sendmail,-oi,match_neither(_at_)penit(_dot_)com"
procmail: Assigning "LASTFOLDER=/usr/sbin/sendmail -oi
match_neither(_at_)penit(_dot_)com"
procmail: Notified comsat: "kfl_root@:/usr/sbin/sendmail -oi
match_neither(_at_)penit(_dot_)com"
From wodoowuou(_at_)hotmail(_dot_)com  Sun Jan  7 12:04:30 2007
 Subject: =?GB2312?B?y8Syvc3qs8kszt7P3tbGt6K2zNDFLLu5v8nEw72xxrc=?=
  Folder: /usr/sbin/sendmail -oi match_neither(_at_)penit(_dot_)com   1847
From admin(_at_)txxxt1(_dot_)com  Sun Jan  7 12:05:28 2007
 Subject: =?GB2312?B?oaO0+qGjv6qho7eioaPGsaGj?=
  Folder: /usr/sbin/sendmail -oi dadu(_at_)penit(_dot_)com    992
 
So, I set up a liltte file to test the sed command and assgiment of
MY_TO:

TO='"kflee" <john(_at_)162(_dot_)com,
susan(_at_)PENIT(_dot_)COM,felix(_at_)penit(_dot_)com,lily(_at_)hotmail(_dot_)com>'
 

echo ${TO}| sed -e "s/\"[^\"]*\"//"\
                -e "s/\(<\([^>]*\)>\)/\2/g"\
                -e "s/^[    ,]*//" | tr -s "       ," "\n" > t
more t
echo -------Pattern in a file -----------
grep -if t to_list
echo ------------
MY_TO=`echo ${TO}| sed -e "s/\"[^\"]*\"//" \
                -e "s/\(<\([^>]*\)>\)/\2/g" \
                -e "s/^[    ,]*//" | tr -s "      ," "\n" `

echo $MY_TO

echo -------Pattern in a varialbe ------------
grep -iF ${MY_TO} to_list

echo ------------

The result is not the same; if the pattern is in the varialbe MY_TO, it
match the first string and the string followed is errored by "No such
file or directory". Writing to file and then grep seems ok.

Any reasons?

Rgds,
Kwang-Fuh Lee.


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