PDA

View Full Version : Adding procmail filters


MeneM
22nd May 2006, 22:06
Hi all,

I've changed /root/ispconfig/isp/conf/procmailrc.master so that is also has the line INCLUDERC={PMDIR}/.filter.rc

then I created a file in the users home named .filter.rc and made some procmail recipies.

But ISPconfig does not seem to include the .filter.rc in the mail delivery. When I add a temporary test recipie into .procmail.rc it does work and delivers to the desired folder. But not if I only put it in .filter.rc.

What have I forgotten? (I can see the INCLUDE in the users procmail.rc when I turn off spam checking and then turn it on again in ISPconfig. So it has picked up the addition to procmailrc.master)

Thanks,
Mark

falko
23rd May 2006, 00:09
What's in youe .procmailrc file now?
What's the output of ls -la in the directory where .procmailrc is?

MeneM
23rd May 2006, 00:20
Hi Falko,

The requested data:

isp:/home/www/web1# ls -la
total 20
drwxr-xr-x 9 menem web1 4096 2006-05-22 21:30 .
drwxr-sr-x 4 root staff 120 2006-05-20 20:44 ..
drwxrwxr-x 2 menem web1 23 2006-05-19 17:58 cgi-bin
-rw------- 1 menem web1 24 2006-05-22 20:51 .forward
-rw-rw-r-- 1 root web1 61 2006-05-20 10:02 .htpasswd
drwxr-xr-x 2 menem web1 39 2006-05-19 19:04 log
lrwxrwxrwx 1 root root 33 2006-05-22 20:51 Maildir -> /home/www/web1/user/menem/Maildir
drwxrwxrwx 2 menem web1 23 2006-05-19 17:58 phptmp
-rw-r--r-- 1 root root 522 2006-05-22 21:30 .procmailrc
drwx------ 2 10001 web1 61 2006-05-19 18:04 .spamassassin
drwxr-xr-x 2 menem web1 56 2006-05-19 20:45 ssl
drwxr-xr-x 5 menem web1 60 2006-05-20 08:17 user
lrwxrwxrwx 1 root root 41 2006-05-22 20:51 .vacation.cache -> /home/www/web1/user/menem/.vacation.cache
drwxrwxr-x 9 menem web1 4096 2006-05-20 10:02 web

And for the heck of it ;-)

isp:/home/www/web1# cat ./.procmailrc
MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
ORGMAIL=$MAILDIR

INCLUDERC=/home/www/web1/user/menem/.mailsize.rc
INCLUDERC=/home/www/web1/user/menem/.filter.rc
## INCLUDERC=/home/www/web1/user/menem/.quota.rc
INCLUDERC=/home/www/web1/user/menem/.antivirus.rc
INCLUDERC=/home/www/web1/user/menem/.local-rules.rc
INCLUDERC=/home/www/web1/user/menem/.html-trap.rc
INCLUDERC=/home/www/web1/user/menem/.spamassassin.rc
## INCLUDERC=/home/www/web1/user/menem/.autoresponder.rc
isp:/home/www/web1#

falko
23rd May 2006, 01:03
What's the output of ls -la /home/www/web1/user/menem?

MeneM
23rd May 2006, 08:37
isp:/# ls -la /home/www/web1/user/menem
total 112
drwxr-xr-x 4 menem web1 4096 2006-05-22 21:30 .
drwxr-xr-x 5 menem web1 60 2006-05-20 08:17 ..
-rw-r--r-- 1 root root 103 2006-05-22 20:51 .antivirus.rc
-rw-r--r-- 1 root root 746 2006-05-22 20:51 .autoresponder.rc
-rw-r--r-- 1 root root 22 2006-05-22 20:51 .bounce-exceed-quota.txt
-rw------- 1 root root 49 2006-05-22 20:56 .filter.rc
-rw-r--r-- 1 root root 67866 2006-05-22 20:51 .html-trap.rc
-rw-r--r-- 1 root root 3889 2006-05-22 20:51 .local-rules.rc
drwx------ 26 menem web1 4096 2006-05-23 06:50 Maildir
-rw-r--r-- 1 root root 180 2006-05-22 20:51 .mailsize.rc
-rw-r--r-- 1 root root 2660 2006-05-22 20:51 .quota.rc
-rw-r--r-- 1 root root 1142 2006-05-22 20:51 .spamassassin.rc
-rw-r--r-- 1 root root 1641 2006-05-22 20:51 .user_prefs
-rw-r--r-- 1 menem web1 0 2006-05-19 18:09 .vacation.cache
-rw-r--r-- 1 root root 0 2006-05-22 20:51 .vacation.msg
drwxrwxr-x 2 menem web1 23 2006-05-19 18:09 web
isp:/#

Thank you for looking and thinking with me.

MeneM
23rd May 2006, 08:40
Whil I did that I saw the file .filter.rc had the user/group of root/root and noone else had even so much as read rights.

Perhaps that is why?

Boy, Falko, you are a good teacher, you've made me answer my own questions ;)

falko
23rd May 2006, 10:33
That's what I wanted to check. :)
Run
chmod 644 /home/www/web1/user/menem/.filter.rc

MeneM
23rd May 2006, 13:05
I've checked it just now, and it works currently. Thanks for the hints.

:)

(Beautiful product, beautiful help!)