<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Abbas &#124; Bassu &#187; exim address rewriting</title>
	<atom:link href="http://bashukhan.com/tag/exim-address-rewriting/feed/" rel="self" type="application/rss+xml" />
	<link>http://bashukhan.com</link>
	<description>Life&#039;s having zeros and ones all over</description>
	<lastBuildDate>Thu, 29 Jul 2010 13:00:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mail from root, root and root! :&gt;</title>
		<link>http://bashukhan.com/mail-from-root-root-and-root/</link>
		<comments>http://bashukhan.com/mail-from-root-root-and-root/#comments</comments>
		<pubDate>Mon, 14 Dec 2009 09:40:04 +0000</pubDate>
		<dc:creator>Abbas</dc:creator>
				<category><![CDATA[Geekism]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[exim address rewriting]]></category>
		<category><![CDATA[headers_rewrite]]></category>
		<category><![CDATA[replace root sender address]]></category>

		<guid isPermaLink="false">http://bashukhan.com/2009/12/mail-from-root-root-and-root/</guid>
		<description><![CDATA[I&#8217;m sometimes pretty sick of getting emails from &#8216;root&#8217; reporting crons, updates, errors and rest of things I would usually use daily in any Linux machine. My eyes just get sore when I see email from root in all of my email clients specially Gmail. Perhaps that&#8217;s because I&#8217;m fed up of seeing root everywhere [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m sometimes pretty sick of getting emails from &#8216;root&#8217; reporting crons, updates, errors and rest of things I would usually use daily in any Linux machine. My eyes just get sore when I see email from root in all of my email clients specially Gmail. Perhaps that&#8217;s because I&#8217;m fed up of seeing root everywhere and that&#8217;s why I&#8217;ve an alias for root to forward all these rootish emails to one of my email addresses. But that&#8217;s just not enough as I actually want to see a humane human name as a sender just instead of root :&gt;</p>
<p>To add to it, this just becomes more anguish when common, rather I would say major, Linux applications suck in changing the default sender address off from &#8216;root&#8217; (although some apps like &#8216;exim -f&#8217; and mutt having SET FROM defined in ~/.muttrc allow you to change sending address while emailing from command line but this isn&#8217;t what I needed). And so called mighty default MTA, sendmail just brings more panic to it when trying to change it during an in-mail transport (btw, I already dislike sendmail mainly cause of its sluggishness during startup and restart)! As I really had to do something about it and I already knew that Exim&#8217;s address rewriting can be helpful here so after installing it and changing default MTA with &#8216;alternative &#8211;config mta&#8217; I added a quick rewrite at transport.</p>
<pre class="brush: bash;">
$ grep -A 5 remote_smtp /etc/exim/exim.conf | tail -5

driver = smtp
headers_rewrite = root@*  some-email-address@example.com fsr
</pre>
<p>This worked but didn&#8217;t change the FROM field&#8217;s name as expected. I tried combinations of different settings including the rewrite tag &#8216;F&#8217; but the FROM envelop address kept showing the original sender root. I was searching till I stumbled upon http://www.exim.org/exim-html-2.00/doc/html/spec_32.html#SEC671 where it states the FULL &#8216;from&#8217; envelop address is changed with &#8216;w&#8217; tag and allows to have a new sender name (RFC 822) to be configured. So I added.</p>
<pre class="brush: bash;">
$ grep -A 5 remote_smtp /etc/exim/exim.conf | tail -5

driver = smtp
# Adding to rewrite the stupid root@ FROM field which I hate
headers_rewrite = root@* &quot;Abbas &lt;some-email-address@example.com&gt;&quot; fsrw
return_path = some-email-address@example.com
</pre>
<p><strong><span style="color: #333300;">And boo you naughty (!) root  <img src='http://bashukhan.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </span><br />
</strong></p>
<p><img class="alignleft size-full wp-image-62" title="screenshot3" src="http://bashukhan.com/wp-content/uploads/2009/12/screenshot3.png" alt="screenshot3" width="504" height="22" /></p>
]]></content:encoded>
			<wfw:commentRss>http://bashukhan.com/mail-from-root-root-and-root/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
