<?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>gruchalski.com &#187; Uncategorized</title>
	<atom:link href="http://gruchalski.com/category/uncategorized/feed/" rel="self" type="application/rss+xml" />
	<link>http://gruchalski.com</link>
	<description>confessions of a ria developer</description>
	<lastBuildDate>Sat, 08 May 2010 16:43:16 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Greasemonkey script to remove unwanted results from Google</title>
		<link>http://gruchalski.com/2009/09/15/greasemonkey-script-to-remove-unwanted-results-from-google/</link>
		<comments>http://gruchalski.com/2009/09/15/greasemonkey-script-to-remove-unwanted-results-from-google/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 15:35:44 +0000</pubDate>
		<dc:creator>radekg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gruchalski.com/?p=360</guid>
		<description><![CDATA[For myself, for future reference: [sourcecode lang="js"] // ==UserScript== // @name Expert blocker // @namespace my // @description Eliminate Experts Exchange results from Google searches. // @include http://*.google.com/search?* // @include http://*.google.co.uk/search?* // ==/UserScript== var results = document.getElementsByTagName(&#34;a&#34;); for ( var i=0; i&#60;results.length; i++ ) { if ( results[i].href.indexOf(&#34;http:/ /www.experts-exchange.com&#34;) == 0 &#124;&#124; results[i].href.indexOf(&#34;http:/ /swik.net&#34;) == [...]]]></description>
			<content:encoded><![CDATA[<p>For myself, for future reference:</p>
<pre>[sourcecode lang="js"]
// ==UserScript==
// @name           Expert blocker
// @namespace      my
// @description    Eliminate Experts Exchange results from Google searches.
// @include        http://*.google.com/search?*
// @include        http://*.google.co.uk/search?*
// ==/UserScript==

var results = document.getElementsByTagName(&quot;a&quot;);
for ( var i=0; i&lt;results.length; i++ ) {
	if (
		results[i].href.indexOf(&quot;http:/ /www.experts-exchange.com&quot;) == 0
		|| results[i].href.indexOf(&quot;http:/ /swik.net&quot;) == 0 ) {
		results[i].parentNode.parentNode.style.display = &quot;none&quot;;
	}
}
[/sourcecode]</pre>
<p>Before using, in the URLs replace <em>http:/ /</em> with <em>http://</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://gruchalski.com/2009/09/15/greasemonkey-script-to-remove-unwanted-results-from-google/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Windows 7 Release Candidate &#8211; first look</title>
		<link>http://gruchalski.com/2009/05/01/windows-7-release-candidate-first-look/</link>
		<comments>http://gruchalski.com/2009/05/01/windows-7-release-candidate-first-look/#comments</comments>
		<pubDate>Fri, 01 May 2009 22:15:45 +0000</pubDate>
		<dc:creator>radekg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gruchalski.com/?p=235</guid>
		<description><![CDATA[Today I got my hands on fresh Windows 7 RC so I decided to give it a&#160;shot. I installed it on VirtualBox 2.2, VM with 1GB of RAM and I have to admit, I am impressed. There is no visible changes in the UI, the only thing that&#8217;s changed is the installer, it is really [...]]]></description>
			<content:encoded><![CDATA[<p>Today I got my hands on fresh Windows 7 RC so I decided to give it a&nbsp;shot. I installed it on VirtualBox 2.2, VM with 1GB of RAM and I have to admit, I am impressed.</p>
<p>There is no visible changes in the UI, the only thing that&#8217;s changed is the installer, it is really nice, much nicer than any previous installer. But here is the thing, I couldn&#8217;t really enjoy it too long. Installation took only 22 minutes. I wanted to see how quick it is on the boot time. Fresh start, with login screen, 47 seconds&#8230; The interface is responsive straight away. That is very good result for Windows running on only 1GB of RAM. I would love to see it on a physical machine.</p>
<p>First impression &#8211; I like it. It feels like it is ready to rock. If I just wasn&#8217;t in love with Ubuntu&#8230; :)</p>
]]></content:encoded>
			<wfw:commentRss>http://gruchalski.com/2009/05/01/windows-7-release-candidate-first-look/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring postfix as a relay for GMail</title>
		<link>http://gruchalski.com/2009/04/27/configuring-postfix-as-a-relay-for-gmail/</link>
		<comments>http://gruchalski.com/2009/04/27/configuring-postfix-as-a-relay-for-gmail/#comments</comments>
		<pubDate>Mon, 27 Apr 2009 00:45:13 +0000</pubDate>
		<dc:creator>radekg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gruchalski.com/?p=196</guid>
		<description><![CDATA[For the domain this blog is running on I have a separate GMail account, I&#160;wanted my server to relay all email there. I was searching quite a lot for detailed info on how to set up postfix correctly but could not find any. All&#160;information was scattered across different blogs, websites, forums. I just achieved the [...]]]></description>
			<content:encoded><![CDATA[<p>For the domain this blog is running on I have a separate GMail account, I&nbsp;wanted my server to relay all email there. I was searching quite a lot for detailed info on how to set up <em>postfix</em> correctly but could not find any. All&nbsp;information was scattered across different blogs, websites, forums. I just achieved the target and I thought I will share what I just learned.</p>
<p>All command below were executed under the <em>root</em> account. If an account used is not root use <em>sudo</em> and make sure it is a <em><a href="https://help.ubuntu.com/community/Sudoers">sudoer</a></em>.</p>
<p>Confirm that the <em>openssl</em> is installed and if not, install it (on my Ubuntu 8.10 I&nbsp;had it installed by default). If <a href="http://en.wikipedia.org/wiki/Certificate_Authority">CA certificate</a> was not generated before it is time to do it. On Ubuntu it is nothing else than running following command from the terminal:</p>
<pre>[source lang='bash']
/usr/share/ssl/misc/CA.sh -newca
[/source]</pre>
<p>If an error is returned it may suggest that the <em>CA.sh</em> script is somewhere else. To find it simply execute following:</p>
<pre>[source lang='bash']
find / -name 'CA.sh'
[/source]</pre>
<p>and run the first command again with correct <em>CA.sh</em> path. While generating CA certificate the script will ask some questions, just follow the instructions, it is really short and painless process.</p>
<p>The next step is to install <em>postfix</em>.</p>
<pre>[source lang='bash']
apt-get install postfix
[/source]</pre>
<p>Answer the questions using default options, it appears that in most cases they are fine. Just make sure first question is answered with <em>Satellite system</em> option.</p>
<p>To make sure this process is going to work postfix must be configured with <em>SASL</em> and <em>TLS</em> support and on Ubuntu it was by default, indeed. It can be verified with following command:</p>
<pre>[source lang='bash']
ldd /usr/lib/postfix/smtp
[/source]</pre>
<p>Look for the line starting with the <em>libssl</em>. I bet it will be there. BUT if not, postfix must be reconfigured with SASL and TLS. Here is just one of the articles of many I found showing how to do it: <a href="http://jonsview.com/2009/03/26/how-to-setup-email-services-on-ubuntu-using-postfix-tlssasl-and-dovecot">Setup Email Services on Ubuntu Using Postfix (TLS+SASL)</a>.</p>
<p>Once postfix is running:</p>
<pre>[source lang='bash']
cd /etc/postfix
mkdir certs
cd certs
openssl genrsa -out itchy.key 1024
openssl req -new -key itchy.key -out itchy.csr
openssl ca -out itchy.pem -infiles itchy.csr
nano main.cf
[/source]</pre>
<p>To search for the string in nano use <em>CTRL+W</em>. Look for <em>myhostname</em> key. I&nbsp;have a <em>mx.gruchalski.com</em> value but <em>gruchalski.com</em> would work just fine. Next important bit is <em>mydestination</em> key. I have changed it to <em>smtp.gmail.com</em> and I will explain why in a second. Last key to change is the <em>relayhost</em>. Set it to <em>[smtp.gmail.com]:587</em>. At the end of the file add following lines:</p>
<pre>[source lang='bash']
# auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps=hash:/etc/postfix/sasl_passwd

# tls
smtp_use_tls=yes
smtp_sasl_security_options=noanonymous
smtp_sasl_tls_security_options=noanonymous
smtp_tls_note_starttls_offer=yes
tls_random_source=dev:/dev/urandom
smtp_tls_scert_verifydepth=5
smtp_tls_key_file=/etc/postfix/certs/itchy.key
smtp_tls_cert_file=/etc/postfix/certs/itchy.pem
smtpd_tls_ask_ccert=yes
smtpd_tls_req_ccert=no
smtp_tls_enforce_peername=no
[/source]</pre>
<p><em>CTRL+O</em> to save and <em>CTRL+X</em> to exit.</p>
<p>At this point <em>/etc/postfix/sasl_passwd</em> file does not exist yet, so:</p>
<pre>[source lang='bash']
nano /etc/postfix/sasl_passwd
[/source]</pre>
<p>Add these two files:</p>
<pre>[source lang='bash']
gmail-smtp.l.google.com user@gmail.com:password
smtp.gmail.com user@gmail.com:password
[/source]</pre>
<p>Make sure that the correct credentials are set. Save, exit the file and execute:</p>
<pre>[source lang-'bash']
postmap /etc/postfix/sasl_passwd
/etc/init.d/postfix reload
apt-get install mailutils
[/source]</pre>
<p>It is time to test postfix, that is why I installed <em>mailutils</em>.</p>
<pre>[source lang='bash']
echo "Testing relay from terminal" | mail -s "Test relay" to@email -f from@email
[/source]</pre>
<p>Well, the <em>-f</em> option is not going to work here anyway but it does not brake anything either :) If an email did not arrived please check <em>/var/log/mail.log</em> for details.</p>
<p>And now an explanation why <em>mydestination</em> key was changed. Let&#8217;s say my server name is <em>funkyserver.com</em> and from the terminal or Apache web server I am sending an email to <em>d&#8217;oh@funkyserver.com</em>. But I have a  <em>d&#8217;oh</em> user on the server as well. Postfix is going to think <q><em>oh, hang on mate, my name is funkyserver.com and you are sending an email to the user who BELONGS TO ME! I am so smart, I am not going to send it via GMail, I will just drop it to the /var/mail/d&#8217;oh mailbox!</em></q>. That email will not appear in GMail. By changing <em>mydestination</em> I am telling postfix <q><em>do not try to be smart dude, just send it to the outside world and let the others make the decision what to do with it</em></q>.</p>
<p>The last thing to make sure is that the correct <em>real name</em> for the <em>www-data</em> account (used by Apache) is set. When a sent email is received it will have <em>www-data-real-name &lt;gmail@email&gt;</em> in the <em>from</em> field. By Changing it to <em>WordPress</em> for example, recipients will see it as <em>WordPress &lt;gmail@email&gt;</em> and not <em>www-data &lt;gmail@email&gt;</em>.</p>
<p>What about <em>iptables</em> and security? To make sure no one is going to use postfix as an open relay if it is incorrectly configured, just execute:</p>
<pre>[source lang='bash']
iptables -I INPUT -p tcp --dport 110 -i eth0 -j DROP
[/source]</pre>
<p>and save <em>iptables</em> rules.</p>
]]></content:encoded>
			<wfw:commentRss>http://gruchalski.com/2009/04/27/configuring-postfix-as-a-relay-for-gmail/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Mosso Cloud Servers DNS records tip</title>
		<link>http://gruchalski.com/2009/04/17/mosso-cloud-server-dns-records-tip/</link>
		<comments>http://gruchalski.com/2009/04/17/mosso-cloud-server-dns-records-tip/#comments</comments>
		<pubDate>Fri, 17 Apr 2009 23:05:39 +0000</pubDate>
		<dc:creator>radekg</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://gruchalski.com/?p=85</guid>
		<description><![CDATA[If it happens that you use Mosso Cloud Servers and its DNS management panel remember to always set different name for each record. Otherwise if you want to remove one of them, if there is another record with same name control panel with return an error. In such case the only way to fix your [...]]]></description>
			<content:encoded><![CDATA[<p>If it happens that you use Mosso Cloud Servers and its DNS management panel remember to always set different name for each record. Otherwise if you want to remove one of them, if there is another record with same name control panel with return an error. In such case the only way to fix your DNS records is to drop whole domain, add it again and recreate all records from scratch. Unfortunately.</p>
]]></content:encoded>
			<wfw:commentRss>http://gruchalski.com/2009/04/17/mosso-cloud-server-dns-records-tip/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
