Results 1 to 4 of 4
  1. #1
    Junior Member
    Join Date
    May 2007
    Location
    Pittsburgh, Pa
    Posts
    2

    Exclamation Procmail Help Badly Needed!!

    Hello, I am trying to redirect messages based on subject. Here is my code below:

    :0
    * ^Subject:.*(mortgage|debt|free|training|mentor)|\
    /var/spool/mail/anter

    For some reason the code will just not redirect. However when I do this:

    :0
    * ^Subject:.*(mortgage|debt|free|training|mentor)|\
    !Outside-mail@slappy.com

    Everything works peachy. There is something I am not seeing or am unawre of. PLEASE HELP!!!!!!

  2. #2

    Default

    You want:

    :0
    * ^Subject:.*(mortgage|debt|free|training|mentor)
    /var/spool/mail/anter

    The trailing "|\" is telling procmail to do an "OR" with the next line so it's treating "/var/spool/mail/anter" as a rule and not a destination.

  3. #3
    Junior Member
    Join Date
    May 2007
    Location
    Pittsburgh, Pa
    Posts
    2

    Default

    First, thank you for your reply. I copied and pasted everything exactly as you had it and still it does not redirect e-mails.

    Is there some other setting I need set that I am not aware of to enable this? Below is ALL the code from my procmailrc file:


    # Added By HostDir
    #DON’T TOUCH!!!!
    VERBOSE = “1”
    LOGABSTRACT = “yes”
    SHELL = “/bin/sh”
    LOGFILE = “/var/log/procmail”
    MAILDIR=“/var/spool/mail”


    #DON’T TOUCH!!!!
    #
    RESIDUE = `/bin/procmail_checker $DEFAULT $LOGNAME 2>/dev/null`
    :0
    * ? test $RESIDUE != “unlimited”
    {
    :0
    * > $RESIDUE
    {
    LOGFILE=/proc/self/fd/2
    LOG=”554 - Mailbox quota exceeded by $LOGNAME

    EXITCODE=69
    :0
    /dev/null
    }
    }

    #OK TOUCH!!


    :0
    * ^Subject:.*(mortgage|debt|free|training|mentor)
    /var/spool/mail/anter

  4. #4

    Default

    I tested the rule in my own configuration and it's working.

    All mail is routed through procmail by default so there is nothing to enable.

    The delivery path is setup for IMAP which is different than POP so make sure that is what you want.

    I am not sure how you modified the file but if you modified it on a Window PC and then uploaded the file you will need to either ssh into you account and run `dos2unix /etc/procmailrc` or use a text editor that uses the correct line feeds.

    You can also look at the log in /var/log/procmail to see if there are any errors.

Similar Threads

  1. Procmail using a test not in Procmailrc
    By macdj in forum E-mail / FTP Management
    Replies: 7
    Last Post: 12-19-2006, 09:01 PM
  2. SpamAssassin skipping messages
    By macdj in forum E-mail / FTP Management
    Replies: 0
    Last Post: 07-09-2006, 08:20 PM
  3. Procmail Rules Help Please
    By proaudiogear4less in forum E-mail / FTP Management
    Replies: 6
    Last Post: 04-16-2006, 04:54 AM
  4. SpamAssassin skipping messages
    By macdj in forum E-mail / FTP Management
    Replies: 17
    Last Post: 04-05-2006, 09:32 AM
  5. Bouncing spam back to senders
    By Glocom in forum E-mail / FTP Management
    Replies: 28
    Last Post: 06-14-2004, 02:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •