Re: [exim] bounce per lang

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Fred Viles
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: Re: [exim] bounce per lang
On 7 Sep 2005 at 12:10, Jason Morehouse wrote about
    "[exim] bounce per lang":


| We're getting a large amount of Russian spam. Well... I think it's
| spam... but can't really read it! :)
|
| Anyway, what's the best way to bounce message per language.. or
| character set I would guess. We're using exim 4.43.


"Bounce" is a dirty word. I'll assume you mean "reject". ;)

The easiest way to do this is with the exiscan patch (if you haven't
already applied the patch, best to upgrade to 4.52). For example, I
have the following stanza in my MIME ACL:

  deny    message        = Sorry, emails must be in english \
              (detected charset=$mime_charset)\n \
              Add +bypass to username to bypass this restriction
    !sender_domains = lsearch;/usr/exim/domain_whitelist
    !authenticated    = *
    condition    = ${if match {$recipients} {.*\\+bypass} {0}{1}}
    condition    = $mime_is_coverletter
    condition    = ${if match {${lc:$mime_charset}} \
                {\N(gb2312|big5|big-5)\N} \
                {1}{0}}
    mime_regex    = \N[\x80-\xff]\N
    logwrite    = :reject: ASIAN REJECT ($mime_charset), F=$sender_address, S=$header_subject:, T=$recipients


The mime_regex condition is to check for there actually being some
non-ASCII characters in the message body, as we get legitimate email
from asian sources written in english.

Again, to make sense of this example you'll need the exiscan-acl
patch applied (or V4.5x), and refer to exiscan-acl-spec.txt (or
spec.txt).

- Fred