chiark / gitweb /
spam.m4, user-spam.m4 (COMPATIBILITY): Don't split out prefix/suffix.
[exim-config] / user-spam.m4
CommitLineData
3865ac97
MW
1### -*-m4-*-
2###
3### User-configurable spam filtering for distorted.org.uk Exim configuration
4###
5### (c) 2012 Mark Wooding
6###
7
8###----- Licensing notice ---------------------------------------------------
9###
10### This program is free software; you can redistribute it and/or modify
11### it under the terms of the GNU General Public License as published by
12### the Free Software Foundation; either version 2 of the License, or
13### (at your option) any later version.
14###
15### This program is distributed in the hope that it will be useful,
16### but WITHOUT ANY WARRANTY; without even the implied warranty of
17### MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18### GNU General Public License for more details.
19###
20### You should have received a copy of the GNU General Public License
21### along with this program; if not, write to the Free Software Foundation,
22### Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
23
24DIVERT(null)
25###--------------------------------------------------------------------------
26### User-configurable spam thresholds.
27
d057af07
MW
28m4_define(<:CURRENT_LOCAL_PART:>,
29 <:$local_part_prefix$local_part$local_part_suffix:>)
30
3865ac97
MW
31SECTION(routers, allspam)m4_dnl
32## If we're verifying an address and the recipient has a `~/.mail/spam-limit'
33## file, then look up the recipient and sender addresses to find a plausible
34## limit and insert it into the `address_data' where the RCPT ACL can find
35## it. This router always declines, so it doesn't affect the overall outcome
36## of the verification.
37SPAMLIMIT_ROUTER(fetch_spam_limit_lookup)
38 check_local_user
39 local_part_suffix = CONF_user_suffix_list
40 local_part_suffix_optional = true
41 SPAMLIMIT_LOOKUP(CONF_userconf_dir/spam-limit,
d057af07 42 CURRENT_LOCAL_PART, $domain, $sender_address)
3865ac97
MW
43
44SPAMLIMIT_ROUTER(fetch_spam_limit_userv)
45 check_local_user
46 local_part_suffix = CONF_user_suffix_list
47 local_part_suffix_optional = true
48 condition = ${if exists{CONF_userconf_dir/spam-limit.userv}}
49 SPAMLIMIT_USERV(SHQUOTE($local_part),
d057af07 50 CURRENT_LOCAL_PART, $domain, $sender_address)
3865ac97
MW
51
52DIVERT(null)
53###----- That's all, folks --------------------------------------------------