RE: [exim] Per-User SpamAssassin config

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Richard Hobbs
Date:  
À: 'Exim Users'
Sujet: RE: [exim] Per-User SpamAssassin config
Hello,

Thanks for the info people :-) I tried Tim Jackson's guide, and it looks
great, but the link to the webpage on "dman.ddts.net" no longer works, and
google's cache of it has gone too. Therefore, I think his approach is not
going to help me much. I don't really want to patch or reinstall/recompile
exim if I can help it.

I am therefore going to go down the route suggested by Nigel Wade of adding
a router and transport into my existing exim4 configuration.

However, I'm not too sure where to place the router... My routers are
currently in the following order:

mailman_router:
dnslookup:
system_aliases:
userforward:
localuser:

Where should spamassassin be placed? I presume it should go in between
mailman and dnslookup, right?

Also, as a passing question, should mailman actually be at the top of the
router list??

Thanks again,
Richard.

-- 
Richard Hobbs (Systems Administrator)
Toshiba Research Europe Ltd. - Speech Technology Group
Web: http://www.toshiba-europe.com/research/
Email: richard.hobbs@???
Tel: +44 1223 376964        Mobile: +44 7811 803377 


> -----Original Message-----
> From: exim-users-bounces@???
> [mailto:exim-users-bounces@exim.org] On Behalf Of Nigel Wade
> Sent: 11 July 2005 10:47
> To: 'Exim Users'
> Subject: Re: [exim] Per-User SpamAssassin config
>
> Richard Hobbs wrote:
> > Hello,
> >
> > We have a mail server on which I would like to enable
> spamassassin, but only
> > for individual users. We're running Exim 4.50 and
> SpamAssassin 3.0.3 on a
> > Debian 3.0 box. Mailman 2.1.5 is also running on the
> machine if it makes a
> > difference.
> >
> > Some users do not want spam checking to be done at all, but
> other users
> > would like it to be done. The part I'm having trouble with
> is understanding
> > how to get exim to use spamassassin at all, let alone for
> some accounts and
> > not others.
> >
> > Also, i have already spent hours on Google trying to find a
> guide or a
> > how-to somewhere, and I can't find anything.
> >
> > I have already got spamassassin working in daemon mode (by
> running spamd).
> > All I have done so far is change 'ENABLED' to '1' in
> > "/etc/default/spamassassin". All other spamassassin config
> is default apart
> > from the following line in "/etc/mail/spamassassin/local.cf":
> >
> > rewrite_header Subject ****SPAM****
> >
> > SpamAssassin detects spam successfully if I type:
> >
> > spamassassin -t < sample-spam.txt
> >
> > But I don't think this is using the spamd daemon, is it?
> How can I test
> > using 'spamc'?
>
> No, that's not using spamd. Try 'man spamc', that will tell
> you how to use it.
>
> >
> > Once we know spamc can successfully talk to spamd which
> successfully detects
> > spam, how can I let individual users enable or disable spam
> checking on
> > their account as they please? I have not changed the exim
> configuration at
> > all yet because I can't quite figure out what needs to be done.
>
> You need a router which checks for each local recipient
> whether they want to
> have their messages spam scanned. This routes messages to be
> scanned to a
> transport which will scan the message and then re-inject it
> into the queue
> for delivery. The normal test for a user who wants to have
> their messages
> scanned is the existence of the user_prefs file in their directory
> $HOME/.spamassassin.
>
> This is the router I use:
>
> HOME_DIR=/var/mail/home
>
> spamtest:
>    driver = accept
>    no_verify
>    check_local_user
>    require_files = HOME_DIR/$local_part/.spamassassin/user_prefs
>    condition = ${if eq {$received_protocol}{spam-scanned}{no}{yes}}
>    transport = spamcheck_transport

>
> and this is my transport:
>
> spamcheck_transport:
>      driver = pipe
>      home_directory = /var/spool/mail
>      batch_max = 1000
>      use_bsmtp
>      headers_remove = 
> X-Spam-Score:X-Spam-Status:X-Spam-Flag:X-Spam-Checker-Version:

X-Spam-Report:X-Spam-Level:
>      command = /usr/sbin/exim -oMr spam-scanned -bS
>      transport_filter = /usr/bin/spamc -f -s 5000000 -u $local_part
>      user = mail
>      log_output = true
>      return_fail_output = true
>      return_path_add = false
>      message_prefix =
>      message_suffix =

>
>
>
> -- 
> Nigel Wade, System Administrator, Space Plasma Physics Group,
>              University of Leicester, Leicester, LE1 7RH, UK
> E-mail :    nmw@???
> Phone :     +44 (0)116 2523548, Fax : +44 (0)116 2523555

>
> --
> ## List details at http://www.exim.org/mailman/listinfo/exim-users
> ## Exim details at http://www.exim.org/
> ## Please use the Wiki with this list - http://www.exim.org/eximwiki/
>
> _____________________________________________________________________
> This e-mail has been scanned for viruses by MCI's Internet
> Managed Scanning Services - powered by MessageLabs. For
> further information visit http://www.mci.com
>
>




_____________________________________________________________________
This e-mail has been scanned for viruses by MCI's Internet Managed Scanning Services - powered by MessageLabs. For further information visit http://www.mci.com