View previous topic :: View next topic |
Author |
Message |
JC Denton Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1991428647475bd07fc94ea.jpg)
Joined: 16 Apr 2003 Posts: 151 Location: USA
|
Posted: Thu Jan 12, 2006 11:52 pm Post subject: [SOLVED] Enabling spamassassin for Postfix's local mail |
|
|
I've been running Postfix with Spamassassin for awhile now. Here are the relevant snips from my master.cf:
Code: | smtp inet n - n - - smtpd -o content_filter=spamassassin
smtp unix - - n - - smtp -o content_filter=spamassassin
|
Code: | spamassassin
unix - n n - - pipe
user=admin argv=/usr/local/bin/spamc -f -e /usr/sbin/sendmail -oi -f ${sender} ${recipient}
|
The problem with this setup is, it doesn't do local filtering. When Joe Bob on the system mails John Doe with 'mail,' or 'mutt,' it doesn't pass through spamassassin. I tried adding the '-o content_filter' setting to the 'local' service, but that didn't seem to work. Now I'll admit, I haven't read most of the Postfix manual, it's huge after all . If I have to grin and bear it, I can do that. Although I'd like to ask my fellow Gentoo users for assistance first.
Your help, as always, is appreciated .
Last edited by JC Denton on Sun Jan 15, 2006 11:12 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JC Denton Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1991428647475bd07fc94ea.jpg)
Joined: 16 Apr 2003 Posts: 151 Location: USA
|
Posted: Sat Jan 14, 2006 11:53 pm Post subject: |
|
|
Bump. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
adsmith Veteran
![Veteran Veteran](/images/ranks/rank_rect_5_vet.gif)
Joined: 26 Sep 2004 Posts: 1386 Location: NC, USA
|
Posted: Sun Jan 15, 2006 2:38 am Post subject: |
|
|
I have exactly the same setup. I guess I never saw this behavior as a problem.
My first guess was the thing you already tried, but of course it doesn't work because of the delivery flowchart of postfix.
The only other thing I can recommend is to very carefully read the documentation at http://www.postfix.org/documentation.html. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JC Denton Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1991428647475bd07fc94ea.jpg)
Joined: 16 Apr 2003 Posts: 151 Location: USA
|
Posted: Sun Jan 15, 2006 6:26 am Post subject: |
|
|
adsmith wrote: | I have exactly the same setup. I guess I never saw this behavior as a problem.
My first guess was the thing you already tried, but of course it doesn't work because of the delivery flowchart of postfix.
The only other thing I can recommend is to very carefully read the documentation at http://www.postfix.org/documentation.html. |
Got it to work . I had to use SpamPD. The spamc/spamd setup won't filter mail sent via the local Postfix sendmail command.
There's an extra catch though. SpamPD can't handle TLS. If you have smtpd_use_tls = yes, then it will try to talk TLS with SpamPD, crashing the smtpd program. There's a workaround though, since some of us like our encrypted mail . The smtp_tls_per_site directive allows a DB file to be specified. In that file, you can set "use no TLS with this host" for 127.0.0.1.
Hope this helps some folks... |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
magic919 Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 17 Jun 2005 Posts: 2182 Location: Berkshire, UK
|
Posted: Sun Jan 15, 2006 5:54 pm Post subject: |
|
|
This seems a lot of work to make sure local users don't spam each other. Clearly the sendmail binary just drops the messages into the Postfix maildrop queue, so SA won't see them. Why not invoke SA by using procmail or maildrop? This would ensure all messages are scanned as they are delivered to the mailbox. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
JC Denton Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/1991428647475bd07fc94ea.jpg)
Joined: 16 Apr 2003 Posts: 151 Location: USA
|
Posted: Sun Jan 15, 2006 11:11 pm Post subject: |
|
|
magic919 wrote: | This seems a lot of work to make sure local users don't spam each other. Clearly the sendmail binary just drops the messages into the Postfix maildrop queue, so SA won't see them. Why not invoke SA by using procmail or maildrop? This would ensure all messages are scanned as they are delivered to the mailbox. |
I considered that, but really SpamPD seemed like a better solution. There are times when spamd crashes, and the message just bounces. With the SA proxy, the message will be queued. I'm currently using maildrop to invoke spamprobe though. Good stuff . |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|