<?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>don't_panic &#187; Development</title>
	<atom:link href="http://mikepultz.com/category/development/feed/" rel="self" type="application/rss+xml" />
	<link>http://mikepultz.com</link>
	<description>personal and professional blog of mike pultz, technology specialist and serial entrepreneur;</description>
	<lastBuildDate>Fri, 16 Jul 2010 05:26:53 +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>Mr.DNS Network Tools v1.6</title>
		<link>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-6/</link>
		<comments>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-6/#comments</comments>
		<pubDate>Fri, 16 Jul 2010 05:26:53 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mr.DNS]]></category>
		<category><![CDATA[Mr.Host]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=517</guid>
		<description><![CDATA[I've released a new version of the Mr.DNS Network Tools website. New features include: SPF Parsing and Validation: DNS SRV Records: HTTP Header Parsing for any HTTP/HTTPS URL: and many other small changes and fixes.]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/07/mr-dns-network-tools-v1-6/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>I've released a new version of the <a href="http://mrdns.com" target="_blank">Mr.DNS Network Tools</a> website.</p>
<p>New features include:</p>
<p>SPF Parsing and Validation:</p>
<p><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_spf1.png"><img class="size-full wp-image-520 alignnone" title="mrdns_spf" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_spf1.png" alt="" width="700" height="317" /></a></p>
<p>DNS SRV Records:</p>
<p><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_srv.png"><img class="alignnone size-full wp-image-522" title="mrdns_srv" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_srv.png" alt="" width="700" height="319" /></a></p>
<p>HTTP Header Parsing for any HTTP/HTTPS URL:</p>
<p><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_http.png"><img class="alignnone size-full wp-image-523" title="mrdns_http" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns_http.png" alt="" width="700" height="371" /></a></p>
<p>and many other small changes and fixes.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mr.DNS Network Tools v1.4</title>
		<link>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-4/</link>
		<comments>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-4/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 20:15:34 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Mr.DNS]]></category>
		<category><![CDATA[Mr.Host]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=499</guid>
		<description><![CDATA[I've updated the Mr.DNS site and included several new features: Visual Trace Routes - overlays each hop of the trace route on a google map: Real-Time Multi-RBL and URIBL checks: Real-Time SMTP Server Validation: more features to come soon.]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/07/mr-dns-network-tools-v1-4/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>I've updated the <a href="http://mrdns.com" target="_blank">Mr.DNS site</a> and included several new features:</p>
<p>Visual Trace Routes - overlays each hop of the trace route on a google map:</p>
<p style="text-align: center;"><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns12.png"><img class="aligncenter size-full wp-image-509" title="Mr.DNS Visual Traceroute" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns12.png" alt="" width="700" height="646" /></a></p>
<p>Real-Time Multi-RBL and URIBL checks:</p>
<p><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns21.png"><img class="aligncenter size-full wp-image-510" title="Mr.DNS Multi-RBL Check" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns21.png" alt="" width="700" height="488" /></a></p>
<p>Real-Time SMTP Server Validation:</p>
<p><a href="http://mikepultz.com/wp-content/uploads/2010/07/mrdns31.png"><img class="aligncenter size-full wp-image-511" title="Mr.DNS SMTP Check" src="http://mikepultz.com/wp-content/uploads/2010/07/mrdns31.png" alt="" width="700" height="484" /></a></p>
<p>more features to come soon.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/07/mr-dns-network-tools-v1-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic Dial Resource Fail-over in Asterisk</title>
		<link>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/</link>
		<comments>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/#comments</comments>
		<pubDate>Mon, 17 May 2010 03:01:30 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=467</guid>
		<description><![CDATA[Asterisk is generally pretty reliable, but termination providers aren't always so good; in a market where anybody can re-sell an upstream provider, or setup a few Asterisk boxes and start routing calls for people, it's generally a good idea to have a "backup" provider (or three) to route your calls through. You can easily setup [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p><a href="http://asterisk.org">Asterisk</a> is generally pretty reliable, but termination providers aren't always so good; in a market where anybody can re-sell an upstream provider, or setup a few Asterisk boxes and start routing calls for people, it's generally a good idea to have a "backup" provider (or three) to route your calls through.</p>
<p>You can easily setup an Asterisk system, to fail-over to secondary systems, if your primary provider fails for some reason- and this can all be done right in the dial plan, using a simple MACRO.</p>
<p>Add this MACRO to your dial plan:</p>
<pre>[macro-direct-dial]
exten =&gt; s,1,Set(CALL_ATTEMPT=1)
exten =&gt; s,2,Set(TERM_PROVIDER=${TERM_PROVIDER1})
exten =&gt; s,3,Dial(${TERM_PROVIDER}/${ARG1},60)
exten =&gt; s,4,GotoIf($["${CALL_ATTEMPT}" &gt;= "${MAX_PROVIDERS}"]?s-CANCEL,1)
exten =&gt; s,5,Set(CALL_ATTEMPT=$[${CALL_ATTEMPT} + 1])
exten =&gt; s,6,Goto(s-${DIALSTATUS},1)

exten =&gt; s-BUSY,1,Noop()
exten =&gt; s-NOANSWER,1,Noop()
exten =&gt; s-CANCEL,1,Hangup()
exten =&gt; s-HANGUP,1,Hangup()

exten =&gt; s-CHANUNAVAIL,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten =&gt; s-CHANUNAVAIL,2,Goto(s,3)

exten =&gt; s-CONGESTION,1,Set(TERM_PROVIDER=${EVAL(${TERM_PROVIDER${CALL_ATTEMPT}})})
exten =&gt; s-CONGESTION,2,Goto(s,3)</pre>
<p>Now you'll need to route your calls into this MACRO; this can vary by dial plan, as you may have a special configuration for different area codes, or country codes, or based on some least-cost-routing business decisions, but a simple example would be something like this:</p>
<pre>[default]
exten =&gt; _1NXXNXXXXXX,1,Answer()
exten =&gt; _1NXXNXXXXXX,2,Macro(direct-dial,${EXTEN})
exten =&gt; _1NXXNXXXXXX,3,Hangup()</pre>
<p>This routes any <a href="http://www.nanpa.com/">NANPA</a> numbers through the direct-dial MACRO above, passing in the phone number as the first argument to the MACRO.</p>
<p>Now, before this will work, you'll need to configure some variables; this can be done in many places- in my working configuration, I have these variables dynamically generated via an AGI script, based on the phone number being dialed. This way I can control dial-groups, by phone number, based on a cost/preference/etc.</p>
<p>In this example, we'll simply set these values in the globals section of the extensions.conf file:</p>
<pre>[globals]
TERM_PROVIDER1 = SIP/first_provider
TERM_PROVIDER2 = IAX/second_provider
TERM_PROVIDER3 = SIP/last_provider
MAX_PROVIDERS = 3</pre>
<p>So I've configured three fictitious termination providers; you can specify as many as you like, as long as the TERM_PROVIDER increments one for each, and you set the MAX_PROVIDERS value to the total number of providers listed.</p>
<p>This is obviously more useful if this list is automatically generated somehow, or changed based on the phone number being dialed, otherwise the retries could simply be hard-coded into the dial plan.</p>
<p>Now when you dial your number, it will start with the first (default) provider; if the dial() function returns a congestion or channel un-available error, the MACRO will cycle to the next provider, until it as gone through all of the providers listed.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/05/automatic-dial-resource-fail-over-in-asterisk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Fonolo iPhone App In The News</title>
		<link>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/</link>
		<comments>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/#comments</comments>
		<pubDate>Thu, 18 Feb 2010 05:28:08 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Fonolo]]></category>
		<category><![CDATA[Telephony]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=431</guid>
		<description><![CDATA[We've received a tremendous amount of press coverage in the week since we launched the Fonolo iPhone application, including a quick spot on the ABC News tech bytes segment. It was also featured on: lifehacker- Fonolo Skips Automated Customer Service Phone Trees, Now on iPhone TMCnet.com - Fonolo Launches Free iPhone App CNet - Fonolo's deep dialer comes [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>We've received a tremendous amount of press coverage in the week since we launched the Fonolo iPhone application, including a quick spot on the ABC News tech bytes segment.</p>
<p style="text-align: center;"><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="320" height="253" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="flashvars" value="height=253&amp;width=320&amp;file=http://media.fonolo.com/video/fonolo-iphone-abcnews.flv&amp;searchbar=false" /><param name="src" value="http://static.fonolo.com/flash/video_player.swf" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="320" height="253" src="http://static.fonolo.com/flash/video_player.swf" allowfullscreen="true" flashvars="height=253&amp;width=320&amp;file=http://media.fonolo.com/video/fonolo-iphone-abcnews.flv&amp;searchbar=false"></embed></object></p>
<p style="text-align: left;">It was also featured on:</p>
<p style="text-align: left;">lifehacker- <a href="http://lifehacker.com/5470697/fonolo-skips-automated-customer-service-phone-trees-now-on-iphone" target="_blank">Fonolo Skips Automated Customer Service Phone Trees, Now on iPhone</a></p>
<p>TMCnet.com - <a href="http://voip-phone-systems.tmcnet.com/topics/voip-phone-systems/articles/75678-fonolo-launches-free-iphone-app.htm" target="_blank">Fonolo Launches Free iPhone App</a></p>
<p>CNet - <a href="http://news.cnet.com/8301-27076_3-20000064-248.html?part=rss&amp;tag=feed&amp;subj=TheDownloadBlog" target="_blank">Fonolo's deep dialer comes to the iPhone</a></p>
<p>Techvibes - <a href="http://www.techvibes.com/blog/fonolo-lets-iphone-users-skip-corporate-phone-hell" target="_blank">Fonolo lets iPhone users skip corporate phone hell</a></p>
<p>and many other sites.</p>
<p>We couldn't be happier!</p>
<p>Stay tuned for some upcoming additions.</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/02/fonolo-iphone-app-in-the-news/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using DKIM in Exim</title>
		<link>http://mikepultz.com/2010/02/using-dkim-in-exim/</link>
		<comments>http://mikepultz.com/2010/02/using-dkim-in-exim/#comments</comments>
		<pubDate>Fri, 12 Feb 2010 06:48:45 +0000</pubDate>
		<dc:creator>mike</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[System Administration]]></category>

		<guid isPermaLink="false">http://mikepultz.com/?p=384</guid>
		<description><![CDATA[Since Exim 4.70, DKIM (DomainKeys Indentified Mail - RFC4871) has been supported by default. The current implementation supports signing outgoing mail, as well as verifying signatures in incoming messages, using the acl_smtp_dkim ACL. By default, DKIM signatures are verified as new messages come in, though no action is taken unless you've implicitly configured rules in [...]]]></description>
			<content:encoded><![CDATA[<p class='fb-like'><iframe src='http://www.facebook.com/plugins/like.php?href=http://mikepultz.com/2010/02/using-dkim-in-exim/&amp;layout=&amp;show_faces=true&amp;width=260&amp;action=&amp;colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:260px; height:26px'></iframe></p><p>Since Exim 4.70, DKIM (DomainKeys Indentified Mail - <a href="http://www.ietf.org/rfc/rfc4871.txt" target="_blank">RFC4871</a>) has been supported by default.</p>
<p>The current implementation supports signing outgoing mail, as well as verifying signatures in incoming messages, using the acl_smtp_dkim ACL. By default, DKIM signatures are verified as new messages come in, though no action is taken unless you've implicitly configured rules in the DKIM ACL.</p>
<p>After installing Exim (&gt;= 4.70), you should see debug logs for incoming mail from servers that have DKIM signatures setup- they look like:</p>
<pre>DKIM: d=gmail.com s=gamma c=relaxed/relaxed a=rsa-sha256 [verification succeeded]</pre>
<h5>Verifying Incoming Mail</h5>
<p>By default, Exim does not filter any mail based on the validity of the DKIM signature- it's up to you to add ACL rules to control what happens when you receive messages with "bad" signatures.</p>
<p>First add an ACL section for the DKIM processing; this should be included with your other ACL statements:</p>
<pre>acl_smtp_dkim = acl_check_dkim</pre>
<p>Next, after the "begin acl", section, add your DKIM ACL section, and by default, accept all messages in this ACL:</p>
<pre>acl_check_dkim:

	accept</pre>
<p>Now you need to decide what kind of rules you want to setup- you probably don't want to put a rule that applies to all domains- though, if the company went to the trouble of adding DKIM signatures to their e-mail, you'd hope they'd get it right, and not publish invalid public keys.</p>
<p>For now, let's add a simple rule for gmail; google knows what they're doing, so their systems should be setup correctly:</p>
<pre>acl_check_dkim:

	#
	# check the DKIM signature for gmail
	#
	deny 	message 	= Common guys, what's going on?
		sender_domains 	= gmail.com
		dkim_signers 	= gmail.com
		dkim_status 	= none:invalid:fail

	accept</pre>
<p>You can add as many rules, for whatever domains you want in this ACL.</p>
<h5>Signing Outgoing Mail</h5>
<p>Now that you're checking incoming mail, you probably want to sign mail coming out of your system. This is a relatively easy process, that I've broken down into three steps:</p>
<p><span style="text-decoration: underline;"><strong>Step1</strong></span>- Generate a private and public key to sign your messages; you can do this easily with openssl:</p>
<pre>#openssl genrsa -out dkim.private.key 768</pre>
<p>Then extract the public key from the private key:</p>
<pre>#openssl rsa -in dkim.private.key -out dkim.public.key -pubout -outform PEM</pre>
<p><strong><span style="text-decoration: underline;">Step2</span></strong>- Configure the Exim remote-smtp transport to sign outgoing messages, using your new private key. You'll need to pick a domain and a selector for this process.</p>
<p>When remote SMTP servers validate your DKIM signatures, they simply do a DNS look up, based on the selector and your domain- the domain needs to (obviously) be a valid domain you own, that you can add DNS entries to, and the selector can be any string you want. So, for example, using the domain "example.com", and the selector "x", you would add to the remote_smtp transport in Exim:</p>
<pre>remote_smtp:
        driver = smtp
        dkim_domain = example.com
        dkim_selector = x
        dkim_private_key = dkim.private.key
        dkim_canon = relaxed</pre>
<p>This tells Exim to sign any outbound e-mail, using the domain example.com, the selector "x", and the private key we just generated. The dkim_canon = relaxed, sets the canonicalization method to use when signing messages. DKIM supports "simple" and "relaxed" algorithms- to understand the difference, see section 3.4 of the <a href="http://www.ietf.org/rfc/rfc4871.txt" target="_blank">DKIM RFC</a>.</p>
<p><strong><span style="text-decoration: underline;">Step3</span></strong>- add your DKIM public key to your DNS.</p>
<p>The DKIM public key generated above is advertised to other SMTP servers, using a DNS TXT record. In DNS for the domain example.com, add a new TXT record:</p>
<pre>x._domainkey.example.com.   TXT v=DKIM1; t=y; k=rsa; p=&lt;public key&gt;</pre>
<p>Where "x" is the selector you used above, and &lt;public key&gt; is the public key data (minus the key header/footer text).</p>
<p>When setup correctly, your DKIM text record should look something like this:</p>
<pre># host -t txt x._domainkey.example.com

x._domainkey.example.com descriptive text "v=DKIM1\; t=y\; k=rsa\; p=MIGfMA0GCS
qGSIb3DQEBAQUAA4GNADCBiQKBgQC5k8yUyuyu9UAVHHU7Al4ppTDtxFWsZ6Pqd9NWZnomtewBdz8I
2LJkqmA/3Cyb5Eiaqk4NulPFfDbfA0Lkw7SNyOS9BRN02KGtKIWjFqDwjB99haaWYw9H4IZcuJp0Y
q0kySCdBp/sPP+iTotdBiE85Jakw3tzgYkdvaS05ZUdBwIDAQAB"</pre>
<p>(lines breaks were added for readability- your entry should be one continuous line)</p>
<p>This DNS record is referred to as the "selector" record; you need to also setup a "policy" record. The policy record is your domains policy for domain keys- you should start with something like:</p>
<pre>_domainkey.example.com. t=y; o=~;</pre>
<p>The t=y specifies that you are in test mode and this should be removed when you are certain that your domain key setup is functioning properly. The "~" in the o=~ specifies that some of the mail from your domain is signed, but not all. You could also specify o=- if all of the mail coming from your domain will be signed.</p>
<p>Once you have all of that in-place,  restart Exim, and send out a message using the remote-smtp transport. You should now see a DKIM-Signature: header listed in the message headers, which lists your domain (as d=), and selector (as s=), as well as a signature for this e-mail, which can be validated against your public DKIM key, that you've published in DNS.</p>
<p>For more information, see the <a href="http://www.exim.org/exim-html-current/doc/html/spec_html/ch54.html" target="_blank">Exim DKIM page</a>, or the <a href="http://www.ietf.org/rfc/rfc4871.txt" target="_blank">DKIM RFC</a>.</p>
<p>UPDATE:</p>
<p>Once you've set everything up, you can test your DKIM (and SPF and SenderID, etc) install, by using the port25.com validation service.</p>
<p>Just send an e-mail to <strong>check-auth@verifier.port25.com</strong>, and it will auto-respond with a validation report</p>
]]></content:encoded>
			<wfw:commentRss>http://mikepultz.com/2010/02/using-dkim-in-exim/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>
