ISPConfig & procmail rules

Discussion in 'Tips/Tricks/Mods' started by Rescue9, Aug 9, 2007.

  1. Rescue9

    Rescue9 Member

    I've read just about every file I could read regarding email rules with ISPConfig, but it still can't get it to work.

    I focus'd on this file: http://www.howtoforge.com/forums/archive/index.php/t-9127.html

    I seem to remember this working last time I tried this installation, but I don't know what I did back then.

    Basically I have a number of Yahoo Group and forum email that I want sorted into individual folders that I created on the server.

    There's a lot of information, so if I miss something please ask.

    First, I created a .personalrules.rc file that looks like this
    Code:
    ## Begin Recipes
    ## Recipies must have reverse to match reversed words
    #
    
    # Primus Micron
    :0
    * ^Subject: .*Primus.*Micron.*
    ${HOME}/Maildir/.BGT\ Specific\.Primus\ Micron/
    
    # Patagonia Down Jacket
    :0
    * ^Subject: .*Patagonia.*Jacket.*
    ${HOME}/Maildir/.BGT\ Specific\.Patagonia\ Down\ Jacket/
    
    :0
    * ^Subject: .*Jacket.*Patagonia.*
    ${HOME}/Maildir/.BGT\ Specific\.Patagonia\ Down\ Jacket/
    
    # Big Agnes Lost Ranger
    :0
    * ^Subject: .*Lost.*Ranger.*
    ${HOME}/Maildir/.BGT\ Specific\.Big\ Agnes\ Lost\ Ranger/
    
    # Big Agnes Dual Core
    :0
    * ^Subject: .*Dual.*Core.*
    ${HOME}/Maildir/.BGT\ Specific\.Big\ Agnes\ Lost\ Ranger/
    
    # BD Mesa
    :0
    * ^Subject: .*Mesa.*
    ${HOME}/Maildir/.BGT\ Specific\.BD\ Mesa/
    
    There is more, but you get the idea.

    Second, I edited the file /root/ispconfig/isp/conf/procmailrc.master and to look like this
    Code:
    {MAILDIR_COMMENT}MAILDIR=$HOME/Maildir/
    {MAILDIR_COMMENT}DEFAULT=$MAILDIR
    {MAILDIR_COMMENT}ORGMAIL=$MAILDIR
    {QUOTA}
    INCLUDERC={PMDIR}/.mailsize.rc
    {QUOTA_COMMENT}INCLUDERC={PMDIR}/.quota.rc
    {ANTIVIRUS_COMMENT}INCLUDERC={PMDIR}/.antivirus.rc
    {MAILSCAN_COMMENT}INCLUDERC={PMDIR}/.local-rules.rc
    {MAILSCAN_COMMENT}INCLUDERC={PMDIR}/.html-trap.rc
    {SPAMASSASSIN_COMMENT}INCLUDERC={PMDIR}/.spamassassin.rc
    {AUTORESPONDER_COMMENT}INCLUDERC={PMDIR}/.autoresponder.rc
    INCLUDERC={PMDIR}/.personalrules.rc
    
    These rules worked as is without the "${HOME}/Maildir/" on my previous server, but I simply can't figure out what to do next. :(
     
  2. Rescue9

    Rescue9 Member

    I played with this for 5 hours and finally figured it out.

    Because $MAILDIR was already specified in the .procmailrc in the web# folder, I needed to remove the ${HOME}/Maildir/ from the beginning of the rules.


    Sorry to trouble.
     

Share This Page