Home Forums OS X Server and Client Discussion Mail Squirrelmail Postfix Procmail SpamAssassin

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #360580
    cshooshan
    Participant

    Hi!

    We have spent 20+ hours trying to get SpamAssassin working with a procmail filter on our XServe 10.3.7 (for a public school system).

    We have followed to two top articles on setting up procmail and SpamAssassin. But we still have a problem — it seems that procmail cannot pull the user names from anywhere. Here’s an excerpt from the procmail log that we finally got working:

    Here’s an excerpt from the log (look for the “65” error);

    procmail: [6981] Fri Feb 4 01:42:31 2005
    procmail: Match on “^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*”
    procmail: Assigning “LASTFOLDER=/dev/null”
    procmail: Opening “/dev/null”
    procmail: Notified comsat: “cyrus@0:/dev/null”
    Subject: *****SPAM***** Re [7]
    Folder: /dev/null 17627
    procmail: [7016] Fri Feb 4 01:43:56 2005
    procmail: Assigning “HOME=/Users/”
    procmail: Assigning “DROPPRIVS=yes”
    procmail: Assuming identity of the recipient, VERBOSE=off
    procmail: Executing “spamc”
    procmail: [7016] Fri Feb 4 01:44:00 2005
    procmail: No match on “^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*”
    procmail: Executing “/usr/bin/cyrus/bin/deliver,-a,-m,user/”
    procmail: Program failure (65) of “/usr/bin/cyrus/bin/deliver”
    procmail: Assigning “LASTFOLDER=/usr/bin/cyrus/bin/deliver -a -m user/”
    procmail: Notified comsat: “cyrus@:**Requeued**”
    Subject: Miller: Equity Release Statement
    Folder: **Requeued**

    Our procmailrc looks like this:

    OGFILE=/var/log/procmail # this can be deleted after testing
    # changed by CHS
    # VERBOSE=no
    VERBOSE=yes
    HOME=/Users/$USER
    DROPPRIVS=yes

    :0fiw
    | spamc # call spamassassin

    # modified by CHS; may allow in the future
    # INCLUDERC=$HOME/.procmail # allow users to create their own recipes

    :0:
    # * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*\*\*\*\*
    * ^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*
    /dev/null
    #trash all messages with a very high spam score

    :0w
    | /usr/bin/cyrus/bin/deliver -a $USER -m user/$USER
    # if not told otherwise, deliver all messages to the user’s inbox

    Notes:

    None of our users have actual home folders on the server.

    The IMAP store is /var/spool/imap/user/

    A few of our users have pop enabled, but we encourage webmail only with SquirrelMail.

    Our main.cf and master.cf files are no different that as recommended here and by Apple.

    Any help would be greeatly appreciated,
    Charlie

    #360597
    cshooshan
    Participant

    Solved!

    The big change for the “X Serve” was changing the order in the procmail line added to master.cf

    Apple recommends:

    procmail unix – n n – – pipe
    user=cyrus argv=/usr/bin/procmail -t -m /etc/procmailrc USER=${user} EXTENSION=${extension}

    What works:

    procmail unix – n n – – pipe
    user=cyrus argv=/usr/bin/procmail -t -m SENDER=${sender} USER=${user} EXTENSION=${extension} /etc/procmailrc

    I also changed the deliver line in procmailrc from:

    :0w
    | /usr/bin/cyrus/bin/deliver -a $USER -m user/$USER

    to:

    :0w
    | /usr/bin/cyrus/bin/deliver -r $SENDER -a $USER -m user/$USER

    so as to have the returnpath header include the real sender and not [email protected] .

    Hope this helps others!

    — Charlie

    #360800
    Anonymous
    Guest

    Hello

    I was having the same problem
    Your have partially resolved my problem.

    When i send an email to [email protected], procmail deliver the email in user/bush and it’s ok.
    But if i send an email to [email protected], procmail try to deliver the email in user/g.bush.
    It seems that the $USER variable doesn’t contain the right value !
    How always obtain the right account name or convert the aliasses to the account name ??

    Cordialy

    Manu

    #360838
    cshooshan
    Participant

    Hello!

    All our users have e-mail addresses in the form [email protected]. We have added every single one to the aliases file.

    So, here’s our drill. Hope it helps you:

    User accounts are setup, as follows:

    Fullname: John Smith
    Shortname: johnsmith

    [We user “Passenger” to import and export users.]

    We make an entry in /etc/aliases

    John.Smithjohnsmith

    Then, we issue the following commands:

    newaliases
    postfix reload

    The user thinks his account is [email protected] and it works fine; but it really is [email protected] (which works, too).

    The only limitation is that in Squirrelmail, users must login by shortname (Squirrelmail has its own alias plug-in for users if they want to change their login).

    Also, in Squirrelmail, we make sure to configure it to force lowercase — I believe that it is:
    config/conf.pl, General Options (#4), Usernames in Lowercase (#6).

    This allows JohnSmith as a login (that way we can tell users to just login without the dot).

    Hope this helps!

    — Charlie

    #360839
    cshooshan
    Participant

    One correction. The aliases file entry is not

    John.Smithjohnsmith

    but

    John.Smith [tab character] johnsmith

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.

Comments are closed