

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
7 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Integrating SpamA...| From | Sent On | Attachments |
|---|---|---|
| Markus Ewald | May 22, 2006 12:47 am | |
| Lindsay Haisley | May 22, 2006 9:29 am | |
| Markus Ewald | May 23, 2006 1:06 am | |
| Jay Lee | May 23, 2006 5:49 am | |
| Markus Ewald | May 24, 2006 2:49 am | |
| Markus Ewald | May 24, 2006 3:18 am | |
| Markus Ewald | May 24, 2006 3:26 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | Re: [courier-users] Integrating SpamAssassin as Courier::Filter module | Actions... |
|---|---|---|
| From: | Markus Ewald (cyg...@nuclex.org) | |
| Date: | May 24, 2006 2:49:39 am | |
| List: | net.sourceforge.lists.courier-users | |
Jay Lee wrote:
I'm not sure -x is the command line option you want, the error codes returned with -x are based on errors between spamc/spamd not based on the spam status of the incoming message. Take off the -x and try checking the headers instead:
xfilter "/usr/bin/spamc" if (^X-Spam-Status: *Yes/) { echo "Message rejected as spam" EXITCODE=1 exit }
This will reject all message SA thinks are spam, you might wish to instead look for a certain spam score with:
if (/^X-Spam-Level: \*\*\*\*\*\*\*\*\*\*/:h)
which will reject messages with a SA score of 10+
Okay, fixed that.
maildrop is getting called twice for you, once during the SMTP session just after the message is received and before Courier responds with a 2xx (message accepted) or 5xx (message rejected) code. All you can do here is accept or reject a message. Later, during local delivery (long after the SMTP session has ended and Courier has fully accepted the message from the remote server). Maildrop is running again in order to deliver the message to a mailbox. This 2nd time is where you can modify headers or move the message to another user, etc.
In can see the line "message rejected as spam" in my log, but courier is still accepting mails with a SMTP 2xx result and then delivery fails with "status: deferred". I tried it using the maildroprcs folder and also by creating a .mailfilter in my user's home directory, but both methods produce the above result.
If I change DEFAULTDELIVERY to "| /usr/bin/maildrop -m", the 'xfilter' line in my user's .mailfilter produces a syntax error, which leads me to the conclusion that my maildrop is not being run in embedded mode after all. Strange.
I created /etc/courier/maildropfilter just like the documentation says:
maildropfilter This file contains one line whose contents is a pathname to the maildrop(1) mail delivery filter. In addition to being a delivery agent, maildrop can also be used as a mail filtering engine. If this file exists, Courier will be capable of invoking recipient- specified mail filters when a message is received. If the mail fil- tering rules reject the message, Courier will not accept the mes- sage for delivery. This means that when receiving mail via ESMTP, Courier will reject the ESMTP transaction without even accepting the message from the remote mail server.
This file is not installed by default. To activate mail filtering for local recipients, simply copy the contents of the maildrop con- figuration file to maildropfilter.
Jay
-Markus-







