Re: [Exim] SpamAssassin Question: Not main configuration

Startseite
Nachricht löschen
Nachricht beantworten
Autor: dman
Datum:  
To: exim-users
Betreff: Re: [Exim] SpamAssassin Question: Not main configuration
On Mon, Mar 25, 2002 at 11:31:53AM -0700, Aly Dharshi wrote:

| Hi Exim Gurus,

|
| We are putting spam assassin thru' a trial run here at the
| University of Lethbridge, I took a look at what Nigel, Dman (whose
| site is finally up again yay !!!) and company.


Yeah, we found (and corrected) the wiring problem that caused massive
packet loss!

| We would like the users to be able to deal with their spam in their
| own devious ways by doing what Dman has done, dump it into a
| directory in their home directories. We use a maildir style mailbox.
| We want to dump it so that Courier Imap server will pick it up e.g.

|
| /home/a/aly.dharshi/Maildir/.spam/new/

|
| 2 problems seem to crop up. I have a connection to LDAP to determine
| the path to their Maildir:

|
| HOME_DIR = ${lookup ldap{ldap:///ou=People,dc=email,dc=uleth,dc=ca?homeDirectory?sub?(uid=${local_part})}{$value}fail}

|
| Is it possible to add this to Dman's filter:


My filter is run as my uid/gid and is located in ~/.exim/filter. It
isn't a system-wide filter.

I think what you want to do is use a router (using exim4, right?) that
as part of the condition checks the message to see if it is spam
(after it returns to exim from SA).

I haven't tested this, but if I assume the lookup you posted is
correct, this should point you in the right direction :


begin routers

spamcheck_router:
    [...]


spam_deliver_router:
    no_verify


    condition = ${if def:h_X-Spam-Flag: {1}{0}}


    driver = accept
    transport = spam_deliver


[... rest of your routers ...]


begin transports


spam_deliver :
    driver = appendfile
    maildir_format
    check_string =
    file = "${lookup ldap{ldap:///ou=People,dc=email,dc=uleth,dc=ca?homeDirectory?sub?(uid=${local_part})}{$value}fail}/Maildir/.spam"



| Lastly will the save command write the message out as a single file
| per spam message or will there be an append going on to a file.


Depends on how you write the path.

| If there is an append what approach would you suggest to help with
| Maildir delivery.


Put a trailing slash on the path to use maildir format instead of
mbox.  Also, use
    $home/Maildir/.spam/
*not*
    $home/Maildir/.spam/new/


HTH,
-D

--

How to shoot yourself in the foot with Java:

You find that Microsoft and Sun have released imcompatible class
libraries both implementing Gun objects. You then find that although
there are plenty of feet objects implemented in the past in many other
languages, you cannot get access to one. But seeing as Java is so cool,
you dont care and go around shooting anything else you can find.
    (written by Mark Hammond)