Home › Forums › OS X Server and Client Discussion › Mail › Squirrelmail Postfix Procmail SpamAssassin
- This topic has 4 replies, 1 voice, and was last updated 20 years, 1 month ago by
cshooshan.
-
AuthorPosts
-
February 4, 2005 at 7:47 am #360580
cshooshan
ParticipantHi!
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 inboxNotes:
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,
CharlieFebruary 5, 2005 at 6:28 pm #360597cshooshan
ParticipantSolved!
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/procmailrcI also changed the deliver line in procmailrc from:
:0w
| /usr/bin/cyrus/bin/deliver -a $USER -m user/$USERto:
:0w
| /usr/bin/cyrus/bin/deliver -r $SENDER -a $USER -m user/$USERso as to have the returnpath header include the real sender and not [email protected] .
Hope this helps others!
— Charlie
February 23, 2005 at 10:38 am #360800Anonymous
GuestHello
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
February 25, 2005 at 9:26 pm #360838cshooshan
ParticipantHello!
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.Smith
johnsmith Then, we issue the following commands:
newaliases
postfix reloadThe 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
February 25, 2005 at 9:28 pm #360839cshooshan
ParticipantOne correction. The aliases file entry is not
John.Smithjohnsmith
but
John.Smith [tab character] johnsmith
-
AuthorPosts
- You must be logged in to reply to this topic.
Comments are closed