Re: [exim] customizing a router - exim 4.63 debian testing

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Marco Kammerer
Dátum:  
Címzett: exim-users
Tárgy: Re: [exim] customizing a router - exim 4.63 debian testing
On Friday, November 03, 2006 4:22 PM
<Marc Haber> wrote:
> On Thu, 2 Nov 2006 22:00:09 +0100, "Marco Kammerer"
> <marco.kammerer@???> wrote:
> >I have a exim 4.63 with SA Exim and Clamav up and running and forward all
> >spamemails to a spezial "spambox".
>
> My I ask why you use SA-Exim instead of exim's built-in ACL
> spamassassin interface?
>
>

http://wiki.debian.org/PkgExim4UserFAQ#head-892f945cadf27c164ae86875dda7de41020088f3
>

First of all, thank you for posting me all these links, they help me.

To the question: Yes I use sa-exim.
Why? I found a howto and i got it working. .... so fare.

I will try around to get rid of sa-exim, when I have the minimum up and
running.
The bad thing is that it is really hard for someone who is new to exim4 to
check everything, therefore i took this working way. (but this is another
story)

My way is to improve the system slowly, step by step. if sa-exim is not
good, i will replace it.

I also heared that I can only greylist spam with a score (like 5-10) with
sa-exim without delaying every single mail.
http://marc.merlins.org/linux/exim/files/sa-exim-current/README.greylisting
tells this

> >therefore i have i use this
> >
> >accept
> >        condition = ${if <{$message_size}{100k}{1}{0}}
> >        spam = nobody
> >        set acl_m1 = spambox@???
> >        delay = 15s

> >
> >and i added tthe router
> >
> >/etc/exim4/conf.d/router/050_exim4-config_spam_redirect
> >spam_redirect:
> > debug_print = "R: scan_redirect for $domain"
> > driver = redirect
> > condition = ${if def:acl_m1 {1}{0}}
> > headers_add = X-Original-Recipient: $local_part@$domain
> > data = $acl_m1
> > redirect_router = hubbed_hosts
> >
> >
> >I want to have this "redirect" working if i have the domain the email was
> >sent to is listed in a file called
> >
> >in CONFDIR/domain_not_to_spambox
> >
> >i trieded around with this
> >
> >domain = "${if exists{CONFDIR/domain_not_to_spambox}\
> >                       {partial-lsearch;CONFDIR/domain_not_to_spambox}\
> >                        fail}"

> >
> >it is from the hubbedhosts but it is not working.
>
> You could try debugging exim with the -d switch and/or expand the
> "does not work" question.
>
> http://www.catb.org/%7Eesr/faqs/smart-questions.html
>

OK, the hint with the debugging is really nice.

for your info i reworked my router and its shorter now and works the way i
want (spam should be redirected to a spambox) and also without any acl.

spam_redirect:
  debug_print = "R: scan_redirect for $domain"
  driver = redirect
  condition = ${if def:h_X-Spam-FLAG: {1}{0}}
  headers_add = X-Original-Recipient: $local_part@$domain
  data = spambox@???
  redirect_router = hubbed_hosts
  domains = "${if exists{CONFDIR/domains_spambox}\
                   {partial-lsearch;CONFDIR/domains_spambox}\
              fail}"
  redirect_router = hubbed_hosts


http://www.exim.org/exim-html-4.63/doc/html/spec_html/ch07.html#id2545780
helped me here.

> An educated guess would be that you are using non-splt config, but you
> edit a file used in split config.
>
> http://pkg-exim4.alioth.debian.org/README/README.Debian.html#id2451550
>

I started with the split config, and tried to leave the main config like it
is and to "export" my acls to own files
like described here.

# This hook allows you to hook in your own ACLs without having to
# modify this file. If you do it like we suggest, you'll end up with
# a small performance penalty since there is an additional file being
# accessed. This doesn't happen if you leave the macro unset.
.ifdef CHECK_DATA_LOCAL_ACL_FILE
.include CHECK_DATA_LOCAL_ACL_FILE
.endif

I set the CHECK_DATA_LOCAL_ACL_FILE in the main dir in a file called

/etc/exim4/conf.d/main/00_localmacros

part of the the content:
CHECK_DATA_LOCAL_ACL_FILE = /etc/exim4/local_acl_data


> May I ask why you ask this question here instead of the Debian exim4
> mailing list?
>
> http://pkg-exim4.alioth.debian.org/README/README.Debian.html#id2452060
>

That is a great hint, thanks.

I subscribed myself there and started to searching the archive.

I still have one problem: is is that my acls are read in (update-exim.conf
tells me a misstype if i have an error) but my extension blocking is not
really working.I think it is because i am not in the right acl. I googled
around but there are many differnt options around where to put the new style
acls. some write
acl_check_mime some acl_stmp_mime some acl_check_data ....
http://www.wlug.org.nz/EximMailFilter looks nice, and was also the source
for my router (above) but the extension stuff is not working like he
describes ....
But again that is something for the debian exim list and i will post if i
have not found any solution in the archive or the net.

Kind regards,
Marco