| 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 | |
| 24 | DIVERT(null) |
| 25 | ###-------------------------------------------------------------------------- |
| 26 | ### User-configurable spam thresholds. |
| 27 | |
| 28 | SECTION(routers, allspam)m4_dnl |
| 29 | ## If we're verifying an address and the recipient has a `~/.mail/spam-limit' |
| 30 | ## file, then look up the recipient and sender addresses to find a plausible |
| 31 | ## limit and insert it into the `address_data' where the RCPT ACL can find |
| 32 | ## it. This router always declines, so it doesn't affect the overall outcome |
| 33 | ## of the verification. |
| 34 | SPAMLIMIT_ROUTER(fetch_spam_limit_lookup) |
| 35 | check_local_user |
| 36 | local_part_suffix = CONF_user_suffix_list |
| 37 | local_part_suffix_optional = true |
| 38 | SPAMLIMIT_LOOKUP(CONF_userconf_dir/spam-limit, |
| 39 | $local_part_prefix, $local_part, $local_part_suffix, $domain, |
| 40 | $sender_address) |
| 41 | |
| 42 | SPAMLIMIT_ROUTER(fetch_spam_limit_userv) |
| 43 | check_local_user |
| 44 | local_part_suffix = CONF_user_suffix_list |
| 45 | local_part_suffix_optional = true |
| 46 | condition = ${if exists{CONF_userconf_dir/spam-limit.userv}} |
| 47 | SPAMLIMIT_USERV(SHQUOTE($local_part), |
| 48 | $local_part_prefix, $local_part, $local_part_suffix, $domain, |
| 49 | $sender_address) |
| 50 | |
| 51 | DIVERT(null) |
| 52 | ###----- That's all, folks -------------------------------------------------- |