procmail
[Top] [All Lists]

Procmail locking problem - mail spool file getting corrupted

2008-05-08 06:03:40
Hi,

I have a problem with my spool file getting corrupted. From viewing the
spool file, it appears that more than one process is writing to it at
the same time.

Procmail is my LDA. I suspect it is not obeying the lock files properly.

I'm hoping someone help or point me in the right direction to track down
the cause of this problem.

Firstly, I'd like someone to look at my procmailrc and tell me if it
should do what I think it should.


Rules 1 & 2 - check for attachments and pipe the message through
clamassassin. Either of them firing will create clam.lock and cause any
further instances of procmail matching these rules to wait until the
lock is removed.

Rule 3 - dumps infected stuff into a quarantine folder

Rule 4 - checks if message is shorter than 256KB and pipes through
spamassassin. locking with spam.lock. Again I assume this user cannot
send anything further to spamassassin until the lock is removed

Rule 5 - checks for the dropped F bug and uses a lock file too





Thanks.



My system uses:
-----------------------
Centos 4 (kernel 2.6.9-34.EL)
clamd-0.92.1-1.el4.rf
spamassassin-3.2.4-1.el4.rf
sendmail-8.13.1-3.RHEL4.3
procmail-3.22-14



Sample of corrupt spool file: - Notice the From line starting in the
middle of an encoded attachment from a previous message
-----------------------------
usuUT7JF3qSbXq8jMJ0VP3MWC8jo4H6cCdMoY3PS8dKMZ3JWTQWmhIkzApojP1YFGqdO0kiwI1un
ALpVWd6/gG4pMA729wqRXWbdwf6ACOztH+7v742KPLtPDavJB+knsOUaeq1flWJIVKnEiq3eBNDL
NeXR0o0oPUsYq9v5aDEG7dvCYW+xX2RZcThbNPdHH0BkytFzBab1KIlkwvLRKGFPHMFrom
support(_at_)ml(_dot_)com  Tue May  6 10:10:37 2008
Return-Path: <support(_at_)ml(_dot_)com>
X-Spam-Flag: YES
X-Spam-Checker-Version: SpamAssassin 3.2.4 (2008-01-01) on dns.mill-yard.com




My .procmailrc file:
-----------------------------
LOGFILE=procmail.log
LOGABSTRACT=all
VERBOSE=yes

:0fBHw:clam.lock
* ^Content\-(?:Disposition|Transfer-Encoding|Type)\:
(?:attachment|base64|multipart)
| /usr/local/bin/clamassassin

:0fBHw:clam.lock
* ^begin [0-9]+
| /usr/local/bin/clamassassin

:0:
* ^X-Virus-Status: Yes
mail/quarantine

:0fw:spam.lock
* < 256000
| /usr/bin/spamc

:0
* ^^rom[ ]
{
        LOG="*** Dropped F off From line - fixing up. "

        :0fhw:sed.lock
        | sed -e '1s/^/F/'
}
--------------------------------
____________________________________________________________
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>