<?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>Jontas &#187; mail</title>
	<atom:link href="http://www.f15ijp.com/tag/mail/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.f15ijp.com</link>
	<description>My digital notepad (notes etc)</description>
	<lastBuildDate>Wed, 28 Dec 2011 18:24:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>PHP Send a mail as UTF-8</title>
		<link>http://www.f15ijp.com/2011/03/01/php-send-a-mail-as-utf-8/</link>
		<comments>http://www.f15ijp.com/2011/03/01/php-send-a-mail-as-utf-8/#comments</comments>
		<pubDate>Tue, 01 Mar 2011 13:02:08 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[PHP5]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[utf-8]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=778</guid>
		<description><![CDATA[To send a mail from PHP encoded as UTF-8 is fairly easy to do by modifying the headers. //Sender with special chars (UTF-8) encoded mail&#40;'mail@example.com', '=?UTF-8?B?'.base64_encode&#40;$subjectString&#41;.'?=', $messageString, &#34;MIME-Version: 1.0\r\nContent-type: text/plain; charset=UTF-8\r\n&#34;&#41;; //Sender not UTF-8 encoded mail&#40;'mail@example.com', 'sender@mail.com', $messageString, &#34;MIME-Version: 1.0\r\nContent-type: text/plain; charset=UTF-8\r\n&#34;&#41;;]]></description>
			<content:encoded><![CDATA[<p>To send a mail from PHP encoded as UTF-8 is fairly easy to do by modifying the headers.</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">//Sender with special chars (UTF-8) encoded</span>
<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mail@example.com'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'=?UTF-8?B?'</span><span style="color: #339933;">.</span><span style="color: #990000;">base64_encode</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$subjectString</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'?='</span><span style="color: #339933;">,</span> <span style="color: #000088;">$messageString</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>Content-type: text/plain; charset=UTF-8<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #666666; font-style: italic;">//Sender not UTF-8 encoded</span>
<span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'mail@example.com'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'sender@mail.com'</span><span style="color: #339933;">,</span> <span style="color: #000088;">$messageString</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>Content-type: text/plain; charset=UTF-8<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2011/03/01/php-send-a-mail-as-utf-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.forward to several recipients</title>
		<link>http://www.f15ijp.com/2010/09/28/forward-to-several-recipients/</link>
		<comments>http://www.f15ijp.com/2010/09/28/forward-to-several-recipients/#comments</comments>
		<pubDate>Tue, 28 Sep 2010 08:08:03 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[.forward]]></category>
		<category><![CDATA[email]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=660</guid>
		<description><![CDATA[On *nix environments it is possible to forward the mail to one account to another user (or another email address if external mail is supported). This is done by adding the recipient in a file called .forward in the home directory. Example To simply forward to another address: user@server$ echo recipient@mail.com &#62; ~/.forward user@server$ chmod [...]]]></description>
			<content:encoded><![CDATA[<p>On *nix environments it is possible to forward the mail to one account to another user (or another email address if external mail is supported).<br />
This is done by adding the recipient in a file called .forward in the home directory.</p>
<p>Example To simply forward to another address:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user<span style="color: #000000; font-weight: bold;">@</span>server$ <span style="color: #7a0874; font-weight: bold;">echo</span> recipient<span style="color: #000000; font-weight: bold;">@</span>mail.com <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.forward
user<span style="color: #000000; font-weight: bold;">@</span>server$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> go-w ~<span style="color: #000000; font-weight: bold;">/</span>.forward</pre></div></div>

<p>In order to forward to several addresses coma (,) is used as a delimiter between the different recipients.</p>
<p>Example To forward to two addresses at the same time:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">user<span style="color: #000000; font-weight: bold;">@</span>server$ <span style="color: #7a0874; font-weight: bold;">echo</span> recipient1<span style="color: #000000; font-weight: bold;">@</span>mail.com,recipient2<span style="color: #000000; font-weight: bold;">@</span>mail.com <span style="color: #000000; font-weight: bold;">&gt;</span> ~<span style="color: #000000; font-weight: bold;">/</span>.forward
user<span style="color: #000000; font-weight: bold;">@</span>server$ <span style="color: #c20cb9; font-weight: bold;">chmod</span> go-w ~<span style="color: #000000; font-weight: bold;">/</span>.forward</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/09/28/forward-to-several-recipients/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux send a log (or output from a command) as a mail from the linux console</title>
		<link>http://www.f15ijp.com/2010/08/18/linux-send-a-log-as-a-mail-from-the-linux-console/</link>
		<comments>http://www.f15ijp.com/2010/08/18/linux-send-a-log-as-a-mail-from-the-linux-console/#comments</comments>
		<pubDate>Wed, 18 Aug 2010 11:00:22 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://www.f15ijp.com/?p=584</guid>
		<description><![CDATA[Sometimes it is nice to send a log or some other file as a email to someone (or a part of a file) cat myfile.txt &#124; mail -s 'SUBJECT' example@mail.com; Change myfile.txt, SUBJECT and example@mail.com to something useful. It is also possible to send the output of a command to someone ps -ef&#124;mail -s 'SUBJET' [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes it is nice to send a log or some other file as a email to someone (or a part of a file)</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">cat</span> myfile.txt <span style="color: #000000; font-weight: bold;">|</span> mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">'SUBJECT'</span> example<span style="color: #000000; font-weight: bold;">@</span>mail.com;</pre></div></div>

<p>Change myfile.txt, SUBJECT and example@mail.com to something useful.</p>
<p>It is also possible to send the output of a command to someone</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">ps</span> <span style="color: #660033;">-ef</span><span style="color: #000000; font-weight: bold;">|</span>mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">'SUBJET'</span> example<span style="color: #000000; font-weight: bold;">@</span>mail.com;</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/08/18/linux-send-a-log-as-a-mail-from-the-linux-console/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>exim4 deleting a mail from the qeue</title>
		<link>http://www.f15ijp.com/2010/02/26/exim4-deleting-a-mail-from-the-qeue/</link>
		<comments>http://www.f15ijp.com/2010/02/26/exim4-deleting-a-mail-from-the-qeue/#comments</comments>
		<pubDate>Fri, 26 Feb 2010 09:42:32 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[exim4]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailq]]></category>
		<category><![CDATA[mailserver]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=387</guid>
		<description><![CDATA[To delete one message from the exim queue exim -Mrm message-id To find the ids of all qued mails mailq If you wish to delete all the messages to a specific email recipient. exiqgrep -i -r '&#60;mail@example.com&#62;' &#124; xargs exim -Mrm Of if you wish to delete all messages that were sent from a specific [...]]]></description>
			<content:encoded><![CDATA[<p>To delete one message from the exim queue</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exim <span style="color: #660033;">-Mrm</span> message-id</pre></div></div>

<p>To find the ids of all qued mails</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">mailq</pre></div></div>

<p>If you wish to delete all the messages to a specific email recipient.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exiqgrep <span style="color: #660033;">-i</span> <span style="color: #660033;">-r</span> <span style="color: #ff0000;">'&lt;mail@example.com&gt;'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> exim <span style="color: #660033;">-Mrm</span></pre></div></div>

<p>Of if you wish to delete all messages that were sent from a specific email address.</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">exiqgrep <span style="color: #660033;">-i</span> <span style="color: #660033;">-f</span> <span style="color: #ff0000;">'&lt;mail@example.com&gt;'</span> <span style="color: #000000; font-weight: bold;">|</span> <span style="color: #c20cb9; font-weight: bold;">xargs</span> exim <span style="color: #660033;">-Mrm</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/02/26/exim4-deleting-a-mail-from-the-qeue/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>debian: Reconfigure exim4</title>
		<link>http://www.f15ijp.com/2010/02/05/debian-reconfigure-exim4/</link>
		<comments>http://www.f15ijp.com/2010/02/05/debian-reconfigure-exim4/#comments</comments>
		<pubDate>Fri, 05 Feb 2010 21:00:45 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[debian]]></category>
		<category><![CDATA[exim4]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailserver]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=298</guid>
		<description><![CDATA[To re-configure exim4 on a Debian system just run &#8220;$ dpkg-reconfigure exim4-config&#8221; This will start the configuration process and you will be guided trough the configuration process.]]></description>
			<content:encoded><![CDATA[<p>To re-configure exim4 on a Debian system just run<br />
&#8220;$ dpkg-reconfigure exim4-config&#8221;<br />
This will start the configuration process and you will be guided trough the configuration process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/02/05/debian-reconfigure-exim4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux: Turning off window scaling</title>
		<link>http://www.f15ijp.com/2010/01/29/linux-turning-off-window-scaling/</link>
		<comments>http://www.f15ijp.com/2010/01/29/linux-turning-off-window-scaling/#comments</comments>
		<pubDate>Fri, 29 Jan 2010 15:00:10 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailserver]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=269</guid>
		<description><![CDATA[A fairly common issue on the Internet is that some routers can&#8217;t handle window scaling. This will might give some odd messages to email servers (such as not being able to send mails over a certain size to one receiving mail server) On option is to turn off window scaling by editing sysctl.conf and adding [...]]]></description>
			<content:encoded><![CDATA[<p>A fairly common issue on the Internet is that some routers can&#8217;t handle <a href="http://en.wikipedia.org/wiki/TCP_window_scale_option">window scaling</a>.<br />
This will might give some odd messages to email servers (such as not being able to send mails over a certain size to one receiving mail server)</p>
<p>On option is to turn off window scaling by editing sysctl.conf and adding the following lines</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;"># Uncomment to turn off window scaling (most usefull for linux MTA)</span>
net.ipv4.tcp_window_scaling = <span style="color: #000000;">0</span></pre></div></div>

<p>A warning about doing this; In the long run throughput will not be optimal on this server, but sending mails should work better (so best used on a dedicated mail server).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/29/linux-turning-off-window-scaling/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Send mail to several to-addresses</title>
		<link>http://www.f15ijp.com/2010/01/18/send-mail-to-several-to-addresses/</link>
		<comments>http://www.f15ijp.com/2010/01/18/send-mail-to-several-to-addresses/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 12:32:49 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[sendmail]]></category>
		<category><![CDATA[mail]]></category>

		<guid isPermaLink="false">http://f15ijp.com/?p=171</guid>
		<description><![CDATA[To send email to several recipients use name &#60;name@example.com&#62;, name2 &#60;name2@example.com&#62; the part inside the brackes (&#60; &#038; &#62;) is the adress, the part before the &#60; is the name shown as the recipient. The separation char for several addresses is &#8220;,&#8221;]]></description>
			<content:encoded><![CDATA[<p>To send email to several recipients use</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">name <span style="color: #000000; font-weight: bold;">&lt;</span>name<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">&gt;</span>, name2 <span style="color: #000000; font-weight: bold;">&lt;</span>name2<span style="color: #000000; font-weight: bold;">@</span>example.com<span style="color: #000000; font-weight: bold;">&gt;</span></pre></div></div>

<p>the part inside the brackes (&lt; &#038; &gt;) is the adress, the part before the &lt; is the name shown as the recipient. The separation char for several addresses is &#8220;,&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2010/01/18/send-mail-to-several-to-addresses/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DSN 5.0.0 &#8211; Service Unavaliable</title>
		<link>http://www.f15ijp.com/2009/12/09/dsn-5-0-0-service-unavaliable/</link>
		<comments>http://www.f15ijp.com/2009/12/09/dsn-5-0-0-service-unavaliable/#comments</comments>
		<pubDate>Wed, 09 Dec 2009 21:17:38 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[sendmail]]></category>
		<category><![CDATA[DSN]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailserver]]></category>

		<guid isPermaLink="false">http://f15ijp.no-ip.org/?p=45</guid>
		<description><![CDATA[Ran into this error today on a server. Some mails got through but some was not getting through. Check that /etc/hosts has a FQDN (fully qualified domain name). Also check the size of the mails being sent, in my case the issue was that mail was to large for the receiving server thus this error [...]]]></description>
			<content:encoded><![CDATA[<p>Ran into this error today on a server. Some mails got through but some was not getting through.</p>
<p>Check that /etc/hosts has a FQDN (fully qualified domain name).</p>
<p>Also check the size of the mails being sent, in my case the issue was that mail was to large for the receiving server thus this error message was produced at the sender.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2009/12/09/dsn-5-0-0-service-unavaliable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>unqualified host name ([something]) unknow; sleeping for retry</title>
		<link>http://www.f15ijp.com/2009/11/30/unqualified-host-name-something-unknow-sleeping-for-retry/</link>
		<comments>http://www.f15ijp.com/2009/11/30/unqualified-host-name-something-unknow-sleeping-for-retry/#comments</comments>
		<pubDate>Mon, 30 Nov 2009 14:30:32 +0000</pubDate>
		<dc:creator>jontas</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[sendmail]]></category>
		<category><![CDATA[unix]]></category>
		<category><![CDATA[DNS]]></category>
		<category><![CDATA[fqdn]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[mailserver]]></category>

		<guid isPermaLink="false">http://f15ijp.no-ip.org/?p=42</guid>
		<description><![CDATA[sendmail expects to the machine to have a FQDN (fully qualified domain name). If it does not have that (type &#8220;hostname&#8221; to check what name the machine has) sendmail will complain about this and take a loot of extra time trying to find it. To use a FQDN edit &#8220;/etc/hosts&#8221; and change [something] to [something.yourdomain.com] [...]]]></description>
			<content:encoded><![CDATA[<p>sendmail expects to the machine to have a FQDN (fully qualified domain name).</p>
<p>If it does not have that (type &#8220;hostname&#8221; to check what name the machine has) sendmail will complain about this and take a loot of extra time trying to find it.</p>
<p>To use a FQDN edit &#8220;/etc/hosts&#8221; and change [something] to [something.yourdomain.com] and this will go away. Updating &#8220;/etc/hostname&#8221; at the same time might be a good idea; don&#8217;t forget to run &#8220;/bin/hostname -F /etc/hostname&#8221; after updating /etc/hostname.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.f15ijp.com/2009/11/30/unqualified-host-name-something-unknow-sleeping-for-retry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

