.procmailrc question
am 15.04.2006 05:50:09 von Reestit Mutton
Culprit for disappearing email is the blacklist test.
$HOME/.procmailrc:
--------------
# This is a custom Procmail run control file. All entries are vetted.
PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
MAILDIR=/data/mail
DEFAULT=$MAILDIR/inbox
LOGFILE=$MAILDIR/procmaillog
LOCKFILE=$HOME/.lockmail
# Process the whitelist
INCLUDERC=$MAILDIR/filters/white
# Test if the email's sender is in the blacklist
:0
* ? formail -x"From" -x"From:" -x"Sender:" \
-x"Reply-To:" -x"Return-Path:" -x"To:" \
| egrep -is -f $MAILDIR/filters/black
/dev/null
# Test if the email's sender is in the greylist
:0
* ? formail -x"From" -x"From:" -x"Sender:" \
-x"Reply-To:" -x"Return-Path:" -x"To:" \
| egrep -is -f $MAILDIR/filters/grey
junk
# Anything that has not been delivered at the end will go to $DEFAULT
# using LOCKFILE=$DEFAULT$LOCKEXT
--------------
White list works fine. Black list catches everything if the black file
has even a blank line, but passes when the black file has 0 bytes.
Apparently grey list is fine, as test messages get past it to the
default.
Any ideas?
Thanks again for reading,
Longfellow
Re: .procmailrc question
am 15.04.2006 05:57:08 von Garen Erdoisa
Longfellow wrote:
> Culprit for disappearing email is the blacklist test.
>
> $HOME/.procmailrc:
>
> --------------
> # This is a custom Procmail run control file. All entries are vetted.
>
> PATH=$HOME/bin:/usr/bin:/usr/ucb:/bin:/usr/local/bin:.
> MAILDIR=/data/mail
> DEFAULT=$MAILDIR/inbox
> LOGFILE=$MAILDIR/procmaillog
> LOCKFILE=$HOME/.lockmail
>
> # Process the whitelist
> INCLUDERC=$MAILDIR/filters/white
>
> # Test if the email's sender is in the blacklist
> :0
> * ? formail -x"From" -x"From:" -x"Sender:" \
> -x"Reply-To:" -x"Return-Path:" -x"To:" \
> | egrep -is -f $MAILDIR/filters/black
> /dev/null
>
> # Test if the email's sender is in the greylist
> :0
> * ? formail -x"From" -x"From:" -x"Sender:" \
> -x"Reply-To:" -x"Return-Path:" -x"To:" \
> | egrep -is -f $MAILDIR/filters/grey
> junk
>
> # Anything that has not been delivered at the end will go to $DEFAULT
> # using LOCKFILE=$DEFAULT$LOCKEXT
> --------------
>
> White list works fine. Black list catches everything if the black file
> has even a blank line, but passes when the black file has 0 bytes.
> Apparently grey list is fine, as test messages get past it to the
> default.
>
> Any ideas?
>
> Thanks again for reading,
>
> Longfellow
>
I did up a small test recipe simulating what you are doing.
It seemed to work as expected.
Do you have any trailing spaces in any of the lines perhaps? That might
cause one of the lines to be skipped instead of continued after the
backslash.
Garen
Re: .procmailrc question
am 15.04.2006 08:40:26 von Reestit Mutton
On 2006-04-15, Garen Erdoisa wrote:
> I did up a small test recipe simulating what you are doing.
> It seemed to work as expected.
>
> Do you have any trailing spaces in any of the lines perhaps? That might
> cause one of the lines to be skipped instead of continued after the
> backslash.
>
> Garen
Opened it in Vi. Ran the cursor to the end of each line in command
mode, and the cursor stopped on the last character of each. Indentation
is four spaces and not tabs. This is true for both the black and grey
stanzas.
Checked file permissions in $MAILDIR/filters; all the same: me as owner
and users as group, 644, etc.
What confounds me is that the stanzas are evidently identical, except
for file and destination, yet the grey list works fine (or it wouldn't
pass unrecognized messages). I even opened the rc file in a hex editor
to see if there was some lurking ASCII character difference between the
two. Nope.
And further, it all "just worked" until some point not too long ago,
when I started losing some odd stuff I don't keep anyway, and thought
nothing of it. $MAILDIR/procmaillog reveals they all arrived and went
directly to the bit bucket! And I can recall nothing that has been done
to the mail system in that time; not only can I not imagine what might
be wrong, but neither can I imagine when it might have done so!
Thanks for taking a look at this with me!
Longfellow
Re: .procmailrc question
am 15.04.2006 08:49:10 von Reestit Mutton
On 2006-04-15, Garen Erdoisa wrote:
Oops, looks like I missed a bunch of stuff in the original thread. I
think it's time for procmail to start getting "REALLY noisy" ;) So I'm
going to return there and start implementing the tests you suggest.
Thanks,
Longfellow