<?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>Sunsetsurf Techblog &#187; Linux Stuff</title>
	<atom:link href="http://techblog.sunsetsurf.co.uk/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://techblog.sunsetsurf.co.uk</link>
	<description>Random tech bloggidge</description>
	<lastBuildDate>Fri, 09 Jul 2010 10:00:38 +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>setting up replication with mysql &#8211; slave / master</title>
		<link>http://techblog.sunsetsurf.co.uk/2010/03/setting-up-replication-with-mysql-slave-master/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2010/03/setting-up-replication-with-mysql-slave-master/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 11:43:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=147</guid>
		<description><![CDATA[Whilst the mysql cluster option is useful for a HA / scalable solution, sometimes the &#8220;old&#8221; mysql config of having a master node, with one or more slave nodes is actually the most idea option. Using a mysql cluster configuration allows you to add nodes simply and increase the power available to you simply, its [...]]]></description>
			<content:encoded><![CDATA[<p>Whilst the mysql cluster option is useful for a HA / scalable solution, sometimes the &#8220;old&#8221; mysql config of having a master node, with one or more slave nodes is actually the most idea option.</p>
<p>Using a mysql cluster configuration allows you to add nodes simply and increase the power available to you simply, its quite a involved solution with multiple nodes required as well as controller stations, added with the fact that you need the cluster nodes to be on a low latency link means it might not fit the requirement.</p>
<p>Using the master slave option is great if you dont need a massive amount of writes, if you want to replicate between sites, or if you just want a quick solution to provide you with a resilient platform (albeit not instant)</p>
<p>So to setting up the solution.</p>
<p>You need at least 2 nodes running ideally the same version of mysql and the master node needs port 3306 access to the slave / slaves.</p>
<p>Once you have set that up, you need to configure the master to push updates out to the slave, you also need to ensure that from a starting point, both the slave and the master have the same db&#8217;s etc..</p>
<p>So below are the steps you need to take to do this:</p>
<p>Edit the my.cnf on your master under the mysqld section with the follow (assuming you have a standard install and things are in the default location, adjust paths if required) :</p>
<p>server-id=1</p>
<p>relay-log=/usr/local/mysql/var/mysql-relay-bin</p>
<p>relay-log-index=/usr/local/mysql/var/mysql-relay-bin.index</p>
<p>log-error=/usr/local/mysql/var/mysql.err</p>
<p>master-info-file=/usr/local/mysql/var/mysql-master.info</p>
<p>relay-log-info-file=/usr/local/mysql/var/mysql-relay-log.info</p>
<p>datadir=/usr/local/mysql/var</p>
<p>log-bin=/usr/local/myql/var/mysql-bin</p>
<p>Now put the following in your slaves my.cnf</p>
<p>server-id=2</p>
<p>relay-log=/usr/local/mysql/var/mysql-relay-bin</p>
<p>relay-log-index=/usr/local/mysql/var/mysql-relay-bin.index</p>
<p>log-error=/usr/local/mysql/var/mysql.err</p>
<p>master-info-file=/usr/local/mysql/var/mysql-master.info</p>
<p>relay-log-info-file=/usr/local/mysql/var/mysql-relay-log.info</p>
<p>datadir=/usr/local/mysql/var</p>
<p>Now the configs are done, you need to sort out the users and permissions.</p>
<p>On the master you need to create a user that has permissions on the slave, do this as follows:</p>
<p>mysql&gt; grant replication slave on *.* to useronslave@&#8217;slaves.ip.add.ress&#8217; identified by &#8216;useronslavepassword&#8217;;</p>
<p>Obviously substituting useronslave for your actual username on the slave, slaves.ip.add.ress for your slaves ip, i.e 192.168.0.3 and your useronslavepassword for your slave users password.</p>
<p>Now export the database from your master to your slave, to initially create the sync, as below:</p>
<p>mysqldump -u root -p &#8211;all-databases &#8211;single-transaction &#8211;master-data=1 &gt; masterdump.sql</p>
<p>Next copy this .sql file over to the slave and import it so the slave is now in sync, as below run this on the slave:</p>
<p>mysql -u root -p &lt; masterdump.sql</p>
<p>Once the above dump import has finished you will need to tell the slave which master to connect to, do the following, again substituting users and passwords as appropriate (again done on the slave).</p>
<p>mysql&gt; CHANGE MASTER TO MASTER_HOST=&#8217;ip.address.of.master&#8217;, MASTER_USER=&#8217;useronslave&#8217;, MASTER_PASSWORD=&#8217;useronslavepassword&#8217;;</p>
<p>once that is done start up the slave</p>
<p>mysql&gt; start slave;</p>
<p>if you want to see the status of the slave, type</p>
<p>mysql&gt; show slave status\G</p>
<p>That should be everything done, you should now have your master and slave in sync and updating themselves as required.</p>
<p><map name='google_ad_map_147_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/147?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_147_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=147&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2010%2F03%2Fsetting-up-replication-with-mysql-slave-master%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2010/03/setting-up-replication-with-mysql-slave-master/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pure-ftpd unable to list more than 2000 files.</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/11/pure-ftpd-unable-to-list-more-than-2000-files/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/11/pure-ftpd-unable-to-list-more-than-2000-files/#comments</comments>
		<pubDate>Mon, 02 Nov 2009 16:20:26 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=123</guid>
		<description><![CDATA[By default Pure-ftpd limits you to only being able to list &#60; 2000 files. To change this, do the following.. Edit your pure-ftpd config file &#8211; usually in /etc/pure-ftpd.conf change the line LimitRecursion 2000 8 to LimitRecursion xxxx 8 Where xxxx is the number of files you want to limit it to&#8230; Restart the pure-ftpd [...]]]></description>
			<content:encoded><![CDATA[<p>By default Pure-ftpd limits you to only being able to list &lt; 2000 files.</p>
<p>To change this, do the following..</p>
<p>Edit your pure-ftpd config file &#8211; usually in /etc/pure-ftpd.conf</p>
<p>change the line</p>
<p>LimitRecursion 2000 8</p>
<p>to</p>
<p>LimitRecursion xxxx 8</p>
<p>Where xxxx is the number of files you want to limit it to&#8230;</p>
<p>Restart the pure-ftpd service and you should be done!</p>
<p><map name='google_ad_map_123_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/123?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_123_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=123&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F11%2Fpure-ftpd-unable-to-list-more-than-2000-files%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/11/pure-ftpd-unable-to-list-more-than-2000-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mysql error error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; (2)&#8217;</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/10/mysql-error-error-cant-connect-to-local-mysql-server-through-socket-tmpmysql-sock-2/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/10/mysql-error-error-cant-connect-to-local-mysql-server-through-socket-tmpmysql-sock-2/#comments</comments>
		<pubDate>Fri, 09 Oct 2009 16:13:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=105</guid>
		<description><![CDATA[If you have done a fresh mysql install from tarball, its possible you might encounter the following error when trying to use a client such as mysqladmin etc.. : error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; (2)&#8217; This might occur even if the mysql binary is running and the services seems to [...]]]></description>
			<content:encoded><![CDATA[<p>If you have done a fresh mysql install from tarball, its possible you might encounter the following error when trying to use a client such as mysqladmin etc.. :</p>
<p>error: &#8216;Can&#8217;t connect to local MySQL server through socket &#8216;/tmp/mysql.sock&#8217; (2)&#8217;</p>
<p>This might occur even if the mysql binary is running and the services seems to be listening on port 3306.</p>
<p>One common reason for this is that your my.cnf file doesnt have the correct location for your sock file.</p>
<p>Check it out, have a look in /etc/my.cnf and ensure that the sections under [mysqld] and [client] point to the correct location for your mysql.sock file &#8211; likely /var/lib/mysql/mysql.sock</p>
<p>You may find that the [client] section is missing, in which case just create it as below:</p>
<p>[client]</p>
<p>socket=/var/lib/mysql/mysql.sock</p>
<p>that hopefully will allow your  client to now connect.</p>
<p><map name='google_ad_map_105_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/105?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_105_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=105&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F10%2Fmysql-error-error-cant-connect-to-local-mysql-server-through-socket-tmpmysql-sock-2%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/10/mysql-error-error-cant-connect-to-local-mysql-server-through-socket-tmpmysql-sock-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to speed up web servers and apache using DEFLATE.</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/10/how-to-speed-up-web-servers-and-apache-using-deflate/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/10/how-to-speed-up-web-servers-and-apache-using-deflate/#comments</comments>
		<pubDate>Thu, 08 Oct 2009 15:59:09 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=103</guid>
		<description><![CDATA[We all want faster web pages, and there is a number of ways to achieve this. One way is to use compression with apache. This means slightly more cpu overhead on the webserver, but should result in better performance of your webpages.. Here is a step by step guide to doing this on linux with [...]]]></description>
			<content:encoded><![CDATA[<p>We all want faster web pages, and there is a number of ways to achieve this.</p>
<p>One way is to use compression with apache. This means slightly more cpu overhead on the webserver, but should result in better performance of your webpages..</p>
<p>Here is a step by step guide to doing this on linux with apache &gt; 2.0</p>
<p>In your httpd conf file under your location add in the following, this will compress everything except images:</p>
<p style="line-height: 1em; padding: 0px; margin: 0px;"><code style="font-family: 'Courier New', Courier, monospace; font-size: 13px;">&lt;Location /&gt;<br />
<span style="padding-left: 1.5em; display: block;"># Insert filter<br />
SetOutputFilter DEFLATE</p>
<p># Netscape 4.x has some problems...<br />
BrowserMatch ^Mozilla/4 gzip-only-text/html</p>
<p># Netscape 4.06-4.08 have some more problems<br />
BrowserMatch ^Mozilla/4\.0[678] no-gzip</p>
<p># MSIE masquerades as Netscape, but it is fine<br />
# BrowserMatch \bMSIE !no-gzip !gzip-only-text/html</p>
<p># NOTE: Due to a bug in mod_setenvif up to Apache 2.0.48<br />
# the above regex won't work. You can use the following<br />
# workaround to get the desired effect:<br />
BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html</p>
<p># Don't compress images<br />
SetEnvIfNoCase Request_URI \<br />
<span style="padding-left: 1.5em; display: block;">\.(?:gif|jpe?g|png)$ no-gzip dont-vary<br />
</span><br />
# Make sure proxies don't deliver the wrong content<br />
Header append Vary User-Agent env=!dont-vary<br />
</span>&lt;/Location&gt;</code></p>
<p>Then enable compression by adding the following to your conf file:</p>
<p>SetOutputFilter DEFLATE</p>
<p>Restart or reload apache and you should now be compressing content..</p>
<p>For more info, see <a href="http://httpd.apache.org/docs/2.0/mod/mod_deflate.html">http://httpd.apache.org/docs/2.0/mod/mod_deflate.html</a></p>
<p><map name='google_ad_map_103_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/103?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_103_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=103&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F10%2Fhow-to-speed-up-web-servers-and-apache-using-deflate%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/10/how-to-speed-up-web-servers-and-apache-using-deflate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Removing files with odd names dashes etc.. linux</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/08/removing-files-with-odd-names-dashes-etc-linux/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/08/removing-files-with-odd-names-dashes-etc-linux/#comments</comments>
		<pubDate>Sat, 08 Aug 2009 15:37:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=100</guid>
		<description><![CDATA[Sometimes, perhaps due to script errors etc.. you can end up with files which have a dash (-) or other unusual symbol in. Removing them with the traditional rm -filename doesn&#8217;t work as rm takes the dash to be an option -filename is not a valid option, so it will error. So how can you [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes, perhaps due to script errors etc.. you can end up with files which have a dash (-) or other unusual symbol in.</p>
<p>Removing them with the traditional rm -filename doesn&#8217;t work as rm takes the dash to be an option -filename is not a valid option, so it will error.</p>
<p>So how can you remove these files then?</p>
<p>Well its simple, just specifiy the full path, or the full relative path.</p>
<p>For example, say you have  a file called -file and its located in /root/</p>
<p>rm -file will fail, but you can either do rm ./-file or rm /root/-file</p>
<p>Easy peasey</p>
<p>If you found this article useful, please click on 1 or 2 of the adverts, it helps me to keep the site up and running.</p>
<p>Thanks!</p>
<p><map name='google_ad_map_100_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/100?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_100_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=100&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F08%2Fremoving-files-with-odd-names-dashes-etc-linux%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/08/removing-files-with-odd-names-dashes-etc-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>samba guest access</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/07/samba-guest-access/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/07/samba-guest-access/#comments</comments>
		<pubDate>Mon, 13 Jul 2009 14:47:49 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=92</guid>
		<description><![CDATA[There is so much confusion it seems on the web about how to create a full guest share on samba. There are a few things you need. All in your /etc/samba/smb.conf If you are on a standalone setup, rather than a domain setup, they look for the section titled &#8212; Standalone Server Options &#8211; There [...]]]></description>
			<content:encoded><![CDATA[<p>There is so much confusion it seems on the web about how to create a full guest share on samba.</p>
<p>There are a few things you need. All in your /etc/samba/smb.conf</p>
<p>If you are on a standalone setup, rather than a domain setup, they look for the section titled &#8212; Standalone Server Options &#8211;</p>
<p>There will be a line  (if you have a default install) which says</p>
<p>security = user</p>
<p>change this to</p>
<p>security = share</p>
<p>Then just make sure you share definition has the below in</p>
<p>[public]<br />
        comment = Public Stuff<br />
        path = /path/to/your/share<br />
        public = yes<br />
        writable = yes<br />
        printable = no<br />
        browseable = yes<br />
        guest ok = yes</p>
<p>And you should be laughing&#8230;</p>
<p>Note you will also need the corresponding permissions on the directory share to allow all to read at the very least&#8230;</p>
<p><map name='google_ad_map_92_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/92?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_92_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=92&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F07%2Fsamba-guest-access%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/07/samba-guest-access/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring sendmail for TLS certificate communication.</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/06/configuring-sendmail-for-tls-certificate-communication/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/06/configuring-sendmail-for-tls-certificate-communication/#comments</comments>
		<pubDate>Wed, 24 Jun 2009 09:23:01 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=75</guid>
		<description><![CDATA[If you are new to tls and secure mail then this might seem a bit of a massive task, but actually its relativly simple. You need a few things: 1: sendmail compiled with TLS support &#8211; see my previous article to check this. 2:a certificate suitable for your mail domain 3:access to your mail servers [...]]]></description>
			<content:encoded><![CDATA[<p>If you are new to tls and secure mail then this might seem a bit of a massive task, but actually its relativly simple.</p>
<p>You need a few things:</p>
<p>1: sendmail compiled with TLS support &#8211; see my previous article to check this.</p>
<p>2:a certificate suitable for your mail domain</p>
<p>3:access to your mail servers sendmail.mc file and the ability to recompile this to sendmail.cf &#8211; you may need the sendmail-cf package.</p>
<p>Provided you have all these things, here are the steps that need to be taken.</p>
<p>Put your cert onto your mail server in /etc/pki/tls/certs</p>
<p>This will be a .crt file most likely. Sendmail needs a pem file, so to convert your cert do the following:</p>
<p>cd /etc/pki/tls/certs</p>
<p>make sendmail.pem</p>
<p>If you do the above you will be creating a self signed cert. If you have a certificate bought from a CA such as thawte etc. Place the Private key followed by the certificate in the sendmail.pem file.</p>
<p>simple &#8211; you should now have a sendmail.pem which should contain a private key and a certificate.</p>
<p>Now you need to configure sendmail to use this file.</p>
<p>cd to /etc/mail and edit sendmail.mc (its wise to backup both the sendmail.mc and the sendmail.cf file just incase things dont work out)</p>
<p>find the lines that start with</p>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 381px; left: -10000px;">dnl define(`confCACERT_PATH&#8217;, `/etc/pki/tls/certs&#8217;)dnl</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 381px; left: -10000px;">dnl define(`confCACERT&#8217;, `/etc/pki/tls/certs/ca-bundle.crt&#8217;)dnl</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 381px; left: -10000px;">dnl define(`confSERVER_CERT&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl</div>
<div id="_mcePaste" style="position: absolute; overflow-x: hidden; overflow-y: hidden; width: 1px; height: 1px; top: 381px; left: -10000px;">dnl define(`confSERVER_KEY&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl</div>
<p>dnl define(`confCACERT_PATH&#8217;, `/etc/pki/tls/certs&#8217;)dnl</p>
<p>dnl define(`confCACERT&#8217;, `/etc/pki/tls/certs/ca-bundle.crt&#8217;)dnl</p>
<p>dnl define(`confSERVER_CERT&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl</p>
<p>dnl define(`confSERVER_KEY&#8217;, `/etc/pki/tls/certs/sendmail.pem&#8217;)dnl</p>
<p>remove the dnl from all the above lines so they start with define and save this file.</p>
<p>now type</p>
<p>make</p>
<p>to make the sendmail.mc into the new sendmail.cf</p>
<p>If you get an error about needing package sendmail-cf you will have to install that rpm, and most likely the m4 package as well as its a dependancy.</p>
<p>Once you have successfully done a make, its wise to do a diff on your current sendmail.cf and your backup, just to ensure that it all looks good and there are no important options that were changed, i.e Daemon IP bindings etc..</p>
<p>Provided you are happy with your sendmail.cf restart sendmail, and you should be now using TLS!</p>
<p>Wasn&#8217;t that hard was it? <img src='http://techblog.sunsetsurf.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><map name='google_ad_map_75_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/75?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_75_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=75&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F06%2Fconfiguring-sendmail-for-tls-certificate-communication%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/06/configuring-sendmail-for-tls-certificate-communication/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to check sendmail is STARTTLS enabled</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/06/how-to-check-sendmail-is-starttls-enabled/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/06/how-to-check-sendmail-is-starttls-enabled/#comments</comments>
		<pubDate>Mon, 22 Jun 2009 16:02:48 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=60</guid>
		<description><![CDATA[Run the following command as root on your sendmail server sendmail -d0 &#60;/dev/null &#124; grep -i tls if you see STARTTLS in the line that is returned, you are good to go!]]></description>
			<content:encoded><![CDATA[<p>Run the following command as root on your sendmail server</p>
<p>sendmail -d0 &lt;/dev/null | grep -i tls</p>
<p>if you see STARTTLS in the line that is returned, you are good to go!</p>
<p><map name='google_ad_map_60_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/60?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_60_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=60&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F06%2Fhow-to-check-sendmail-is-starttls-enabled%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/06/how-to-check-sendmail-is-starttls-enabled/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MailScanner 4.77 process defunct and looping.</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/06/mailscanner-4-77-process-defunct-and-looping/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/06/mailscanner-4-77-process-defunct-and-looping/#comments</comments>
		<pubDate>Fri, 19 Jun 2009 12:03:06 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=51</guid>
		<description><![CDATA[I upgraded my MailScanner the other day to version 4.77, and happily noticed that I was getting much less spam &#8211; infact much less mail completely&#8230; infact I wasn&#8217;t getting any.. I checked my box over and noticed that the MailScanner process was listed as defunct, and tailing messages showed the following: MailScanner: waiting for [...]]]></description>
			<content:encoded><![CDATA[<p>I upgraded my MailScanner the other day to version 4.77, and happily noticed that I was getting much less spam &#8211; infact much less mail completely&#8230; infact I wasn&#8217;t getting any.. <img src='http://techblog.sunsetsurf.co.uk/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </p>
<p>I checked my box over and noticed that the MailScanner process was listed as defunct, and tailing messages showed the following:</p>
<p>MailScanner: waiting for children to die: Process did not exit cleanly, returned 2 with signal 0</p>
<p>After going through my logs and settings to make sure I hadn&#8217;t got a new setting mixed up, I started googling..</p>
<p>Didnt really turn up much, except a few people talking about perl packages&#8230;</p>
<p>Given I didnt want to spend much / any time on this, I thought i&#8217;d try updating all my perl packages &#8211; I&#8217;m running Fedora 9.</p>
<p>So did a quick yum update perl*</p>
<p>Which updated about 136 packages but only 25Mb.</p>
<p>Restarted MailScanner and its all fixed <img src='http://techblog.sunsetsurf.co.uk/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>No idea which particular packages was causing the problem, although i&#8217;m sure it wouldnt be too hard to find out, but as Mail is flowing and i&#8217;m more upto date, i&#8217;m happy.</p>
<p><map name='google_ad_map_51_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/51?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_51_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=51&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F06%2Fmailscanner-4-77-process-defunct-and-looping%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/06/mailscanner-4-77-process-defunct-and-looping/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Stop ARP responses for loopback adapters for loadbalancing.</title>
		<link>http://techblog.sunsetsurf.co.uk/2009/06/stop-arp-responses-for-loopback-adapters-for-loadbalancing/</link>
		<comments>http://techblog.sunsetsurf.co.uk/2009/06/stop-arp-responses-for-loopback-adapters-for-loadbalancing/#comments</comments>
		<pubDate>Wed, 17 Jun 2009 16:23:00 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux Stuff]]></category>

		<guid isPermaLink="false">http://techblog.sunsetsurf.co.uk/?p=47</guid>
		<description><![CDATA[If you are using a linux type loadbalancer, and have set up an additional interface say eth0 for your secondary loadbalanced IP, you will want to stop the interface from responding to ARP requests so that your switch only gets ARP requests from the loadbalancer and not your actual host. To do this you need [...]]]></description>
			<content:encoded><![CDATA[<p>If you are using a linux type loadbalancer, and have set up an additional interface say eth0 for your secondary loadbalanced IP, you will want to stop the interface from responding to ARP requests so that your switch only gets ARP requests from the loadbalancer and not your actual host.</p>
<p>To do this you need to put some entries in /etc/sysctl.conf as below &#8211; NOTE you will need to change the interfaces to suit your config.</p>
<p>net.ipv4.conf.lo.hidden = 1<br />
net.ipv4.icmp_echo_ignore_broadcasts = 1<br />
net.ipv4.conf.eth0.arp_ignore = 1<br />
net.ipv4.conf.eth0.arp_announce = 2<br />
net.ipv4.conf.lo.arp_ignore = 1<br />
net.ipv4.conf.lo.arp_announce = 2</p>
<p>Once these entries have been loaded in, either reboot or type</p>
<p>#sysctl -p /etc/sysctl.conf</p>
<p>Sorted, no more ARP conflicts.</p>
<p><map name='google_ad_map_47_17841dedafa0ad63'>
<area shape='rect' href='http://imageads.googleadservices.com/pagead/imgclick/47?pos=0' coords='1,2,367,28' />
<area shape='rect' href='http://services.google.com/feedback/abg' coords='384,10,453,23'/></map>
<img usemap='#google_ad_map_47_17841dedafa0ad63' border='0' src='http://imageads.googleadservices.com/pagead/ads?format=468x30_aff_img&amp;client=&amp;channel=&amp;output=png&amp;cuid=47&amp;url= http%3A%2F%2Ftechblog.sunsetsurf.co.uk%2F2009%2F06%2Fstop-arp-responses-for-loopback-adapters-for-loadbalancing%2F' /></p>]]></content:encoded>
			<wfw:commentRss>http://techblog.sunsetsurf.co.uk/2009/06/stop-arp-responses-for-loopback-adapters-for-loadbalancing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
