Enabling Postfix on OSX as a Relay: Revisited

Postfix on OSX: Revisited A few years back, I had written a post on enabling the Postfix MTA as a relay server on OSX, which was quite well received. The article was originally written for OS X Lion, though it remained valid for OSX Mountain Lion, and more recently on OSX Mavericks as well. However, things have changed on the OS since the last two versions, which warrants a revisit of the instructions, and a refresh of some of the steps. While the old set of instructions still work, there are changes needed that will keep the configuration future-proof. ...

December 22, 2013 · 3 min

OS X Mountain Lion: Need to reinstall Xcode command line tools

So I upgraded to OS X Mountain Lion yesterday. The install was pretty smooth (though had a tough time with the redeem code for the upgrade, worked on the third code that Apple sent across). Most of the software is working fine. However, I found that my existing Xcode installation needed an upgrade (via a Xcode install from the App Store). The problem is that any new Xcode install seems to nuke the command line development tools (think make, autoconf, etc.). The solution is pretty simple though. Once Xcode has been installed, run Xcode and then open the preferences. There is a section on downloads, which lists installing the command line tools as an option. ...

July 27, 2012 · 1 min

Enabling postfix for outbound relay via Gmail on OS X Lion (and newer OSX versions)

Update on Oct 25, 2014: Updated For OS X Yosemite. Update on Dec 21, 2013: I have posted an update to the launchd setup for postfix. You should still read through this post, as most of the setup remains common to both posts. The background Mac OSX comes with the postfix MTA, which is a fully featured SMTP server. Under normal circumstances, there is usually no need to enable or configure this software, as most email access is usually done via GUI clients such as the Mail.app - which uses the POP/IMAP and SMTP settings to connect with the email service provider. ...

February 14, 2012 · 7 min

The Missing iSync in OS X Lion (and what to do about it)

The short answer to someone looking for a solution: just copy over iSync from your Snow Leopard installation back to the /Applications folder in Lion, and also copy the phone plugin you need back into /Library/PhonePlugins folder. Everything will be as it was. Enjoy. The longer story requires more explanation … The Problem I have been looking forward to upgrading to the latest version of OSX (Lion) ever since the announcements were made in the WWDC earlier this year. ...

July 22, 2011 · 3 min

Converting from TaskPaper to Emacs Org-Mode

Why TaskPaper and Org-Mode? TaskPaper is a simple and elegant task management software for the OSX platform. It combines the simplicity of a text micro-format to mark the tasks, and the elegance of a Mac UI. It also provides a quick launch time and a nice system-wide quick entry window that is accessible with a single shortcut key. I have been a heavy user of Emacs’ Org-Mode for some years now, and love the power and flexibility it offers for tracking not just outlines and tasks, but any text based item, including notes and calendar entries. In fact Org-Mode has become one of the primary software that I use regularly, every day. ...

March 30, 2010 · 5 min

Emacs function to add new path elements to the $PATH environment variable

A very simple eLisp function to add new path elements to the PATH environment variable. Very useful for adding new comint executables from within .emacs/init.el files. (defun my-add-path (path-element) "Add the specified path element to the Emacs PATH" (interactive "DEnter directory to be added to path: ") (if (file-directory-p path-element) (setenv "PATH" (concat (expand-file-name path-element) path-separator (getenv "PATH")))))

January 20, 2010 · 1 min

Google Search from within Emacs

A quick and dirty eLisp function for searching on the internet from within Emacs. The default is to search using Google, but you can add to the *internet-search-urls* variable to setup additional search URLs. By default, the search term is appended at end of the URL - however, you can also encode the specific search term insertion point in the URL by marking the position using the “%s” marker. ;;; The custom search URLs (defvar *internet-search-urls* (quote ("http://www.google.com/search?ie=utf-8&oe=utf-8&q=%s" "http://en.wikipedia.org/wiki/Special:Search?search="))) ;;; Search a query on the Internet using the selected URL. (defun search-in-internet (arg) "Searches the internet using the ARGth custom URL for the marked text. If a region is not selected, prompts for the string to search on. The prefix number ARG indicates the Search URL to use. By default the search URL at position 1 will be used." (interactive "p") ;; Some sanity check. (if (> arg (length *internet-search-urls*)) (error "There is no search URL defined at position %s" arg)) (let ((query ; Set the search query first. (if (region-active-p) (buffer-substring (region-beginning) (region-end)) (read-from-minibuffer "Search for: "))) ;; Now get the Base URL to use for the search (baseurl (nth (1- arg) *internet-search-urls*))) ;; Add the query parameter (let ((url (if (string-match "%s" baseurl) ;; If the base URL has a %s embedded, then replace it (replace-match query t t baseurl) ;; Else just append the query string at end of the URL (concat baseurl query)))) (message "Searching for %s at %s" query url) ;; Now browse the URL (browse-url url))))

January 19, 2010 · 2 min

Quickly diff the changes made in the current buffer with its file

Update (23rd Jan 2010): Separated the key-assignment and function definition. A simple function to quickly do a diff of the current buffer contents with its underlying file. Very useful if the file has been changed outside (e.g., a log file). ;; Diff the current buffer with the file contents (defun my-diff-current-buffer-with-disk () "Compare the current buffer with it's disk file." (interactive) (diff-buffer-with-file (current-buffer))) (global-set-key (kbd "C-c w") 'my-diff-current-buffer-with-disk)

January 19, 2010 · 1 min

gnuplot with AquaTerm on OSX Snow Leopard

The gnuplot graphing utility has always had excellent support for multiple terminal types. While the X11 terminal is a satisfactory GUI view for the graphs, I prefer to use the AquaTerm terminal on OSX as it is more ‘Mac-like’ and feels more natural. Also, I do prefer to compile gnuplot by myself on OSX rather than downloading the pre-packaged binaries - as this gives me more control over the compilation (including getting around the stupid Apple readline bug - where Apple has essentially shipped a broken readline by using libedit to emulate the non-existent libreadline). ...

January 17, 2010 · 3 min

Importing contacts from OSX Addressbook to Emacs BBDB

A major aspect of using Emacs is that it is more than a text editor - it is more of an application platform - some would call it an Operating System - that allows a host of applications to run within the same context and session - and vastly enrich the user experience. This is in fact a primary reason why many Emacs users spend their entire computer interaction via Emacs. ...

August 16, 2009 · 7 min