<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-8849722925596441975</atom:id><lastBuildDate>Thu, 22 Mar 2012 02:41:26 +0000</lastBuildDate><title>fringe geekery</title><description>a collection of problems and solutions for random combinations of technology</description><link>http://blog.munkyboy.com/</link><managingEditor>noreply@blogger.com (munky)</managingEditor><generator>Blogger</generator><openSearch:totalResults>3</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8849722925596441975.post-8041713266843575813</guid><pubDate>Sat, 26 Sep 2009 06:29:00 +0000</pubDate><atom:updated>2009-09-25T23:48:24.433-07:00</atom:updated><title>facebook push to iphone</title><description>&lt;p&gt;the problem:&lt;br/&gt;Facebook sends a lot of emails. I generally don't mind the default setting which sends an email everytime your friend sneezes, but I wanted certain kinds of notifications to "bubble up to the top". I recently stumbled on a new iPhone app called &lt;a href="http://www.appnotifications.com/"&gt;Notifications&lt;/a&gt; which offers a REST API to send push alerts to your iPhone. So, I started working on a solution... &lt;/p&gt; &lt;p&gt;ingredients used: Postfix 2.6.2, Dovecot 1.2.4, Dovecot Sieve 0.1.12, Ruby 1.8/1.9&lt;br/&gt;prerequisites: a working Postfix and Dovecot installation&lt;br/&gt;instructions for windows &lt;a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html"&gt;here&lt;/a&gt;&lt;br/&gt;&lt;/p&gt; &lt;p&gt;The basic flow is: mail comes in from facebook, a sieve script determines if the mail is high priority, then the mail is forwarded to a &lt;a href="http://en.wikipedia.org/wiki/E-mail_address#Sub-addressing"&gt;sub-address&lt;/a&gt;, a specific &lt;tt&gt;.forward&lt;/tt&gt; file intercepts it and executes a script which utilizes the Notifications REST API &lt;/p&gt; &lt;p&gt;First, go get the Notifications app and register at their &lt;a href="http://www.appnotifications.com/"&gt;site&lt;/a&gt;. After creating your account, go to their &lt;a href="https://www.appnotifications.com/account/rest_api"&gt;REST API examples page&lt;/a&gt;. You'll see your API key embedded in the examples. You'll need it later... &lt;/p&gt; &lt;p&gt;I use dovecot as an IMAP server and as a MDA. This allows me to utilize the awesomeness that is the sieve plugin. In order for this recipe to work, you don't necessarily need Postfix or Dovecot. You will need a decent sieve interpreter. If you're currently using Postfix and Dovecot but are not using &lt;tt&gt;deliver&lt;/tt&gt; as your MDA, here's a quick and dirty setup: &lt;ol&gt;&lt;li&gt;&lt;b&gt;modify postfix's main.cf&lt;/b&gt;&lt;code&gt;mailbox_command = /usr/local/libexec/dovecot/deliver &lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;modify postfix's master.cf&lt;/b&gt;&lt;code&gt;dovecot   unix  -       n       n       -       -       pipe&lt;br/&gt;  flags=DRhu user=vmail:vmail argv=/usr/local/libexec/dovecot/deliver -c /usr/local/etc/dovecot/dovecot.conf -f ${sender} -d ${user}@${nexthop} -a ${recipient} &lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;install the sieve plugin&lt;/b&gt; &lt;i&gt;FreeBSD ports FTW&lt;/i&gt;&lt;code&gt;$ cd /usr/ports/mail/dovecot-sieve/&lt;br/&gt;$ make install clean &lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;modify dovecot.conf&lt;/b&gt;&lt;code&gt;protocol lda {&lt;br/&gt;&amp;nbsp;&amp;nbsp;...&lt;br/&gt;&amp;nbsp;&amp;nbsp;mail_plugins = sieve&lt;br/&gt;&amp;nbsp;&amp;nbsp;...&lt;br/&gt;} &lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;more info &lt;a href="http://wiki.dovecot.org/LDA"&gt;here&lt;/a&gt;&lt;/p&gt; &lt;p&gt;Now we can configure a sieve script. The default location for user sieve scripts is ~/.dovecot.sieve. Here's what mine looks like &lt;code&gt;require ["envelope", "subaddress", "fileinto", "copy"];&lt;br/&gt;if allof(address :domain :is "from" "facebookmail.com",&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;not envelope :detail "to" "notify-facebook") {&lt;br/&gt;&amp;nbsp;&amp;nbsp;fileinto "auto_filed.facebook";&lt;br/&gt;&amp;nbsp;&amp;nbsp;if allof(exists "X-Facebook-Notify",&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;header :contains "X-Facebook-Notify" ["share_comment;", "feed_comment;", "friend;", "msg;", "photo_tag;", "photo_comment;", "photo_album_comment;"]) {&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;redirect :copy "your_username+notify-facebook@example.com";&lt;br/&gt;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;} &lt;/code&gt;in prose, form&lt;br/&gt;If the mail is from facebook and does not have the sub-address "notify-facebook", file the mail into the sub-folder "auto_filed/facebook". If the mail contains specific facebook headers which we consider high priority, forward a copy to my email address with the sub-address of "notify-facebook".&lt;br/&gt;In this example, the list of "high priority" notifications are when someone comments on one of &lt;b&gt;your&lt;/b&gt; links, status, photos, albums or you receive a friend request, private message, or tags you in a photo.&lt;br/&gt;I never found a list of all the message types embedded in the "X-Facebook-Notify" MIME header, if you stumble on such a list, leave a comment. &lt;/p&gt; &lt;p&gt;Postfix (and probably other MTAs) support different &lt;tt&gt;.forward&lt;/tt&gt; files for sub-address. Let's make sure yours is configured properly by adding this to postfix's main.cf &lt;code&gt;forward_path = $home/.forward${recipient_delimiter}${extension}, $home/.forward&lt;br/&gt;recipient_delimiter = + &lt;code&gt;&lt;/p&gt; &lt;p&gt;Now for our sub-address specific forward file: ~/.forward+notify-facebook. Point to a script which should take one argument of API Key and read mail from STDIN. &lt;code&gt;"| /usr/local/share/mobile_notification_scripts/facebook.rb &amp;lt;YOUR-NOTIFICATIONS-API-KEY-GOES-HERE&amp;gt;" &lt;/code&gt;&lt;/p&gt; &lt;p&gt;Here's the ruby script I use... &lt;code&gt;#!/usr/local/bin/ruby&lt;br/&gt;require &amp;#x27;rubygems&amp;#x27;&lt;br/&gt;require &amp;#x27;tmail&amp;#x27;&lt;br/&gt;require &amp;#x27;mechanize&amp;#x27;&lt;br/&gt;begin&lt;br/&gt;&amp;nbsp;&amp;nbsp;SINGLE_TOKEN = ARGV[0]&lt;br/&gt;&amp;nbsp;&amp;nbsp;VERSIONLIB = &amp;#x27;0.1&amp;#x27;&lt;br/&gt;&amp;nbsp;&amp;nbsp;POST_URL = &amp;quot;https://www.appnotifications.com/account/notifications.xml&amp;quot;&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;exit if SINGLE_TOKEN.blank?&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;# parse mail&lt;br/&gt;&amp;nbsp;&amp;nbsp;email = TMail::Mail.parse(STDIN.read)&lt;br/&gt;&amp;nbsp;&amp;nbsp;body = (email.multipart?) ? parts.detect { |part| part.content_type == &amp;quot;text/plain&amp;quot; } : email.body&lt;br/&gt;&amp;nbsp;&amp;nbsp;exit if body.blank?&lt;br/&gt;&amp;nbsp;&amp;nbsp;link = (match = body.match(/(http:\/\/www.facebook.com\/n\/.+?)\n/)) ? match[1] : nil&lt;br/&gt;&amp;nbsp;&amp;nbsp;message_details = email.body.gsub(/\n/, &amp;quot;&amp;lt;br/&amp;gt;&amp;quot;)&lt;br/&gt;&amp;nbsp;&amp;nbsp;unless link.nil?&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;message_details = message_details.sub(/#{Regexp.escape(link)}.*/m,&amp;#x27;&amp;#x27;) + &amp;lt;&amp;lt;-HTML&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;a href=&amp;#x27;#{link}&amp;#x27;&amp;gt;http://www.facebook.com/...&amp;lt;/a&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;br&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;facebook app links:&amp;lt;br/&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;table style=&amp;quot;width:100%;&amp;quot;&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td style=&amp;quot;padding-top:16px;text-align:left;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;fb://feed&amp;quot;&amp;gt;News Feed&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td style=&amp;quot;padding-top:16px;text-align:center;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;fb://requests&amp;quot;&amp;gt;Requests&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td style=&amp;quot;padding-top:16px;text-align:right;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;fb://profile&amp;quot;&amp;gt;Profile&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;tr&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td style=&amp;quot;padding-top:30px;text-align:left;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;fb://albums&amp;quot;&amp;gt;Albums&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td style=&amp;quot;padding-top:30px;text-align:center;&amp;quot;&amp;gt;&amp;lt;a href=&amp;quot;fb://notes&amp;quot;&amp;gt;Notes&amp;lt;/a&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;td&amp;gt;&amp;lt;/td&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/tr&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;lt;/table&amp;gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;HTML&lt;br/&gt;&amp;nbsp;&amp;nbsp;end&lt;br/&gt;&amp;nbsp;&amp;nbsp;&lt;br/&gt;&amp;nbsp;&amp;nbsp;a = WWW::Mechanize.new { |agent|&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;agent.user_agent = &amp;quot;AppNotifications Ruby #{VERSIONLIB}&amp;quot;&lt;br/&gt;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;&lt;br/&gt;&amp;nbsp;&amp;nbsp;# Send a notification&lt;br/&gt;&amp;nbsp;&amp;nbsp;a.post(POST_URL, &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;{ :user_credentials =&amp;gt; SINGLE_TOKEN, &lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[title]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; &amp;#x27;facebook&amp;#x27;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[message_level]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; -1,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[silent]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; 0,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[action_loc_key]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; &amp;#x27;View&amp;#x27;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[run_command]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; &amp;#x27;notifications://&amp;#x27;,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[message]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;=&amp;gt; email.subject,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[long_message_preview]&amp;#x27; =&amp;gt; email.subject,&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;#x27;notification[long_message]&amp;#x27;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&amp;gt; message_details&lt;br/&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br/&gt;&amp;nbsp;&amp;nbsp;)&lt;br/&gt;rescue&lt;br/&gt;end &lt;/code&gt;Did you know iPhone apps can register URL scheme handlers? here's a &lt;a href="http://wiki.akosma.com/IPhone_URL_Schemes"&gt;list&lt;/a&gt;. Notably, facebook supports fb://profile, fb://requests, etc... &lt;br/&gt;This script configures the push notification badge to automatically open the Notifications app when unlocking your phone. Once in the app, you can click on the latest notification and view the full details which includes a shortened version of the original mail. I also added some facebook app links to the bottom of the notification details. &lt;/p&gt; &lt;p&gt;It seems like a lot of work to get a bullshit feature. True. But it was a fun detour... &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8849722925596441975-8041713266843575813?l=blog.munkyboy.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.munkyboy.com/2009/09/facebook-push-to-iphone.html</link><author>noreply@blogger.com (munky)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8849722925596441975.post-695433955693126264</guid><pubDate>Thu, 24 Sep 2009 07:57:00 +0000</pubDate><atom:updated>2009-09-24T00:57:28.613-07:00</atom:updated><title>traffic conditions for your current location (CA iPhone)</title><description>&lt;p&gt;&lt;a href="http://sigalert.com"&gt;http://sigalert.com&lt;/a&gt; has a slick iphone interface. You can choose to view traffic conditions for your current location and it will prompt you to allow sending your GPS info to the site. The subsequent URL has your latitude and longitude as parameters. I wanted a shortcut on my home screen to always load the site given my current location. This is a task in response agility.&lt;/p&gt;&lt;ol&gt;&lt;li&gt;open a new tab in safari&lt;/li&gt;&lt;li&gt;copy this &lt;a href="http://www.sigalert.com/iPhone/FullMap.asp?z=1&amp;track=1#page=FullMap&amp;track=1&amp;z=1"&gt;URL&lt;/a&gt; into the location bar&lt;/li&gt;&lt;li&gt;hit Go&lt;/li&gt;&lt;li&gt;before the web server redirects you to a new URL with lat + long, cancel the operation by hitting X in the location bar&lt;/li&gt;&lt;li&gt;hit the + to add a bookmark, choose to add to home screen&lt;/li&gt;&lt;/ol&gt;If the site icon is blank, try again, unless you're ok with a blank icon on your home screen. The timing window is after the site icon loads but before the server redirects you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8849722925596441975-695433955693126264?l=blog.munkyboy.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.munkyboy.com/2009/09/traffic-conditions-for-your-current.html</link><author>noreply@blogger.com (munky)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-8849722925596441975.post-1663866434718088228</guid><pubDate>Thu, 24 Sep 2009 07:15:00 +0000</pubDate><atom:updated>2009-09-24T00:46:53.183-07:00</atom:updated><title>setting up DKIM</title><description>&lt;p&gt;DKIM (DomainKeys Identified Mail) is a method for email authentication that allows an organization to take responsibility for a message in a way that can be validated by a recipient. Read more about it at the &lt;a href="http://en.wikipedia.org/wiki/Dkim"&gt;wikipedia entry&lt;/a&gt;&lt;/p&gt;&lt;p&gt;ingredients used: FreeBSD 7.x, Postfix 2.6.2, dkim-milter 2.8.3, Bind 9.6.1&lt;br/&gt;prerequisites: a working Postfix and Bind installation&lt;br/&gt;instructions for windows &lt;a href="http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/install.html"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;ol&gt;&lt;li&gt;&lt;b&gt;install dkim&lt;/b&gt;&lt;code&gt;$ cd /usr/ports/mail/dkim-milter&lt;br/&gt;$ make install clean&lt;br/&gt;$ echo "milterdkim_enable='YES'" &amp;gt;&amp;gt; /etc/rc.conf&lt;br/&gt;$ echo "milterdkim_uid='postfix'" &amp;gt;&amp;gt; /etc/rc.conf # use the same uid as the postfix service&lt;br/&gt;&lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;setup keys&lt;/b&gt;&lt;code&gt;$ mkdir -p /var/db/dkim/domains/example.com&lt;br/&gt;$ cd /var/db/dkim&lt;br/&gt;$ dkim-genkey # this creates a key and domain record file&lt;br/&gt;$ mv default.private domains/example.com/my_awesome_selector&lt;br/&gt;$ cat default.txt &gt;&gt; /etc/named/your_example.com_zone_file&lt;br/&gt;$ echo "*@example.com:example.com:/var/db/dkim/domains/example.com/my_awesome_selector" &gt;&gt; keylist &lt;/code&gt;repeat these steps for additional domains&lt;br/&gt;see the man page dkim-filter.conf(5) for more info on the keylist content format &lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;edit /usr/local/etc/mail/dkim-filter.conf&lt;/b&gt;&lt;br/&gt;I used mostly default settings with the following exceptions &lt;code&gt;DNSTimeout 5 # this should be lower than postfix's timeout&lt;br/&gt;Domain example.com # this may not be necessary given the use of a keylist file&lt;br/&gt;KeyList /var/db/dkim/keylist&lt;br/&gt;On-Default accept # shit happens, don't freak out on DNS lookups, etc...&lt;br/&gt;Socket local:/var/run/milterdkim/sock&lt;br/&gt;Syslog yes # the default syslog facility is 'mail' &lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;&lt;b&gt;configure postfix&lt;/b&gt;&lt;br/&gt;add the following lines to main.cf &lt;code&gt;milter_default_action = accept&lt;br/&gt;milter_protocol = 3&lt;br/&gt;smtpd_milters = unix:/var/milter-greylist/milter-greylist.sock unix:/var/run/milterdkim/sock&lt;br/&gt;non_smtpd_milters = unix:/var/run/milterdkim/sock&lt;br/&gt;&lt;/code&gt;&lt;/li&gt;&lt;br/&gt;&lt;li&gt;re/start services &lt;code&gt;/etc/rc.d/named reload&lt;br/&gt;/usr/local/etc/rc.d/milter-dkim start&lt;br/&gt;/usr/local/etc/rc.d/postfix reload &lt;/code&gt;&lt;/li&gt;&lt;/ol&gt;make sure it works! you can send a test mail to &lt;a href="mailto:check-auth@verifier.port25.com"&gt;check-auth@verifier.port25.com&lt;/a&gt; and you will receive a report including DKIM info.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8849722925596441975-1663866434718088228?l=blog.munkyboy.com' alt='' /&gt;&lt;/div&gt;</description><link>http://blog.munkyboy.com/2009/09/setting-up-dkim.html</link><author>noreply@blogger.com (munky)</author><thr:total>0</thr:total></item></channel></rss>
