comparison xml/dnsbl.in @ 259:be939802c64e

add recipient rate limits by email from address or domain
author Carl Byington <carl@five-ten-sg.com>
date Sat, 21 Jul 2012 08:34:04 -0700
parents d6d5c50b9278
children 92a98e661a0b
comparison
equal deleted inserted replaced
258:7a16904fec66 259:be939802c64e
184 unless previously whitelisted. This milter also counts the number of 184 unless previously whitelisted. This milter also counts the number of
185 invalid HTML tags, and can reject mail if that count exceeds your 185 invalid HTML tags, and can reject mail if that count exceeds your
186 specified limit. 186 specified limit.
187 </para> 187 </para>
188 <para> 188 <para>
189 This milter can also impose hourly rate limits on the number of 189 This milter can also impose hourly and daily rate
190 recipients accepted from SMTP AUTH connections, that would otherwise be 190 limits on the number of recipients accepted from SMTP
191 allowed to relay thru this mail server with no spam filtering. 191 AUTH connections, that would otherwise be allowed to
192 relay thru this mail server with no spam filtering. If
193 the connection does not use SMTP AUTH, the rate limits
194 may be specified by the mail from email address or
195 domain.
192 </para> 196 </para>
193 <para> 197 <para>
194 Consider the case of a message from A to B passing thru this milter. If 198 Consider the case of a message from A to B passing thru this milter. If
195 that message is not blocked, then we might eventually see a reply 199 that message is not blocked, then we might eventually see a reply
196 message from B to A. If the filtering context for A includes an 200 message from B to A. If the filtering context for A includes an
730 734
731 // outbound content filtering to prevent our own customers from sending spam 735 // outbound content filtering to prevent our own customers from sending spam
732 content on { 736 content on {
733 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s"; 737 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
734 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s"; 738 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s";
735 #uribl black.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s"; 739 #uribl multi.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s";
736 ignore { include "hosts-ignore.conf"; }; 740 ignore { include "hosts-ignore.conf"; };
737 tld { include "tld.conf"; }; 741 tld { include "tld.conf"; };
738 cctld { include "cctld.conf"; }; 742 cctld { include "cctld.conf"; };
739 html_tags { include "html-tags.conf"; }; 743 html_tags { include "html-tags.conf"; };
740 html_limit on 20 "Mail containing excessive bad html tags rejected"; 744 html_limit on 20 "Mail containing excessive bad html tags rejected";
751 // we only send bounces to our own customers 755 // we only send bounces to our own customers
752 env_from unknown { 756 env_from unknown {
753 "<>" black; 757 "<>" black;
754 }; 758 };
755 759
756 // hourly recipient rate limit by smtp auth client id 760 // hourly recipient rate limit by smtp auth client id,
761 // or unauthenticated mail from address
757 // default hourly limit is 30 762 // default hourly limit is 30
758 // daily limits are 4 times the hourly limit 763 // daily limits are 4 times the hourly limit
759 rate_limit 30 4 { // default 764 rate_limit 30 4 { // default
760 #fred 100; // override default limits 765 #fred 100; // override default limits
761 #joe 10; // "" 766 #joe 10; // ""
767 #sam@somedomain.tld 500;
768 #@otherdomain.tld 100;
762 }; 769 };
763 }; 770 };
764 771
765 context main { 772 context main {
766 dnsbl localp partial.blackholes.five-ten-sg.com "Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s"; 773 dnsbl localp partial.blackholes.five-ten-sg.com "Mail from %s rejected - local; see http://www.five-ten-sg.com/blackhole.php?%s";
772 dnswl_list dnswl.org; 779 dnswl_list dnswl.org;
773 780
774 content on { 781 content on {
775 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s"; 782 filter sbl-xbl.spamhaus.org "Mail containing %s rejected - sbl; see http://www.spamhaus.org/query/bl?ip=%s";
776 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s"; 783 uribl multi.surbl.org "Mail containing %s rejected - surbl; see http://www.rulesemporium.com/cgi-bin/uribl.cgi?bl0=1&domain0=%s";
777 #uribl black.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s"; 784 #uribl multi.uribl.com "Mail containing %s rejected - uribl; see http://l.uribl.com/?d=%s";
778 ignore { include "hosts-ignore.conf"; }; 785 ignore { include "hosts-ignore.conf"; };
779 tld { include "tld.conf"; }; 786 tld { include "tld.conf"; };
780 cctld { include "cctld.conf"; }; 787 cctld { include "cctld.conf"; };
781 html_tags { include "html-tags.conf"; }; 788 html_tags { include "html-tags.conf"; };
782 html_limit off; 789 html_limit off;
788 }; 795 };
789 796
790 generic "^dsl.static.*ttnet.net.tr$|(^|[x.-])(ppp|h|host)?([0-9]{1,3}[x.-](Red-|dynamic[x.-])?){4}" 797 generic "^dsl.static.*ttnet.net.tr$|(^|[x.-])(ppp|h|host)?([0-9]{1,3}[x.-](Red-|dynamic[x.-])?){4}"
791 "your mail server %s seems to have a generic name"; 798 "your mail server %s seems to have a generic name";
792 799
793 white_regex ".*=example.com=user@yourhostingaccount.com"; 800 white_regex "=example.com=user@yourhostingaccount.com$";
794 801
795 env_to { 802 env_to {
796 # !! replace this with your domain names 803 # !! replace this with your domain names
797 # child contexts are not allowed to specify recipient addresses outside these domains 804 # child contexts are not allowed to specify recipient addresses outside these domains
798 # if this is a backup-mx, you need to include here domains for which you relay to the primary mx 805 # if this is a backup-mx, you need to include here domains for which you relay to the primary mx