procmail
[Top] [All Lists]

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

2009-09-29 15:42:56
sorry i meant spam not smap,
procmail is called by LDA?

my problem is still with understanding which users calls procmail, and
under which user procmail is running the rule?
Is is root or mail or other?

below are the permissions, so both root and mail have access,
if the procmail uses user account to write this is why it fails i guess

[blwegrzyn(_at_)lexoncom var]$ ls -l
lrwxrwxrwx  1 root root    10 May 14 20:02 mail -> spool/mail

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

[blwegrzyn(_at_)lexoncom spool]$ cd /shared1/var/spool/
[blwegrzyn(_at_)lexoncom spool]$ ls -l
total 4
drwxrwxr-x 3 root mail 4096 Sep 29 14:29 mail
[blwegrzyn(_at_)lexoncom spool]$

and the output of procmail -v
[root(_at_)lexoncom mail]# procmail -v
procmail v3.22 2001/09/10
    Copyright (c) 1990-2001, Stephen R. van den Berg    <srb(_at_)cuci(_dot_)nl>
    Copyright (c) 1997-2001, Philip A. Guenther         
<guenther(_at_)sendmail(_dot_)com>

Submit questions/answers to the procmail-related mailinglist by sending to:
        <procmail-users(_at_)procmail(_dot_)org>

And of course, subscription and information requests for this list to:
        <procmail-users-request(_at_)procmail(_dot_)org>

Locking strategies:     dotlocking, fcntl()
Default rcfile:         $HOME/.procmailrc
        It may be writable by your primary group
Your system mailbox:    /var/mail/root

thx
At 12:06 2009-09-29 -0500, Groups Account wrote:
the emails comes to the mail server and go to user xxx, but because it
is smap

smap?  So you're doing some experimental stuff?

 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?

usually, user (junk) with group (mail).  If written elsewhere, usually,
it'll be as the user but with whatever their primary group is.

Is procmail being invoked from a forward file, or as the LDA?

procmail: Locking "/var/mail/junk.lock"

er, /var/mail != /var/spool/mail

check perms on THAT folder.

What does 'procmail -v' report ?



Might I suggest you try specifying a path to a folder which the junk user
owns, and see how your success is then (and who owns the file, etc), then
sort the perms on whichever system spool folder is actually in use.

You might want to take a gander at my "procdiag" script (see my .sigline)
-
it collects some commonly useful information for diagnostic purposes.

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