The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

procmail question

Discussion in 'E-mail Discussions' started by Marty, Oct 31, 2003.

  1. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    Is there a way to invoke procmail for individual email accounts within a single domain hosting account?

    I want to use a set of procmail rules for test@domain.com but not for test1@domain.com.

    Can I have a separate procmailrc file for each of these accounts, and if so, where should it be put?
     
  2. mickeymouse

    mickeymouse Well-Known Member

    Joined:
    Sep 16, 2003
    Messages:
    389
    Likes Received:
    0
    Trophy Points:
    16
    Dear Marty,

    To invoke procmail for individual email accounts set filters for each accounts in procmail/rules.rc. Try to add these lines in .procmailrc

    VERBOSE=no
    MAILDIR=$HOME/email
    PMDIR=$HOME/Procmail
    INCLUDERC=$PMDIR/rules.rc

    Yes you can have a separate .procmailrc file under /home/user/.procmailrc

    Regards,
     
  3. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    thank you for the response.


    I am sure that it is me and something I don't undersand, but I am not sure I understand how this allows separate .procmailrc files for each individual account. Could you explain how the rules.rc file helps or point me to a website that explains this usage.
     
  4. netwrkr

    netwrkr Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16

    Try google it works!

    http://pegasus.rutgers.edu/~elflord/unix/procmail.html
    http://www.uwasa.fi/~ts/info/proctips.html#start
    http://userpages.umbc.edu/~ian/procmail.html
    http://www.spambouncer.org/proctut.shtml
    http://www.umbi.umd.edu/computing/procmail.html
    http://www.math.fu-berlin.de/~guckes/procmail/
     
  5. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    No offense, but I have been googling for months and still can't provide a means for a client to invoke spam assassin for one email account and not another. I can put a procmailrc file in the home directory and it effects every account, but how do I do it on an account by account basis within a single hosting account, this is the question that I have yet to find the answer too. The customer is no newbie either and is pretty good with procmail, but hasn't figured this out on a cpanel box yet either.
     
  6. netwrkr

    netwrkr Well-Known Member

    Joined:
    Apr 12, 2003
    Messages:
    203
    Likes Received:
    0
    Trophy Points:
    16

    Possibly I don't understand what your asking for. You put the .forward in the users home directory. You setup procmail and match based on

    * !(To|Cc).*test@test.com

    Plus add in any other items you want to match on. If you don't get a match based on your recipie doesn't the mail follow default routing ie. for the other users ?


    Another way I think you could do it is by calling procmail from within the /etc/valiases/domain.com file. For example take the contents of the normal procmail .forward file and place that within the valiases file:

    /etc/valiases/domain.com
    user@test.com: "|exec /home/hgoldste/bin/procmail"


    TP
     
  7. Marty

    Marty Well-Known Member

    Joined:
    Oct 10, 2001
    Messages:
    630
    Likes Received:
    1
    Trophy Points:
    18
    Okay, here is the real issue. I have a client who's cpanel username is larry and his domain name is smith.com so the email sent to larry@smith.com goes to the root email account. He would like to change the default account to :fail: but in doing so it fails all mail sent to larry@smith.com, so we create a not default account in the Manage Email accounts and now larry@smith.com mail goes to this new account. So far so good. Now all mail that is not addressed to an existing account is discarded and he can still get mail at larry@smith.com. But he wants to be able to filter the mail that goes to this account but not any other, so the filters in the control panel cannot be used. I need to use procmail for that one account. However, in my experiece, putting a .procmailrc file in the /home/larry/ directory only affects mail going to the default larry account and does not affect mail to any of the non-default accounts. I have tried putting .procmailrc files in /home/larry/mail/larry and in /home/larry/mail/smith.com/larry and neither works. How can I get mail to that one account to be processed by the procmailrc file?
     
Loading...

Share This Page