Adding procmail filters

Discussion in 'Installation/Configuration' started by MeneM, May 22, 2006.

  1. MeneM

    MeneM New Member

    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
     
  2. falko

    falko Super Moderator Howtoforge Staff

    What's in youe .procmailrc file now?
    What's the output of
    Code:
    ls -la
    in the directory where .procmailrc is?
     
  3. MeneM

    MeneM New Member

    Hi Falko,

    The requested data:

    Code:
    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 ;-)

    Code:
    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#
     
  4. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    ls -la /home/www/web1/user/menem
    ?
     
  5. MeneM

    MeneM New Member

    Code:
    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.
     
  6. MeneM

    MeneM New Member

    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 ;)
     
  7. falko

    falko Super Moderator Howtoforge Staff

    That's what I wanted to check. :)
    Run
    Code:
    chmod 644 /home/www/web1/user/menem/.filter.rc
     
  8. MeneM

    MeneM New Member

    I've checked it just now, and it works currently. Thanks for the hints.

    :)

    (Beautiful product, beautiful help!)
     

Share This Page