Re: A question about procmailrc

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>> From: "Hongwei Li" <hongwei@xxxxxxxxx>
>>
>>>> From: "Hongwei Li" <hongwei@xxxxxxxxx>
>>>>
>>>>>>> On 2/2/2006 12:10 PM, Hongwei Li wrote:
>>>>>>>
>>>>>>> [snip]
>>>>>>>
>>>>>
>>>>> So, the Re: and [Fwd: in the subject line makes the code in procmailrc
>>>>> not
>>>>> working.  Why?
>>>>
>>>> Good question. "It's procmail" comes to mind. It might be this sort of
>>>> thing that has people down on procmail.
>>>>
>>>> ^Subject:.*:*.*is out of the office
>>>>
>>>> I wonder if that one will work. Zero or more characters, zero or more
>>>> colons,
>>>> another zero or more characters, then the real string.
>>>>
>>>> One thing that comes to mind with Re: and Fwd: is that the actual message
>>>> is placed inside mime quoting. So there might be two Subject lines present
>>>> and that confuses things.
>>>>
>>>
>>> Thanks for many people's help.  I did extensive tests again and here are
>>> the
>>> summary.
>>>
>>> OS: FC3 (I also tested my FC4 system, the situation is the same), sendmail
>>> 8.13.1-2
>>>
>>> Part of my .procmailrc related to this problem:
>>>
>>> SHELL=/bin/bash
>>> PATH=/bin:/usr/bin:/usr/local/bin
>>> VERBOSE=off
>>> MAILDIR=$HOME/mail
>>> SENDMAIL=/usr/sbin/sendmail
>>>
>>> # test1:
>>> :0:
>>> * ^Subject:.*is out of the.*
>>> $MAILDIR/Junk
>>>
>>> :0:
>>> * ^Subject:.*DELIVERY FAILURE.*
>>> $MAILDIR/Junk
>>>
>>> #~~~~~~~~~~~~~~~ end ~~~~~~~~~~~~~~~~~~~~~
>>>
>>> Junk is the "mail folder" under mail/ as Trash -- I tried both, the same.
>>>
>>> I use the junk emails received earlier for testing, either reply or
>>> forward.
>>> Here are the results.
>>>
>>> For the subject line:
>>>
>>> DELIVERY FAILURE...
>>> or
>>> Re: DELIVERY FAILURE...
>>> or
>>> [Fwd: DELIVERY FAILURE...
>>>
>>> My .procmailrc put the mail in Junk -- working.
>>>
>>> For the subject line:
>>>
>>> Aaa Bbb/Cccc Ddd/Eee Fffff is out of the office...
>>>
>>> The mail goes to Junk -- working normally.
>>>
>>> For the subject line:
>>>
>>> Re: Aaa Bbb/Cccc Ddd/Eee Fffff is out of the office...
>>> or
>>> [Fwd: Aaa Bbb/Cccc Ddd/Eee Fffff is out of the office...
>>
>> Try three tests:
>> Subject:.*is out of
>> Subject: Re:.*is out of
>> Subject: \[Fwd:.*is out of
>>
>> (Make sure the Lotus Notes message really uses a space character between
>> the colon and its spurious headers.)
>>
>
> First of all, we have no control on Lotus Notes.  We don't use it, but some
> departments in the school use it and it is useless to tell Lotus users what
> they should do -- those junk emails are sent out automatically by something,
> who knows who sends them out.  It is Lotus's bug, but so far the Lotus Notes
> admins in the school have not been able to figure it out what happended, why,
> and how to fix it.  That is why I want to protect my users.
>
> I tested your suggestion -- thanks for that!  By these testing, I found a new
> point that can explain all of my above tests!  That is: the procmail has a
> limit to the length of the subject line!!!  It counts only the first about 55
> characters!
>
> Subject:.*is out of
>  works for all cases, Re:, or [Fwd:, but
> Subject:.*is out of the
>  does not work at all.
>
> Then, I try to delete some letters in the middle of the subject line -- As I
> said that the subject line has a long part
> Aaaaaaaa Bbbbb/Ccccc Dddddddd/Eeee Ffffffffffffffffff is out of the office
>
> If I delete some dddd ffff etc. to make it shorter, then any of my procmail
> lines work well no matter it has Re: or [Fwd:, or others.  The matching string
> "is out of the office" is at the end of the subject line.  So, if it is too
> long (I counted, if longer than about 55 chars), then procmail could not match
> the string, and the email goes to inbox.  Once I deleted some letters in the
> middle, it matches and functions.  The Re: or [Fwd: just makes it "too long".
>
> Strange, but it is procmail's limit.
>
> Thanks!
>
> Hongwei
>

A correction:  from the beginnig of the subject line to the last searching
letter should not exceed 65 chars. For example, suppose the subject line is

Acccc Bnnnn ..... Hhhhhh is out of the office

and the matching string is "is out of the", then if the count from A (the
first letter of the subject line) to e (the last letter of the matching
string) is longer than 65, say 66, then the procmailrc does not function. 
Then, remove any one letter before "is out...", it works.

Everybody can try it to see if that is the case.

Is there anyway to lift this limit?  Since Lotus Notes may add very long and
strang things in the subject line, it will be very usefull to lift this limit
to 80 chars long or so.

Thanks!

Hongwei


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux