Genesis and Roadmap of my Mac Experience

Switch SMTP Server and other configurations with Network Location

August 16, 2006

Another thing a lot of people want is to change their mail configuration (at least the so called SMTP server which is the server you send your emails through) when they change network location. The SMTP servers are protected and don’t usually allow emails from other network than their own. So, when at home, you need to use your Internet Provider (ISP) server and when at work, you need to use your company server. Some other system configurations could be changed with the network location, like the default printer, or default internet browser home page.

There are several solutions to achieve this. The easiest way is probably to buy Location X which is easy to configure with a nice Graphical User Inteface (GUI) and probably worth the 20$ it costs.

However, if you don’t want to pay for this, there is the script way. You can choose the easy one, SwitchLocation AppleScript with Automator or use the complex LocationChanger which looks more elegant.

I choosed SwitchLocation, here is what I did:

  1. Dragged SwitchLocation onto the Applications->Automator icon
  2. For Mail block, changed the Mail account name and smtp address for Home Configuration
  3. For Printer, changed the name of the queue for Home Configuration
  4. Deleted other blocks
  5. Saved As SwitchHome in ‘Home Folder’/Library/Scripts
  6. Opened Applications->AppleScript->AppleScript Utility
  7. Checked Show Script Menu
  8. Unchecked Show Library scripts
  9. Did the same for a SwitchWork script for my Work configuration.

Still I would like to be able to:

  • Change the Network Location from the script
  • Close Mail.App and Printer Setup Utility after configuration is finished

Comments »

The URI to TrackBack this entry is: http://macadam.blogsome.com/2006/08/16/switch-smtp-server-and-other-configurations-with-location/trackback/

No comments yet.

RSS feed for comments on this post.

Leave a comment

Line and paragraph breaks automatic, e-mail address never displayed, HTML allowed: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>



Anti-spam measure: please retype the above text into the box provided.