<?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>Zenovation's Blog &#187; mail</title>
	<atom:link href="http://zenovations.com/blog/tag/mail/feed/" rel="self" type="application/rss+xml" />
	<link>http://zenovations.com/blog</link>
	<description>A blog about web design, programming, hosting, and virtualmin hacks</description>
	<lastBuildDate>Mon, 16 Jan 2012 15:01:54 +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>Sending Mail From Bash Scripts with an Attachment</title>
		<link>http://zenovations.com/blog/2010/04/sending-mail-from-bash-scripts-with-an-attachment/</link>
		<comments>http://zenovations.com/blog/2010/04/sending-mail-from-bash-scripts-with-an-attachment/#comments</comments>
		<pubDate>Tue, 27 Apr 2010 14:06:02 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[Shell]]></category>
		<category><![CDATA[Technical]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=186</guid>
		<description><![CDATA[Here is a great little tut on getting started in Bash. I&#8217;d recommend it to anyone trying to hack their way into a shell script. Here is a quick script for sending an email: ?View Code BASH#!/bin/bash &#160; # Subject of email SUBJECT=&#34;Test email with attachment from a bash script&#34; &#160; # Where to send [...]]]></description>
			<content:encoded><![CDATA[<p>Here is <a href="http://www.linux.org/lessons/advanced/x1110.html">a great little tut on getting started in Bash</a>. I&#8217;d recommend it to anyone trying to hack their way into a shell script.</p>
<p>Here is a quick script for sending an email:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p186code2'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p1862"><td class="code" id="p186code2"><pre class="bash" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">#!/bin/bash</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Subject of email</span>
<span style="color: #007800;">SUBJECT</span>=<span style="color: #ff0000;">&quot;Test email with attachment from a bash script&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Where to send it</span>
<span style="color: #007800;">TO_ADDRESS</span>=<span style="color: #ff0000;">&quot;your@email.com&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># Where the attachment is</span>
<span style="color: #007800;">ATTACHMENT_FILE</span>=<span style="color: #ff0000;">&quot;/tmp/attachment.txt&quot;</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># For fun, let's put something into the attachment</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This goes into the file.&quot;</span>  <span style="color: #000000; font-weight: bold;">&gt;</span>  <span style="color: #007800;">$ATTACHMENT_FILE</span>
<span style="color: #7a0874; font-weight: bold;">echo</span> <span style="color: #ff0000;">&quot;This appends to the file.&quot;</span> <span style="color: #000000; font-weight: bold;">&gt;&gt;</span> <span style="color: #007800;">$ATTACHMENT_FILE</span>
&nbsp;
<span style="color: #666666; font-style: italic;"># send the message</span>
<span style="color: #000000; font-weight: bold;">/</span>bin<span style="color: #000000; font-weight: bold;">/</span>mail <span style="color: #660033;">-s</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$SUBJECT</span>&quot;</span> <span style="color: #ff0000;">&quot;<span style="color: #007800;">$TO_ADDRESS</span>&quot;</span> <span style="color: #000000; font-weight: bold;">&lt;</span> <span style="color: #007800;">$ATTACHMENT_FILE</span></pre></td></tr></table></div>

]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2010/04/sending-mail-from-bash-scripts-with-an-attachment/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Changing SMTP Port to 587 (ISP Blocking and SASL)</title>
		<link>http://zenovations.com/blog/2009/03/changing-smtp-port-to-587-isp-blocking-and-sasl/</link>
		<comments>http://zenovations.com/blog/2009/03/changing-smtp-port-to-587-isp-blocking-and-sasl/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 07:27:59 +0000</pubDate>
		<dc:creator>Michael</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[mail]]></category>
		<category><![CDATA[smtp]]></category>
		<category><![CDATA[Virtualmin]]></category>

		<guid isPermaLink="false">http://zenovations.com/blog/?p=7</guid>
		<description><![CDATA[I got tired of ISPs blocking outgoing port 25, so I moved our SMTP for clients to port 587. Unfortunately, when migrating our new server, I couldn&#8217;t remember how to do this. After some Googling, I found the answer; add this line in /etc/postfix/master.cf, substituting your port number for 25000: ?View Code BASH25000 inet n - [...]]]></description>
			<content:encoded><![CDATA[<p>I got tired of ISPs blocking outgoing port 25, so I moved our SMTP for clients to port 587. Unfortunately, when migrating our new server, I couldn&#8217;t remember how to do this.</p>
<p>After some Googling, I found the answer; add this line in <em>/etc/postfix/master.cf</em>, substituting your port number for 25000:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p7code5'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p75"><td class="code" id="p7code5"><pre class="bash" style="font-family:monospace;"><span style="color: #000000;">25000</span> inet n - n - - smtpd <span style="color: #660033;">-o</span> <span style="color: #007800;">smtpd_sasl_auth_enable</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span></pre></td></tr></table></div>

<p>I left port 25 on too, so users can try either from their ISP. If you want to turn off port 25, just comment out this line:</p>

<div class="wp_codebox_msgheader"><span class="right"><sup><a href="http://www.ericbess.com/ericblog/2008/03/03/wp-codebox/#examples" target="_blank" title="WP-CodeBox HowTo?"><span style="color: #99cc00">?</span></a></sup></span><span class="left"><a href="javascript:;" onclick="javascript:showCodeTxt('p7code6'); return false;">View Code</a> BASH</span><div class="codebox_clear"></div></div><div class="wp_codebox"><table><tr id="p76"><td class="code" id="p7code6"><pre class="bash" style="font-family:monospace;">smtp    inet    n       -       n       -       -       smtpd <span style="color: #660033;">-o</span> <span style="color: #007800;">smtpd_sasl_auth_enable</span>=<span style="color: #c20cb9; font-weight: bold;">yes</span></pre></td></tr></table></div>

</p>
<p>Remember to open up the port in your server firewall as well!</p>
]]></content:encoded>
			<wfw:commentRss>http://zenovations.com/blog/2009/03/changing-smtp-port-to-587-isp-blocking-and-sasl/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

