<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Sendmail_Config_Antispam</id>
	<title>Sendmail Config Antispam - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://plnx.nl/wiki/index.php?action=history&amp;feed=atom&amp;title=Sendmail_Config_Antispam"/>
	<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=Sendmail_Config_Antispam&amp;action=history"/>
	<updated>2026-05-03T12:44:44Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.42.6</generator>
	<entry>
		<id>https://plnx.nl/wiki/index.php?title=Sendmail_Config_Antispam&amp;diff=12&amp;oldid=prev</id>
		<title>Pverha10: Created page with &quot;=Don&#039;t allow domain hijack= The following configuration part is a replacement for the check_mail ruleSet. It can check whether the domains from LocalDomains within the from-addresses being offered to sendmail are coming from the IP-addresses/ranges that are defined in LocalIP. Please make sure the space in between the left-hand-side and the right-hand-side of the configuration are seperated by tabs.  &lt;pre&gt; F{LocalDomains} /etc/mail/LocalDomains F{LocalIP} /etc/mail/Local...&quot;</title>
		<link rel="alternate" type="text/html" href="https://plnx.nl/wiki/index.php?title=Sendmail_Config_Antispam&amp;diff=12&amp;oldid=prev"/>
		<updated>2025-05-17T07:41:09Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;=Don&amp;#039;t allow domain hijack= The following configuration part is a replacement for the check_mail ruleSet. It can check whether the domains from LocalDomains within the from-addresses being offered to sendmail are coming from the IP-addresses/ranges that are defined in LocalIP. Please make sure the space in between the left-hand-side and the right-hand-side of the configuration are seperated by tabs.  &amp;lt;pre&amp;gt; F{LocalDomains} /etc/mail/LocalDomains F{LocalIP} /etc/mail/Local...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;=Don&amp;#039;t allow domain hijack=&lt;br /&gt;
The following configuration part is a replacement for the check_mail ruleSet. It can check whether the domains from LocalDomains within the from-addresses being offered to sendmail are coming from the IP-addresses/ranges that are defined in LocalIP. Please make sure the space in between the left-hand-side and the right-hand-side of the configuration are seperated by tabs.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
F{LocalDomains} /etc/mail/LocalDomains&lt;br /&gt;
F{LocalIP} /etc/mail/LocalIP&lt;br /&gt;
&lt;br /&gt;
Scheck_mail&lt;br /&gt;
# ruleset 3 makes the input into a normal e-mail address (user&amp;lt;@blaat.nl.&amp;gt;)&lt;br /&gt;
R$*                     $: $&amp;gt;3 $1&lt;br /&gt;
&lt;br /&gt;
# first: get client addr&lt;br /&gt;
R$+                     $: $(dequote &amp;quot;&amp;quot; $&amp;amp;{client_addr} $) $| $1&lt;br /&gt;
# no client_addr, smmsp?&lt;br /&gt;
R0 $| $*                $: $&amp;gt;&amp;quot;check_mail2&amp;quot; $1&lt;br /&gt;
# client_addr in /etc/mail/LocalIP? then go to SLocal_check_mail&lt;br /&gt;
R$={LocalIP}$* $| $*    $: $1 $| $&amp;gt;&amp;quot;Local_check_mail&amp;quot; $1&lt;br /&gt;
&lt;br /&gt;
# mail from user@domain, domain in /etc/mail/LocalDomains? Then reject, because it is not a local IP&lt;br /&gt;
R$*&amp;lt;@$={LocalDomains}.&amp;gt;$*        $#error $@ 5.7.1 $: &amp;quot;550 We don&amp;#039;t accept junk mail from our own domains&amp;quot;&lt;br /&gt;
R$*&amp;lt;@$={LocalDomains}&amp;gt;$*         $#error $@ 5.7.1 $: &amp;quot;550 We don&amp;#039;t accept junk mail from our own domains&amp;quot;&lt;br /&gt;
&lt;br /&gt;
SLocal_check_mail&lt;br /&gt;
Scheck_mail2&lt;br /&gt;
R$*                     $: $1 $| $&amp;gt;&amp;quot;Local_check_mail&amp;quot; $1&lt;br /&gt;
R$* $| $#$*             $#$2&lt;br /&gt;
R$* $| $*               $@ $&amp;gt;&amp;quot;Basic_check_mail&amp;quot; $1&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LocalDomains:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
localhost&lt;br /&gt;
beeblebrox.example.com&lt;br /&gt;
foobar.example.com&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
LocalIP:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
127.&lt;br /&gt;
192.168.1.2&lt;br /&gt;
10.12.&lt;br /&gt;
IPv6:::1&lt;br /&gt;
IPv6:2001:dead:beef:&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>Pverha10</name></author>
	</entry>
</feed>