procmail
[Top] [All Lists]

Re: Procmail filter does not send the spam email to correct folder

2009-09-29 13:04:26
the emails comes to the mail server and go to user xxx, but because it
is smap the procmail filters it and redirects to junk mailbox,
the /var/spool/mail/
has both xxx and junk mailboxes
the /shared1/var/spool/mail
is the directory on the drbd filesystem with permissions:

[root(_at_)lexoncom ~]# ls -l /shared1/var/spool/mail
total 33720

-rw-rw---- 1 junk         mail   133435 Sep 29 11:52 junk

-rw------- 1 root         root   100238 Sep 29 04:02 root
drwxrwxrwx 2 root         root     4096 Oct 16  2008 SPAM
[root(_at_)lexoncom ~]# cd /shared1/var/spool/

[root(_at_)lexoncom spool]# ls -l
total 4
drwxr-xr-x 3 root root 4096 Sep 29 04:02 mail
[root(_at_)lexoncom spool]#

above could be a problem so i did :
[root(_at_)lexoncom spool]# chown root:mail mail
[root(_at_)lexoncom spool]# ls -l
total 4
drwxr-xr-x 3 root mail 4096 Sep 29 04:02 mail
[root(_at_)lexoncom spool]# chmod 770 mail
[root(_at_)lexoncom spool]#

But it did not help, so question is what user is trying to write to that
mailbox?



procmail: Match on "^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
procmail: Locking "junk.lock"
procmail: [4543] Tue Sep 29 12:00:36 2009
procmail: Error while writing to "__GB,00jwKB.lexoncom.com"
procmail: Lock failure on "junk.lock"
procmail: Assigning "LASTFOLDER=junk"
procmail: Opening "junk"
procmail: Error while writing to "junk"
procmail: No match on "^^rom[ ]"
procmail: Assigning
"PATH=/home/junk/bin:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/bin:/usr/X11R6/bin"
procmail: Locking "/var/mail/junk.lock"
procmail: Assigning "LASTFOLDER=/var/mail/junk"
procmail: Opening "/var/mail/junk"
procmail: Error while writing to "/var/mail/junk"
procmail: Unlocking "/var/mail/junk.lock"
procmail: Notified comsat: "junk@:**Requeued**"
From junk(_at_)lexoncom(_dot_)com  Tue Sep 29 12:00:26 2009
 Subject: [SPAM] Dear junk(_at_)lexoncom(_dot_)com 79% 0FF on Pfizer !
  Folder: **Requeued**                       




Professional Software Engineering wrote:
At 09:34 2009-09-29 -0500, Groups Account wrote:
In the procmail rc I have:

We'll have to presume this is for the generic email address you're
mailing to this list from.  The fact that you're choosing to deliver
to a mailbox filename which may or may not be your system mailbox or
something in your user home directory only helps to further confuse
the matter.

when the filter matches the procmail errors with:
procmail: Match on "^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*\*"
procmail: Locking "junk.lock"
procmail: [11464] Sun Sep 27 15:02:48 2009
procmail: Error while writing to "_IzC,oT8vKB.lexoncom.com"
procmail: Lock failure on "junk.lock"

Lock failure is most telling.  This generally implies a permissions
failure.  I'm prone to believe that you're trying to write to a
directory other than within your home dir.  The filenameing in the
"Error while writing to" further implies that you're using maildir
format - where you're not just writing to the one file in the
mailspool that you own, but you're trying to create others (which, the
lockfile is as well, though ideally, you'd have other lockfile
strategies available).

It would be helpful to know what the MAILDIR variable is set to at
this point.

below is ls of mail directory:
-rw-rw---- 1 junk         mail     8267 Sep 27 15:11 junk

~/mail/ or /var/spool/mail/ ?  Looks like /var/spool/mail

If indeed it is /var/spool/mail/ then why do you expect you'd be able
to create other files there?

and ls of /var/spool

*[root(_at_)lexoncom spool]# ls -l
total 364
lrwxrwxrwx 1 root   root       23 Sep 26 10:49 mail ->
/shared1/var/spool/mail

Okay, so above mail ref IS of /var/spool/mail/junk  this link may be
confusing things.  What are the perms on /shared1/var/spool/mail ?


---
 Sean B. Straw / Professional Software Engineering

 Procmail disclaimer:
<http://www.professional.org/procmail/disclaimer.html>
 Please DO NOT carbon me on list replies.  I'll get my copy from the
list.

____________________________________________________________
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

____________________________________________________________
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