<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki.eddyn.net/index.php?action=history&amp;feed=atom&amp;title=Exim4_trickery</id>
	<title>Exim4 trickery - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki.eddyn.net/index.php?action=history&amp;feed=atom&amp;title=Exim4_trickery"/>
	<link rel="alternate" type="text/html" href="https://wiki.eddyn.net/index.php?title=Exim4_trickery&amp;action=history"/>
	<updated>2026-05-13T02:57:41Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.40.0</generator>
	<entry>
		<id>https://wiki.eddyn.net/index.php?title=Exim4_trickery&amp;diff=58&amp;oldid=prev</id>
		<title>Eddynetweb: /* Solution */</title>
		<link rel="alternate" type="text/html" href="https://wiki.eddyn.net/index.php?title=Exim4_trickery&amp;diff=58&amp;oldid=prev"/>
		<updated>2017-04-15T04:30:05Z</updated>

		<summary type="html">&lt;p&gt;&lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;Solution&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 04:30, 15 April 2017&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l85&quot;&gt;Line 85:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 85:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will technically place it at the bottom of the sent mail, but you can shift it up using other sections, such as the &amp;quot;.ifdef SPAMASSASSIN&amp;quot; section.  &lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;This will technically place it at the bottom of the sent mail, but you can shift it up using other sections, such as the &amp;quot;.ifdef SPAMASSASSIN&amp;quot; section.  &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Make sure to restart exim4 for functionality&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Make sure to restart exim4 for functionality!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt; &lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;Make sure to reset nginx&lt;/del&gt;!&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-side-added&quot;&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key admin_wiki:diff::1.12:old-57:rev-58 --&gt;
&lt;/table&gt;</summary>
		<author><name>Eddynetweb</name></author>
	</entry>
	<entry>
		<id>https://wiki.eddyn.net/index.php?title=Exim4_trickery&amp;diff=57&amp;oldid=prev</id>
		<title>Eddynetweb: Exim4 trickery.</title>
		<link rel="alternate" type="text/html" href="https://wiki.eddyn.net/index.php?title=Exim4_trickery&amp;diff=57&amp;oldid=prev"/>
		<updated>2017-04-15T04:29:32Z</updated>

		<summary type="html">&lt;p&gt;Exim4 trickery.&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;Common things I deal with when setting up exim4. &lt;br /&gt;
&lt;br /&gt;
== Force TLS on all SMTP connections ==&lt;br /&gt;
&lt;br /&gt;
How should I force SMTP to use TLS exclusively? &lt;br /&gt;
&lt;br /&gt;
=== Issue ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Traditionally, we&amp;#039;ve allowed SMTP to communicate over a variety of different ports, including port 25 (insecure). In this instance, we want to make sure that all the connections are made using TLS. &lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Simply visit the below directory with your choice of text editor: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;/etc/exim4/exim4.conf.template&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Then simply look for the following block: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
tls_advertise_hosts = * &lt;br /&gt;
tls_certificate = /path/to/ssl/certificate.crt&lt;br /&gt;
tls_privatekey = /path/to/ssl/certificate.key&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and add the following block. You&amp;#039;ll find we&amp;#039;ve added a new line called &amp;quot;auth_advertise_hosts&amp;quot; in this instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
tls_advertise_hosts = * &lt;br /&gt;
auth_advertise_hosts = ${if eq {$tls_cipher}{}{}{*}}&lt;br /&gt;
tls_certificate = /path/to/ssl/certificate.crt&lt;br /&gt;
tls_privatekey = /path/to/ssl/certificate.key&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will force connections when authenticating towards TLS. &lt;br /&gt;
&lt;br /&gt;
Restart exim4 and done!&lt;br /&gt;
&lt;br /&gt;
== Adding custom headers to outgoing mail ==&lt;br /&gt;
&lt;br /&gt;
If you&amp;#039;ve ever wondered how to add custom headers...&lt;br /&gt;
&lt;br /&gt;
=== Issue ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
I want to be able to provide more information from within the headers as what to do misc. (such as reporting abuse for spam, etc.) &lt;br /&gt;
&lt;br /&gt;
=== Solution ===&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
Simply visit the below directory with your choice of text editor: &lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;&amp;#039;/etc/exim4/exim4.conf.template&amp;#039;&amp;#039;&amp;#039; &lt;br /&gt;
&lt;br /&gt;
Which you will search for the following instance: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
dnslookup:&lt;br /&gt;
  driver = dnslookup&lt;br /&gt;
  domains = !+local_domains&lt;br /&gt;
  transport = remote_smtp&lt;br /&gt;
  no_more&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
...and add your custom header using &amp;quot;headers_add&amp;quot;: &lt;br /&gt;
&lt;br /&gt;
&amp;lt;source lang=&amp;quot;text&amp;quot;&amp;gt;&lt;br /&gt;
dnslookup:&lt;br /&gt;
  driver = dnslookup&lt;br /&gt;
  domains = !+local_domains&lt;br /&gt;
  transport = remote_smtp&lt;br /&gt;
  headers_add = &amp;quot;X-AntiAbuse: Suspected Abuse? Forward this email (including headers) to abuse@eddyn.net\n\&lt;br /&gt;
               X-AntiAbuse: Primary Hostname - $primary_hostname\n\&lt;br /&gt;
               X-AntiAbuse: Original Domain - $original_domain\n\&lt;br /&gt;
               X-AntiAbuse: Originator/Caller UID/GID - [$originator_uid $originator_gid] / [$caller_uid $caller_gid]\n\&lt;br /&gt;
               X-AntiAbuse: Sender Address Domain - $sender_address_domain\n&amp;quot;&lt;br /&gt;
  no_more&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will technically place it at the bottom of the sent mail, but you can shift it up using other sections, such as the &amp;quot;.ifdef SPAMASSASSIN&amp;quot; section. &lt;br /&gt;
&lt;br /&gt;
Make sure to restart exim4 for functionality! &lt;br /&gt;
&lt;br /&gt;
Make sure to reset nginx!&lt;/div&gt;</summary>
		<author><name>Eddynetweb</name></author>
	</entry>
</feed>