1 <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
4 <title>HOWTO - Preventing Relaying</title>
7 <body bgcolor="#FFFFFF" text="#00005A" link="#FF6600" alink="#FF9933" vlink="#990000">
8 <h1>HOWTO - Preventing Relaying</h1>
10 <p>Many people want to get a free ride from your system by using
11 it for relaying their mail. This can be due to them being
12 corrupt and wishing to let you take the rap for relaying their
13 junk, or them being lazy and unable to make their own systems
14 work. In any case this is a theft of service and needs to be
17 <h2>Exim v4.x Relay Control</h2>
19 <p>Exim v4.x has completely different and considerably more
20 flexible mail policy controls than earlier versions. The
21 documentation is also considerable more complete and the default
22 configuration file has a well commented section on relay control
23 (in the <tt>RCPT TO</tt> ACL. You should instead read the
24 specification section on <a
25 href="http://www.exim.org/exim-html-4.20/doc/html/spec_37.html">Access
26 Control Lists</a>.</p>
28 <h2>Exim v3.x Relay Configuration Options</h2>
30 <p>These are fully detailed in the <a href="../exim-html-3.20/doc/html/spec.html"
31 target="_top">Exim Specification Document</a>. The specific
32 section on relaying is <a
33 href="../exim-html-3.20/doc/html/spec_46.html#SEC813">here</a> </p>
36 <li>Firstly you need to specify the local mail domains as
37 tightly as possible. <tt>local_domains</tt> should only cover
38 domains that really are local - this is relevant since exim
39 allows any sender to mail to these domains (since you have
40 told exim those domains are local you are not actually
41 relaying by sending to them.</li>
43 <li>Any domains that are not finally handled by the local exim,
44 but can legitmately be relayed through (ie domains you act as
45 backup MX for) should be specified in the
46 <tt>relay_domains</tt>, although a short cut for doing this is
47 setting <tt>relay_domains_include_local_mx</tt> which can be
48 used to abuse your mail server by adding MXes pointing at you,
49 but raises the bar so much higher than it is normally good
52 <li>You probably want to be able to relay out from local
53 machines on the same network - be careful here since any open
54 machine on your network could be used to do unauthorised
55 relaying. The control of hosts that can relay is done with the
57 href="../exim-html-3.20/doc/html/spec_11.html#SEC235">host_accept_relay</a></tt>
62 <p>The standard settings for a workstation, allowing relaying
63 through the loopback (since packages such as MH post mail this
67 no_relay_domains_include_local_mx
68 no_relay_match_host_or_sender
69 host_accept_relay = 127.0.0.1/8
71 <p>this is actually the default settings other than that for
72 <tt>host_accept_relay</tt>.</p>
74 <p>The information to do more complicated manipulations can be
75 found in the specification document and is outside the scope of
78 <address><a href="mailto:Postmaster@exim.org">Nigel Metheringham</a></address>
79 <!-- Created: Mon Aug 25 15:46:41 BST 1997 -->