Mail Services

March 30, 2008

var searchSection = ’support’; var searchCountry = ‘us’;

You are invited to take part in a short survey to help us improve your
Apple Support online experience. Please click Yes if you would like to participate.

// initialize utilbar with search keyword var ACKeyword = “Mac OS X Server v10.5 Leopard”

$(’searchsupport’).value = ACKeyword; var urlStr = (location.href).toLowerCase(); if ( urlStr.charAt(urlStr.length-1) == ‘/’ ) { urlStr = urlStr.slice(0, -1); } urlStr = urlStr.slice(urlStr.indexOf(“support”)+8); urlStr = urlStr.replace(/\//g,”.”); $(’src’).value = urlStr; var ACUtilbar = { ’showMore’ : function() { $(’searchsupport’).value = ACKeyword; // in case user changed it $(‘activity’).value = ‘more’; $(‘utilbar-searchform’).submit(); } }

All products… AirPort Extreme & AirPort Express Aperture Apple Cinema + Studio Displays Apple Remote Desktop Apple TV AppleWorks Bluetooth Bonjour Boot Camp Cinema Tools Color Compressor .Mac DVD Studio Pro Earlier Macintosh Servers Earlier Mac models Earlier Operating Systems Earlier Power Macintosh Earlier PowerBooks eMac Final Cut Express Final Cut Pro Final Cut Studio GarageBand iBook iCal iChat AV iDVD iLife iMac G3 (CRT) iMac G4 (Flat-Panel) iMac G5 + G5 (iSight) iMovie Intel-based iMac iPhone iPhoto iPod classic Earlier iPod models iPod Hi-Fi iPod mini iPod nano (3rd gen) Earlier iPod nano models iPod shuffle iPod touch iSight iSync iTunes iTunes Store iWeb iWork Keynote LiveType Logic Express Logic Pro Logic Studio Mac mini Mac OS 9 Mac OS X Server v10.5 Leopard Mac OS X Server v10.4 Tiger Mac OS X v10.2 and earlier Mac OS X v10.5 Leopard Mac OS X v10.3 Panther Mac OS X v10.4 Tiger Mac Pro MacBook MacBook Air MacBook Pro Mail MainStage Motion Nike + iPod Numbers Pages Power Mac G4 Power Mac G4 Cube Power Mac G5 Power Macintosh G3 PowerBook G3 PowerBook G4 Qmaster QuickTime Player & QuickTime Pro Safari Shake Soundtrack Soundtrack Pro Time Capsule WebObjects WaveBurner Wireless Keyboard & Mouse Xsan Xserve Xserve RAID

Mac OS X Server v10.5 Leopard

Mail Services

For help with setting up email access and restrictions, using management tools, and more, try these solutions.

Support Topics

Visit the Apple Store online (1-800-MY-APPLE), visit a retail location or find a reseller.

Copyright © 2008 Apple Inc. All rights reserved. Terms of Use | Privacy Policy

var searchSection = ’support’; var searchCountry = ‘us’;

You are invited to take part in a short survey to help us improve your
Apple Support online experience. Please click Yes if you would like to participate.

// initialize utilbar with search keyword var ACKeyword = “Mac OS X Server v10.5 Leopard”

$(’searchsupport’).value = ACKeyword; var urlStr = (location.href).toLowerCase(); if ( urlStr.charAt(urlStr.length-1) == ‘/’ ) { urlStr = urlStr.slice(0, -1); } urlStr = urlStr.slice(urlStr.indexOf(“support”)+8); urlStr = urlStr.replace(/\//g,”.”); $(’src’).value = urlStr; var ACUtilbar = { ’showMore’ : function() { $(’searchsupport’).value = ACKeyword; // in case user changed it $(‘activity’).value = ‘more’; $(‘utilbar-searchform’).submit(); } }

All products… AirPort Extreme & AirPort Express Aperture Apple Cinema + Studio Displays Apple Remote Desktop Apple TV AppleWorks Bluetooth Bonjour Boot Camp Cinema Tools Color Compressor .Mac DVD Studio Pro Earlier Macintosh Servers Earlier Mac models Earlier Operating Systems Earlier Power Macintosh Earlier PowerBooks eMac Final Cut Express Final Cut Pro Final Cut Studio GarageBand iBook iCal iChat AV iDVD iLife iMac G3 (CRT) iMac G4 (Flat-Panel) iMac G5 + G5 (iSight) iMovie Intel-based iMac iPhone iPhoto iPod classic Earlier iPod models iPod Hi-Fi iPod mini iPod nano (3rd gen) Earlier iPod nano models iPod shuffle iPod touch iSight iSync iTunes iTunes Store iWeb iWork Keynote LiveType Logic Express Logic Pro Logic Studio Mac mini Mac OS 9 Mac OS X Server v10.5 Leopard Mac OS X Server v10.4 Tiger Mac OS X v10.2 and earlier Mac OS X v10.5 Leopard Mac OS X v10.3 Panther Mac OS X v10.4 Tiger Mac Pro MacBook MacBook Air MacBook Pro Mail MainStage Motion Nike + iPod Numbers Pages Power Mac G4 Power Mac G4 Cube Power Mac G5 Power Macintosh G3 PowerBook G3 PowerBook G4 Qmaster QuickTime Player & QuickTime Pro Safari Shake Soundtrack Soundtrack Pro Time Capsule WaveBurner WebObjects Wireless Keyboard & Mouse Xsan Xserve Xserve RAID

Mac OS X Server v10.5 Leopard

Mac OS X Leopard Server

Get Support For

Install

File Sharing

iCal Server

iChat Server

Mail Services

Web Services

Networking and VPN

Open Directory

Podcast Producer

Advanced Topics

Visit the Apple Store online (1-800-MY-APPLE), visit a retail location or find a reseller.

Copyright © 2008 Apple Inc. All rights reserved. Terms of Use | Privacy Policy

Category : Mac OS X Server v10.5 Leopard

 

Forum / Category Views Topics / Messages Last Post
Read
Installation, Setup and Migration
56,445 651 / 2,758
Mar 30, 2008 1:18 AM
by: Leif Carlsson »
Read
File Sharing
16,495 266 / 1,288
Mar 29, 2008 6:40 AM
by: jfreeze »
Read
iCal Server
13,911 188 / 1,115
Mar 29, 2008 12:24 AM
by: dalboslampen »
Read
iChat Server
3,472 54 / 322
Mar 20, 2008 7:25 AM
by: James Hagemann1 »
Read
Mail Services
13,350 372 / 1,815
Mar 29, 2008 11:33 PM
by: l008com »
Read
Web
Hosting websites, wikis, and blogs
31,845 388 / 1,676
Mar 29, 2008 10:08 PM
by: martin.levins »
Read
Networking and VPN
10,009 288 / 1,208
Mar 29, 2008 4:30 PM
by: Andrew Shepherd »
Read
Open Directory
70 332 / 1,269
Mar 29, 2008 5:00 PM
by: carburo »
Read
Podcast Producer
127 62 / 253
Mar 28, 2008 5:48 AM
by: Seik »
Read
Portable Home Directories 3,169 49 / 180
Mar 27, 2008 8:22 PM
by: Solutionator »
Read
Advanced Topics
NetBoot, NetInstall, Software Update, Print Services, QuickTime Streaming, Xgrid
12,454 255 / 1,110
Mar 29, 2008 5:23 PM
by: Strontium90 »

Recent threads in this category :

Topic Author Forum Views Replies Last Post
        Read
Sub-domain configuration in DNS Franco Borgo Installation, S… 109 1
Mar 30, 2008 1:18 AM
by: Leif Carlsson »
        Read
Whats this in my mail queue? l008com Mail Services 20 0
Mar 29, 2008 11:33 PM
by: l008com »
        Read
domain.com/.spotlight: /usr/bin/mod_spotlight_apple_helper failed J R3 Web 66 1
Mar 29, 2008 10:08 PM
by: martin.levins »
        Read
SMTP SSL l008com Mail Services 397 9
Mar 29, 2008 9:54 PM
by: l008com »
        Read
Backup Wiki content with Time Machine? db81 Web 18 0
Mar 29, 2008 6:37 PM
by: db81 »
        Read
Advanced Server – Backup Solutions Andrew Shepherd Installation, S… 42 0
Mar 29, 2008 5:53 PM
by: Andrew Shepherd »
        Read
Creating Netinstall Images RandyGibbs Installation, S… 57 1
Mar 29, 2008 5:51 PM
by: Strontium90 »
        Read
software updates from server Bhagiratha Advanced Topics 51 2
Mar 29, 2008 5:23 PM
by: Strontium90 »
        Read
Local Apple Software Update Server for Windows sstoupak Advanced Topics 94 2
Mar 29, 2008 5:13 PM
by: Andrew Shepherd »
        Read
Kerberos not working chlang Open Directory 592 6
Mar 29, 2008 5:00 PM
by: carburo »
        Read
Migrating Wiki to new server Andrew Shepherd Web 62 2
Mar 29, 2008 4:43 PM
by: Andrew Shepherd »
        Read
Web access *slow* since Leopard Server install…. Andrew Shepherd Networking and … 49 0
Mar 29, 2008 4:30 PM
by: Andrew Shepherd »
        Read
Web Server not working any more xmacmanx2 Web 86 6
Mar 29, 2008 1:33 PM
by: xmacmanx2 »
        Read
I Have become a Spam relay system I need Help kcam1999 Mail Services 479 16
Mar 29, 2008 10:47 AM
by: kcam1999 »
        Read
How would you move software updates to a new server? nige@dgs Advanced Topics 153 2
Mar 29, 2008 10:06 AM
by: Antonio Rocco »
Pages : 194 [ 1 2 3 4 5 6 7 8 9 10 | Next ] Point your RSS reader here for a feed of the latest messages in all forums
Answered question

Apple Mail 3.0 (Leopard)

March 30, 2008

Help Center

Help Center

العربية Български Bahasa Indonesia Català Česky Српски Dansk Deutsch English (US) English (UK) Español Eesti keel Français Italiano Latviešu Lietuvių Magyar Nederlands Norsk Polski Português (Brasil) Русский Hrvatski Íslenska Română Slovenský Slovenščina Suomi Svenska ภาษาไทย Tagalog Türkçe Українська Ελληνικά हिन्दी اردو Tiếng Việt 中文(简体) 中文(繁體) 日本語 한국어

Apple Mail 3.0 (Leopard)

Please note that if you’re adding your Gmail address to Apple Mail 3.0 for the first time, your mail will be automatically configured for POP access. In order to configure IMAP, please follow these steps:

  1. Click Mail > Preferences….
  2. On the Accounts tab, click the + button to add a new account.
  3. Fill in the new window with the following information:
    • Full Name: [yourname]
    • Email Address: your full Gmail address [yourname@gmail.com]
    • Password: your Gmail password
    • Important: please deselect the box next to ‘Automatically set up account
  4. Click Create.
  5. Fill in the following Incoming Mail Server information:
    • Account Type: Select IMAP
    • Incoming Mail Server: Change this to imap.gmail.com
    • User Name: your Gmail username
    • Password: your Gmail password
  6. Click Continue.
  7. Enter the following Outgoing Mail Server information:
    • Outgoing Mail Server: smtp.gmail.com
    • Use Authentication: selected
    • Username: your Gmail username
    • Password: your Gmail password
  8. Click Continue.
  9. Review your Account Summary, and click Create.

You’re done!

updated 3/10/2008

  

Tutorial – Setting up Leopard Mail.app with Google Gmail IMAP – The Basics

Tutorial Introduction

I switched from Windows to Mac OS X Tiger on a MacBook Pro about two years ago in early 2006, and have been enjoying the experience immensely; even more so with Leopard. I purchased Entourage with Office 2004 for Mac and had been using it with my corporate Exchange server at my company eSolia, but had grown weary of the monolithic local message store, so in December 2007, I decided to give Mail.app, iCal and Address Book a go on Leopard. Looking back, it’s funny that I was so diehard Windows-only.

This tutorial describes how I set up Mail.app in OS X Leopard to handle both private and work email, using Google Mail accessed via the IMAP protocol, and sending mail via my ISP’s SMTP server to avoid the Outlook “sent on behalf of” problem.

I’ll make these naming conventions for this tutorial:

  • Your “private” email is your Google Mail account
  • Your “corporate” email is your account on a domain you or your company owns

Prerequisites

Here’s what you need to prep before you begin:

  1. Google Mail Account information
  2. Information for a forward-able “Corporate” Mail Account
  3. ISP login and SMTP information

Let’s get started.

Setup Forwarding for your Corporate Email

Setup your corporate email address to forward to your Google Mail address. In my case, I did this in Active Directory on my Exchange server, so that anything that comes in to my corporate address gets forwarded to Google Mail and does not get saved on Exchange. Other systems have other methods, like the use of hidden .forward files in the ~ home folder on a *nix server, and this is going to be slightly different for each person. The thing to watch out for is whether forwarding will take place server-side, or, you have to be logged in with your mail agent started for the forwarding to happen. Using Outlook’s client-side rules is an example of the latter.

Setup an Account in Mail.app for Gmail

Setup an Account in Mail.app. You do this in Mail.app Preferences, Accounts, clicking the + sign as per usual in (usually) nice, consistent Apple applications. When the wizard starts, you’ll have a choice to go for an automatic setup, but don’t select that option. Go for the manual setup.

There are plenty of sites, Google’s included, that explain how to set up Mail.app for basic IMAP access, so I won’t bore you too much. In the Account Information tab, you can have both your corporate and private addresses. Note I have rick dot cogley @ esolia … followed by a comma, followed by my private Gmail address, in “Email Address.” The incoming mail server should be imap.gmail.com, and the username is your Gmail account without the @gmail.com.

Avoid the Outlook “On Behalf Of” Problem – Use your ISP’s SMTP

For the outgoing SMTP server, I used my ISP @Nifty’s provided one. Drop down the server list, and choose Edit server list. Then add your SMTP server’s information. @Nifty requires us to log in (smtp-auth) to use their SMTP servers, and they require port 587 (as opposed to the more generic port 25). Set this up as specified by your provider. You might use your company’s SMTP server as well if it is convenient and accessible from both inside your company network and outside.

Why not use Google’s smtp.gmail.com? After all, if you do, everything you send out via it gets put into your sent items, which is convenient. The reason is an esoteric one, which has to do with the way Outlook or Exchange treat mail headers. If you send via smtp.gmail.com to an Outlook / Exchange user, they will see “From rick@gmail on behalf of rick@corporate” which is not very professional, is it.

Setup Advanced Settings

In the Advanced tab, enable the account, include it in checks for mail, decide how much of a mail and its attachments you want to keep for offline viewing. Set the IMAP path prefix to “[Gmail]” (without the quotes, of course) if you want a cleaner look for your folders in the main Mail.app interface. However, a warning: changing this means that Mail.app will RESYNC your entire mail store with Gmail. If you have a lot of mail stored in Gmail already, this could take a serious amount of time. I have about 1.5 GB, and it took days to sync.

Setup Mailbox Behaviors

Next use the Account’s Mailbox Behavior’s tab to set up what Gmail folder goes where, and what sync’s with what. Here’s how I set up mine, with Drafts, Junk and Trash stored in the server, Notes stored in the Inbox, and Sent mail NOT stored on the server. Later we’ll make settings that will get your sent mail into the Gmail sent mail folder automatically, so never fear.

You can also make these settings by choosing the target folder in your mail folder hierarchy, and assigning the folder using the menu Mailbox, Use This Mailbox For.

Setup Junk Mail Processing

Gmail has excellent anti-Virus and Junk mail processing already, so I chose to leave any junk mail that got through in my main mailbox. This works well because Mail.app and Gmail get “confused” when there are multiple Junk mail locations. In Junk settings, I chose to trust the ISP’s junk mail headers, and to not mark as Junk if the sender is in my Address Book.

Setup Google Mail Processing

Now you have to do a few things to make your mail go into the correct folders. First, BCC yourself on all messages in Mail.app. This is in Preferences, Composing.

Next in the Gmail interface, set up a Filter to bypass the Inbox for anything that comes from yourself (while viewing the Inbox, click Create a Filter next to the Search the Web button). I created one filter each for both my corporate and private addresses. The filter should be set to match all mails From your address(es), and the Next Step should be to bypass the Inbox and send it straight to the Archive.

Google’s IMAP implementation is different from the true standard. It seems they keep everything in one big folder per person and tag the mail so that it appears to be in certain folders in the web interface. Now, any mail that you send out of Mail.app is BCC’ed yourself, so that mail To: someone From: yourself will also be forwarded to your “private” Gmail address, and acted upon by the Gmail filters you create. The filter will fire, notice that the mail is from yourself, and automatically tag it correctly as sent mail so that it is visible in the correct place. Despite the fact that you are not storing Sent mail on the server, your local Sent Mail folder will still have a copy of the mail when it is sent from Mail.app.

Not to forget, additionally, you have to set up Gmail to use your “corporate” address. Do this in Gmail settings, Accounts tab. I added my corporate address, and verified as directed by Google.

So the Flow Goes

Someone sends mail to you@your.corporate.com, which is forwarded to your private@Gmail account. If it is a virus or spam, Gmail’s filters for those will act upon the mail. If it passes through the gauntlet, Mail.app downloads the mail, runs another Spam check and processes any rules you have set, then copies the mail into your Inbox folder. You reply to the mail and Mail.app copies your reply into your local Sent Items folder. Because you have BCC’ed yourself, the reply gets routed to you@your.corporate.com again, forwarded to Gmail, and Gmail’s filters act upon it, noticing it is From: you. The mail is automagically copied into the Gmail Sent Mail folder (tagged as Sent).

When you create an email, you choose which email you wish to send from, both of which you entered in Preferences, Accounts, “Email Address”, separated by a comma. Your outgoing SMTP server would be your ISP’s one or your corporate one depending on your setup. Your BCC address is automatically entered in based on your auto BCC setting. You click send, and Mail.app logs into your outgoing SMTP server to process the send, and the mail is processed into the right IMAP folder as appropriate.

Decision Summary

During this setup, we made the following decisions:

  • Use the IMAP protocol not POP, because IMAP allows you to access your mail from multiple IMAP clients.
  • Use your ISP’s SMTP server to resolve the Outlook “on behalf of” problem, and use a Gmail Filter to make sure your mails get put in the Sent Items folder. The Gmail filter will skip the Inbox, and archive the mail from yourself immediately.
  • BCC yourself to make sure the aforementioned filter always fires, putting sent mail in its place.
  • Setup and verify your “corporate” account in Gmail, Settings, Account, so that you can choose From: me@corporate when you compose a mail in Mail.app.

It’s a little bit complex, but it is nice to have a robust backend with great anti-virus and anti-spam measures, plus a large amount of storage space, for free. Kudos to Google for giving us such a wonderful service.

0 comments:

Links to this post

Setting up Sieve and Vacation Messages on Mac OS X Server

mail.jpg The documentation for setting up sieve on Mac OS X server is sparse, at best:

To enable Sieve support:
1. Add the following entry in /etc/services/:
sieve 2000/tcp #Sieve mail filtering
2. Reload the mail service.

Right. This will enable the service, but it doesn’t configure it. This short article describes how to do both.

1. Create the Sieve Directory

For those without much experience, Apple’s documentation doesn’t mean much, plus its missing some important steps. The first step, which isn’t mentioned, is to create the sieve directory, where the sieve steps are to be located on your filesystem. You’ll be working in the Terminal application for this whole procedure. To create the sieve directory with the appropriate ownership in Leopard, do:

sudo mkdir /usr/sieve
sudo chown _cyrus:mail /usr/sieve

2. Enable the Sieve Service

The next step is to open /etc/services with a text editor — I use ‘vi’, but Apple helps newbies out by shipping the pico text editor with Leopard. To load the services file into pico:

sudo pico /etc/services

Use the arrow keys to scroll down, or, press Control-W, and type in ‘callbook’, followed by enter. There is already a service for port 2000 listed in Leopard’s services file: callbook. I have no idea what callbook is, so I replace it with sieve:

sieve 2000/tcp #Sieve mail filtering
callbook 2000/udp # callbook
#callbook 2000/tcp # callbook

Save your changes by pressing Control-o, and exit with Control-x. Sieve will be enabled as soon as the mail service is restarted. Before you do that though, setup a mail administrator account.

3. Setup a Mail Administrator Account

In order to install sieve scripts for other users, you need a mail administrator account. You should add a special account with a secure password for this task, but you could just add your own user account as a mail administrator. Supposing we have a special account named “mailadmin”, to enable it as a Cyrus mail administrator, open the /etc/imapd.conf file in your text editor, and change the first line:

admins: cyrusimap, mailadmin

4. Restart the Mail Service

You can restart the mail services by using the Server Admin application, or by running this at the command line:

sudo serveradmin stop mail
sudo serveradmin status mail
... ( it should indicate that the mail service is stopped ) ...
sudo serveradmin start mail
sudo serveradmin status mail
... ( it should now indicate that the mail service is running ) ...

You can tell if the sieve service is running by checking to see if the server is listening on TCP port 2000, by running this command:

netstat -an | grep 2000
tcp4 0 0 *.2000 *.* LISTEN
tcp6 0 0 *.2000 *.* LISTEN

5. Add a Sieve Script

Now all you need to do is add sieve scripts for users. Sieve scripts are text files. To add sieve scripts, you can use the sieveshell command, which is located in the obscure location, /usr/bin/cyrus/sieve/sieveshell. I suggest that you make life easier by symlinking it to your /usr/bin directory:

sudo ln -s /usr/bin/cyrus/sieve/sieveshell /usr/bin/sieveshell

Apple’s Mail Administration manual has several example scripts. The most common is probably a vacation message, so I’ll use that example. Copy and paste the example vacation script into a text file (’pico vacation.msg’):

#--------
# This is a sample script for vacation rules.
# Read the comments following the pound/hash to find out
# what the script is doing.
#---------
#
# Make sure the vacation extension is used.
require "vacation";
# Define the script as a vacation script
vacation
# Send the vacation response to any given sender only once every seven days
no matter how many messages are sent from him.
:days 7
#For every message sent to these addresses
:addresses ["bob@example.com", "robert.fakeuser@server.com"]
# Make a message with the following subject
:subject "Out of Office Reply"
# And make the body of the message the following
"I’m out of the office and will return on December 31. I won’t be able to
replay until 6 months after that. Love, Bob.";
# End of Script

Note that there are two addresses between the brackets on the “:addresses” line. Be sure to put any aliases that you have for your address in a comma-separated list, or they won’t get an automated reply.

Going with the example and supposing that I have a user named “bob”, I would then add this sieve script, which is saved to an arbitrarily-named text file, “vacation.msg”, by running the following on the command line:

sieveshell --user=bob --authname=mailadmin localhost

This will get you into the interactive sieveshell. Type ‘help’ to see available commands. Assuming that your saved sieve script vacation.msg is in the current directory, install it for bob by running:

put vacation.msg

Verify that its there by running list. The last step is to activate the script with the activate command:

activate vacation.msg
list

That’s it. There will now be a directory, /usr/sieve/b/bob that contains bob’s sieve data, and you should get an automatic reply when you send an email to bob@example.com.

Tags: , , , ,

10 Responses to “Setting up Sieve and Vacation Messages on Mac OS X Server”

  1. Baochun Says:
    December 6th, 2007 at 8:48 pm Interesting — except “enable vacation.msg” should be “activate vacation.msg”.
  2. Brent Says:
    December 6th, 2007 at 8:58 pm Oops! Thanks — fixed.
  3. Phil Greer Says:
    December 7th, 2007 at 12:15 pm to get squirrelmail to work with sieve:

    Download the most recent avelsieve distribution from the web page at http://email.uoa.gr/projects/squirrelmail/avelsieve_download.php. I used the more recent Dev Branch version: avelsieve-1.9.6.tar.gz.

    Un-tar this in the squirrelmail plugins directory ( /usr/share/squirrelmail/plugins ), again as root or using sudo via the Terminal and cd into ( avelsieve/config/ ). Copy the example config ‘config_sample.php’ to ‘config.php’ IN THE SAME DIRECTORY. You don’t really need to edit anything in the config.

    Run the SquirrelMail config perl script;
    % sudo /etc/squirrelmail/config/conf.pl

    Choose Option 8, “Plugins” from the menu, and enable “avelsieve” by selecting it from the resultant list. Save your changes and quit the utility.

    Login in to one of the mail accounts using SquirrelMail, and the “Filters” menu should now be an option – choosing this allows you to create your sieve scripts, including a vacation mail ‘auto-reply’.

    Looking in the /usr/sieve/a/admin directory (for example) should show the following files;

    lrwx—— 1 cyrusima wheel 12 Nov 4 11:41 defaultbc -> phpscript.bc
    -rw——- 1 cyrusima wheel 232 Nov 4 11:42 phpscript.bc
    -rw——- 1 cyrusima wheel 1056 Nov 4 11:42 phpscript.script

  4. Gary Says:
    January 14th, 2008 at 2:50 am HI, I’m new to this and need some help. I’m following your instructions to the letter, but when I get to the part where I type:

    sieveshell –user=bob –authname=mailadmin localhost

    All I get is the following message:
    unable to connect to server at /usr/bin/sieveshell line 169, line 1.

    What have I done wrong?

  5. Brent Says:
    January 14th, 2008 at 9:07 am Hi Gary,

    When you run:

    netstat -an | grep 2000

    Does it say:

    tcp4 0 0 *.2000 *.* LISTEN
    tcp6 0 0 *.2000 *.* LISTEN

    ?

    If so, what happens when you `ping localhost’ ?

  6. Jeff Says:
    January 21st, 2008 at 10:58 am I was having he same problem as Gary. The system.log reported “No worthy mechs found”. Guessing this was referring to SASL authentication mechanisms I went into Server Admin and enabled Login and PLAIN authentication for IMAP and SMTP. sieveshell now prompts for a password but does not accept the user password or the mail administrator password. Stuck again.
  7. Brent Says:
    January 21st, 2008 at 11:07 am When you run sieveshell, you are not connecting to IMAP. You are connecting to the sieve service. So, when you run ‘netstat’ as per above, do you get the output mentioned above, indicating that the sieve service is actually running?

    If so, is your user or mail administrator username listed on the admin line of /etc/imapd.conf, as per step 3, above?

  8. nick Says:
    February 14th, 2008 at 10:32 am will this still work if my mail database is stored on a different hard drive than my leopard server install is on? i have mirrored drives in the xserve that work solely as mail storage.
  9. Brent Says:
    February 14th, 2008 at 10:40 am The location of your mail storage has nothing to do with the sieve service.
  10. nick Says:
    February 14th, 2008 at 10:42 am many thanks.

MailServe for Leopard

March 30, 2008

MailServe for Leopard

MailServe sets up a totally buzzword-compliant mail server on Mac OS X, the Mac Way. It sets up SMTP, UW/IMAP/POP3, and Fetchmail services, including support for SSL, IPV6 and SMTP authentication.

New in Leopard

MailServe can now also be configured from a non-admin account. Simply provide either the full name or the OS X short name of an admin-level user and the administrator’s password.

MailServe’s customizable toolbar includes panels for setting the outgoing SMTP server parameters, the full mail server preferences, Fetchmail settings (if needed), and access to the mail log. There are separate buttons for turning on POP3 and IMAP, with or without SSL, in case there is a need for enforcing SSL-only connections from mail clients. There is also a new Port Status bar at the bottom of the window, to give a visual indication as to whether MailServe has successfully opened up the relevant ports for listening to connections.

The Outgoing Mail Panel

Click the Start Postfix button on the toolbar to turn on Mac OS X’s built-in SMTP server. This will allow you to send mail out the command line, from PHP or Perl scripts, or from mail client applications like Mail, Eudora or Entourage.

If Postfix has been successfully started, its toolbar button changes its label to Restart Postfix, and the Port Status bar lights up for SMTP port 25. You can always Stop Postfix by option-clicking on the toolbar button.

Using the other fields in the Outgoing Mail Panel

If your ISP blocks port 25 and requires you to go through their own SMTP server (what is called a Smart Host), enter their SMTP server name into the Smart Host Name field (otherwise leave it blank). Your built-in Postfix SMTP server will then contact this Smart Host and relay mail through it.

In addition, if your ISP requires you authenticate against its Smart Host, turn the Enable Authentication check-box on and provide the user-id and password combination given by your ISP, as shown in the example below :

If your ISP requires that you connect to their SMTP server over SSL, turn the Require SSL check box on.

After you’ve made any of these changes, click the Restart Postfix button to effect the change. Then test that you can now send mail out your ISP network, by sending mail out via the command line, PHP or Perl script, or from a mail client like Mail or Eudora. Make sure that the port status light for SMTP is green.

If you do get a connection and can send mail out, you might like to add a couple of other refinements.

If you want your message to look like it’s being sent from a particular domain (and avoid the “May be forged” headers that some ISPs’ servers tag onto it), enter that doman name into the Masquerade As field.

The Masquerade As field is particularly important for PHP programmers using PHP’s built-in mail function. Enter a domain name into the Masquerade As field that corresponds to to the e-mail address that you want all replies to come back to, and you will find that your messages will get to their destination safely from the PHP scripts. Without this, the messages will get rejected.

The last field on this panel is the Message Size Limit. Set to 0 for no limit.

If you need to keep a list of Smart Hosts, for when you are on different networks or locations, store them in MailServe’s Smart Host list. You can pick them up in the popup menu when you’re setting the Smart Host.

For developers – the benefits of having your own SMTP server

For PHP programmers, web designers, and other software developers, it’s often useful to set up a local SMTP server on the development machine and communicate with it through “localhost”. This is because you can let the local SMTP server do the job of communicating with a Smart Host, or set up the SSL connections, if required, or work with the DNS System, without your having to figure out what to do to effect these in your code. In your code, you simply talk to “localhost” and leave it to the Postfix Enabled-SMTP server to do the rest.

Setting Up Mail.app

This is how you set up Mail.app to talk to the local SMTP server.

Set up the POP or IMAP account information the usual way, for the Incoming Mail Server. Set them to point to whichever mail server is providing the POP or IMAP services.

You can use MailServe to set up POP and IMAP services so you can become your own ISP – see the topic concerning the Mail Server panel, below.

To use use your own built-in SMTP server, set the mail client application’s Outgoing Mail Server to either localhost or 127.0.0.1, as shown above, and that’s it. Make sure that the Authentication pop-up menu is set to none because you don’t need to authenticate with your own built-in mail server.

In summary, this is what you’re doing. You set up your POP or IMAP accounts so that replies coming back to you will reach you on your mail client. But the messages sent out your Mac via localhost will be despatched directly to the recipients.

Note for MacBook users : You may like to know if a large attachment has been sent out your machine, so you can close your MacBook lid. Look into the Mail Log panel and check for a log entry that indicates Status=Sent for that particular message.

Warning: If you’re only going to send mail out and not intending to set up a full-fledged mail server (see next section), do not use the Mail Server panel because the settings for the two situations are slightly different. Specifically, do not enter a domain name into the Mail Server panel because that will cause Postfix to hold on to mail that are addressed to people on that domain, rather than sending them out.

The Mail Server Panel

MailServe can be used to set up a fully functioning mail server, complete with POP3, IMAP, and Fetchmail services. Workstations on the local network can use this server to relay mail to each other, as well as to send them out to the rest of the world. This section describes how you would set this up.

First, make sure that you’ve already been able to send mail out successfully to other mail servers. If not, please review the earlier Outgoing Mail panel.

Make sure you have a valid domain name and that it is pointing correctly to your server machine. If it is, enter it into the domain name field. In the example above, my domain name is cutedgesystems.com.

Once you’ve done this, click on Restart Postfix, and that’s it. I’ve set up a mail server for the domain cutedgesystems.com and all machines on the same network as the server can send mail through it.

Multi-domains Note : If you’re able to serve out more than one domain on your server, you can tell your mail server to receive mail from those other domains by adding their names into the Additional Domain Names field.

Please note : When you’re setting up a mail server that is accessible by the rest of the world, you must have a valid domain name. Check out this tutorial if you want to try this out using a free domain name. You need to check that the domain name works. The simplest way to do this is to turn on the web server on the same machine you are using to run your mail server (using OS X’s Sharing Preferences). Then, fire up a web browser, like Safari, and see if you can hit the web pages that you know you have on this machine.

Setting up POP3 and IMAP Services

It’s important to realise at this point that you need to set up user accounts on the mail server to collect (and act as distribution points) for the in-coming mail. To create an account for a mail user, simply create a New User on that server machine using the System Preferences -> Accounts panel.

Once you’ve created your user accounts on the server, you can choose between two different mechanisms that will allow your mail users to download their in-coming mail to whatever machine they happen to be using as their workstation.

POP3 is a simple mechanism for transferring mail to a mail client software like Eudora, Mail.app, or Entourage. IMAP is a “smarter” system because you can use more than one machine to read your mail and the state of your mail box is synchronised across all these machines (in terms of the messages last read, state of drafts, etc.)

You can set up both POP3 and IMAP services using MailServe and have both running at the same time, allowing your users to choose which service they prefer.

So, next, you will need to enable either POP3 or IMAP services (or both) so that all the machines and users on your network can retrieve their incoming mail.

Leave all the other settings alone and click on the Start POP3 or the Start IMAP button on the toolbar, depending on which mode of mail service you prefer to run. If the services start up correctly, their status lights turn to green and their button labels now show Stop POP3 or Stop IMAP, respectively.

Check that it works

Assuming that my domain name is cutedgesystems.com, this is how I’ll set up the mail client, OS X’s Mail.app, on each user’s machine. Test it first on the local machine, i.e., the same machine you’re using to run your server.

Enter your domain name into your mail client’s Incoming Mail Server and Outgoing Mail Server fields. The User Name and Password fields will correspond with the name and password of a user you had created using the Systems Preferences – Accounts Panel on the server machine. (If you’ve enabled the IMAP server, you can also use the Account Type: IMAP).

When you are ready, use Mail to send mail out to anybody you know and see if you can get a reply. The replies will come back to the same server. You can pick them up using Mail because MailServe has equipped your server with POP3 services.

The Access Field

The Access field can be used to blacklist individual mail senders from sending mail to your site, or even entire domains.

spammer@yahoo.com REJECT
spamUnlimited.com REJECT

It can also be used to stop mail from reaching a particular user account on your system, e.g., for a user that has since left the company :

brendan@ REJECT

Imagine that Brendan has left the company but he was subscribing to lots of mailing lists. The above setting in the Access field will bounce all mail for brendan back to the sender. Note : use brendan@ as a wild card setting, if you’re receiving mail for more than one domain. If you want to specify that you want to block Brendan’s mail for just one specific domain, use brendan@cutedgesystems.com REJECT.

The Aliases Field

Some required entries for Aliases are already created for you. Each site needs to have a Postmaster and a Root user so that other ISPs and you own system processes can contact a responsible person when they find problems with your system. MAILER-DAEMON is the conventional name attached to bounced messages. When senders find that their messages have bounced, they may need to contact someone for clarification. Their replies to their bounced messages will go to MAILER-DAEMON, so you need someone to pick these up.

The first line in the example, below, shows that you can create e-mail groups quickly by entering a group name on the left-hand side of an Alias entry, and entering a series of user names, separated by commas, on the right-hand side, which can include users from other domains.

nightrunner: haihwee,beekhim,brendan@sky.com
postmaster: bernard
root: bernard
MAILER-DAEMON: bernard
mailist: :include:/full/path/name/to/mailinglist.txt

The last line in the example, above, shows another way of creating e-mail groups – by pointing the mail server to a file that contains a list of e-mail addresses, with one address on each line.

You can also send all mail destined for a specific user into the black hole :

baduser: /dev/null

The Catch All Mail Box – mail addressed to no valid user

You can choose who, among your users, gets to be swamped by mail that cannot find a valid user on your server. If you elect not to nominate anyone, all these messages will be bounced back to the sender.

Or sent into the black hole, if you choose /dev/null in the popup menu.

The Additional Domain Names Field

If your server hosts more than one domain, you can list the additional domains in this field (separated by commas) so that Postfix knows that it has to accept messages sent to these domains. Make sure that these domain names work first and that they’re also pointing correctly to your server machine.

Ordinarily, there is no separation between users into particular domains. For example, on my server, mail for bernard@cutedgesystems.com and mail for bernard@roadstead.com will both reach me in my single mail box on the server, under the user name bernard.

To get mail for sales@cutedgesystems.com and sales@roadstead.com sent to two different mail boxes, see the Virtual Domains example, below.

Relay Mail From – all machines on the same network or only clients who authenticate

This option allows you to prevent your Mac acting as an open relay if you’ve placed it directly on a broadband line. The default setting is to allow all machines on the same subnet as the server to relay mail through it without needing to authenticate, which is convenient for getting a shared server up quickly. But if you’ve placed the server directly on a broadband or dial-up line, then you will have all machines sitting on your ISP’s network becoming your local network, inadvertently creating an open relay.

Clicking on the “Relay Mail From : only clients who authenticate” choice will close up the open relay. If you need to still allow mail relay from known users, turn on authentication. This will be the safest option.

The Custom Postfix Settings field

This is meant to allow experienced Postfix users to add their own modifications to the Postfix configuration that have not been taken care of by the MailServe user interface. These will not be over-written when you do a Restart Postfix.

The Mailbox Size Limit field

Set to 0 for no limit, which may be useful for people running Fetchmail. The default is about 50 MB.

The Alternate Port Numbers (for SMTP) field

This allows the server administrator to open more ports (beside port 25) for mail clients to contact it. For example, it may be useful to add port 2525 (and also 52525, separated by a comma). This way, if your users happen to be on a network that blocks outgoing mail from using port 25, your users would still be able to relay mail out your server by switching their mail clients to use either port 2525 or 52525.

You can also use this field to open more ports for other mail servers to contact your server, to deliver mail to it. For example, you may be attempting to set up a mail server on a network whose ISP blocks incoming port 25. This way, no other mail servers will be able to deliver mail to your server. There is a way around this, that people using DynDNS.org’s MailHop feature (for example) have expoited. But you need to open an alternate port that MailHop can use to contact your server (check the dyndns.org example). Set this port number in MailServe’s Alternate Port Numbers (for SMTP) field.

The Real-time Black List (RBL) field

This field allows you to list RBL (Real-Time Black Lists) sites that you want your server to check against. If you have more than one, you should separate them by commas. Such sites include bl.spamcop.net, sbl-xbl.spamhaus.org, relays.ordb.org, cbl.abuseat.org, etc… You can choose from among a lot more if you search Google.

The Virtual Domains field & Virtual Domains Alias Mappings field

Ordinarily, even if you receive mail for two domains – domainA.com and domainB.com – sales@domainA.com will use the same mailbox as sales@domainB.com.

But, using the Virtual Domains field, you can make things work a bit differently.

You need to create two separate user accounts on the server first, say, brendan and beekhim, respectively. Then make sure that the two domains, domainA.com and domainB.com, are listed in the Virtual Domains field. Then you can use the Virtual Domains Alias Mappings field to point sales@domainA.com to brendan’s mailbox and sales@domainB.com to beekhim’s mailbox, as shown below :

Note that you can also add an entry for sales for the primary domain (i.e., sales@cutedgesystems.com, above) and point it to another mailbox (i.e. user account) on the server.

This is how you manage the sales@domainB.com account using Mail.app :

The messages for sales@domainB.com will go to the mailbox of the real user, beekhim, on the server.

SMTP Authentication

This allows the mail server to be accessed remotely only by authorised users, whose name:password combinations have been registered with the server.

By default, machines on the local network need not authenticate to send mail through the server. You can force everybody to authenticate (by choosing the “Relay Mail from : Only clients who authenticate” option). This is especially important if you’ve placed your server directly on the broadband line, instead of behind a router or Airport Base Station, in which case all the other machines on your ISP’s network becomes your “local” network! The safest practise is to turn on SMTP authentication, as shown below.

If you need to turn on SMTP Authentication, you have two choices – use the built-in OS X user accounts or SASLDB.

The first method is so simple to use. It authenticates against the Mac’s built-in user account management – so you maintain just one set of passwords, using System Preferences. Turn it on and you’re done. (But the downside is that passwords are sent in the clear, unless you turn on SSL encryption, as shown below and explained in the SSL section.)

In Mail.app, under Outgoing Mail Server, click on Server Settings and set up the SMTP Server Options, as shown below. You need to make sure you enter the same User Name and Password combination that you gave to this user, using the server’s OS X System Preferences panel :

The second method, SASLDB, is considered to be more secure because passwords are never sent down the wire, only tokens. If you choose to turn on SMTP Authentication via SASLDB, you will need to provide the server with a list of username:password combinations, for each user who will be needing to send mail remotely through the server.

In Mail.app, under Outgoing Mail Server, click on Server Settings and set Authentication to “MD5 Challenge-Response”. Enter the username:password combination that was registered for this user on the server.

SSL (Secure Sockets Layer)

You can turn on or off SSL mode to encrypt the communications between client and server, over SMTP, POP, and IMAP. However, you will need to have the appropriate SSL certs in /System/Library/OpenSSL/certs before you can enable SSL.

You can create test (self-signed) certs to test the SSL connection to and from the mail server. You can always replace them with “real” certs, of the same name, in the future.

You can require SSL be set in the mail client before your server will agree to relay mail for it. Just check the Require SSL option.

If you’re testing the SSL connection, make sure you quit Mail.app and come back in again, when you switch the server from non-SSL to SSL mode. This is important, and had been the source of quite a few support calls. Mail.app seems to cache the information it keeps about a connection. If you switch modes, in mid-stream, it may get confused and you will see a connection error until you quit Mail.app and come back in.

Also, if you’re using the self-signed test certs, you will see the following dialog box thrown up by Mail.app, when you first send mail over SSL :

This is OK. It shows that the SSL mode is working. The cert used is a self-signed cert that hasn’t been verified by any of the known certification services, e.g., Verisign. The cert can still be used to enable SSL encryption between client/server communications. If you click on “Show Certificate”, it will show you the data you have set for this certificate (if you’ve updated the Country/State/Locality fields before clicking on the “Create SSL Test Certs” button. You can always replace the test certs with “real” certs of the same name. They are stored in /System//Library/OpenSSL/certs.

There is one way to get rid of this dialog box. Click on the Show Certificate button. Drag the certficate icon that you’ll see in the top left hand corner of the extended dialog to the Finder. This will create a file and you double-click on it. This will launch the Keychain Access application. Choose X509 Anchors when you’re presented with a popup menu. Then import that certificate into the Keychain.

SSL for POP3 and IMAP

MailServe for Leopard now allows you to require all mail clients to turn on SSL when accessing their POP3 or IMAP mailboxes. This is implemented through having separate buttons for turning on SSL mode for POP3 and IMAP. You can find these buttons by clicking on the Customize function in the toolbar :

You can move buttons on or off the toolbar, depending on whether you have use for their functionality. The picture below shows the case where the user only wants to implement IMAP over SSL :

This allows you to keep the MailServe interface clean and sparse, showing only the functioons that you do intend to use.

The Fetchmail Panel

Fetchmail is useful for people who have many other POP or IMAP servers that they read mail from. Fetchmail can be set up to check these other POP or IMAP servers periodically and download all that mail, consolidating them into one single mailbox on the local server.

This is a good reference site for Fetchmail (the official man page) :-
http://www.catb.org/~esr/fetchmail/fetchmail-man.html

To set up Fetchmail, go to the Fetchmail tab, click the + button to add a POP or IMAP server to fetch mail from, enter the server name, choose the protocol, e.g., POP3 or IMAP, enter your user ID and password at this server, and your user name on your local server.

Leave the Keep column as NO to fetch all messages from the server and delete them after downloading.

If you set Keep to YES, then they’re left on the server, but Fetchmail attempts to figure out which messages are new and tries to download only the new ones. If this doesn’t work well, leave Keep as NO.

Leave SSL to NO, unless your ISP requires the connection to be over SSL.

If you know that the ISP server is a POP3 server, it helps to set the protocol explicitly to POP3 rather than to leave it as AUTO.

The default polling interval is one minute and the default time-out is 45 seconds. Set to 0 for no timeout, though this is not recommended.

The Via field is optional. It can be made to contain the DNS name of the ISP POP or IMAP server. If set, this will override the Server Name field. Now why would you want to do that? You may have several accounts polling the same ISP mail server. If you enter the ISP server name into the Via field rather than the Server Name field, you can use the Server Name field merely as a label, a descriptive name for each account set-up. The Via field is optional. It’s for people whose existing Fetchmail setup already uses a Via parameter. You can choose to ignore it if you want.

Leave the Node and Aka fields empty, unless you want to set up Fetchmail to work in multi-drop mode whereby mail from one single mailbox at the ISP server is split by Fetchmail into multiple mailboxes at the local server.

Fetchmail in Multi-Drop Mode

Typically, multi-drop mode works this way. The ISP provides you with an account or node on the server, say node.isp.net. Your web server is at www.node.isp.net and you can get mail delivered to user1@node.isp.net, user2@node.isp.net, etc… When you need to read those mail, you log in to the ISP server as user name “node” and give your password. But user1 and user2’s mail are all in the same mailbox.

What you want to do is to get Fetchmail to do the logging on for you, and download all those mail, but split them into individual mailboxes that you have created on your own server for user1 and user2, etc.

Then your users will log onto your local server and read their mail (coming down from isp.net) as if these had been sent to the local server all along.

Fetchmail in multi-drop mode needs a couple of hints to help it on its way.

First, you will need to enter the node name into the Node field. In Fetchmail parlance, this would be the localdomains parameter. In our example, we will enter “node.isp.net” into the Node field, i.e., the right hand side of the @ sign in the email addresses you’ve been given by the ISP.

Then you may need to enter the other names that the ISP POP or IMAP server is known by into the Aka field. You can find this out by doing a “dig +short MX pop.isp.net” in the Terminal, where pop.isp.net is replaced by the POP or IMAP server you need Fetchmail to download the mail from. By giving more information about what likely names the ISP mail server may be known by, it can help Fetchmail figure out, from the mail headers, where each message should be delivered to on the local server.

To start Fetchmail, click on the Start Fetchmail button the top right-hand corner of the panel. Make sure that the Fetchmail status light turns green. If not, check the Fetcmail log in the Mail Log panel for clues as to what could have gone wrong. If Fetchmail starts up corectly, its button label will read Restart Fetchmail. You can Stop Fetchmail by option-clicking on it.

The Mail Log Panel

The Mail Log Panel provides access to the Postfix Log, below :

as well as the Fetchmail Log :

Both logs show the most recent entries first, and displays the currently running versions of their respective servers.

If you option-click on the Postfix Log button, you can get a list of the currently active Postfix parameters set up by MailServe.

The Mail Server and the Leopard Firewall

You should check your mail server machine to see if you have Leopard’s built-in firewall turned on. I do not yet know of a good way to set up the firewall because that function seems to have taken a couple of steps backwards with Leopard.

In any case, if you find an appropriate Firewall software for Leopard, you should open, at least, ports 25 (smtp), 110 (pop3) and 143 (imap) in the firewall. If you’ve turned on SSL, you should also make sure ports 995 (pop3 over SSL) and 993 (imap over SSL) are opened.

De-Installing MailServe

You can de-install MailServe by using the menu item, shown below, in the Help menu. It will shut down any mail-related service that is still running, and remove all files installed by MailServe.

MailServe for Leopard works from its own folder in /usr/local/cutedge/postfix, in which are stuffed the main.cf, master.cf and other files used by Postfix. The original Postfix files in /etc/postfix are left un-touched and so MailServe leaves your system in its original state after de-installation.


The Help menu also contains links to the MailServe for Leopard web page and it can be used to check that web site for new versions.

   

We build commercial-quality software at shareware prices.

MailServe/Postfix Enabler for Tiger serial numbers don’t work on Leopard. Please support our work by purchasing a serial number for MailServe for Leopard.

PayPal will accept all credit cards.

But, if you’re already a PayPal user and elect to pay by credit card, you’ll need to use an alternate email address that isn’t linked to your PayPal account.

The serial number will be displayed in the browser after payment is completed, and also sent via email.

Download:

MailServeForLeopard.zip

This is a Universal Binary.
The latest version is 3.0.4

Release Notes

Version 3.0.1 fixed a bug with the Postfix Log button in the Mail Log Panel, which had caused MailServe to hang when the size of the log file got too big.

Versions 3.0.2 & 3 – systems that were upgraded to Leopard, instead of being clean-installed, may have some mail-related launchdaemons left over from the Tiger install. MailServe for Leopard will now try to disable them if it finds them active while starting up.

Version 3.0.4 – figured out how to get the Mail Queue feature working again in MailServe for Leopard. You can find the button that displays the Mail Queue panel when you Customize the Toolbar.

     

//

Tutorial – Setting up Leopard Mail.app with Google Gmail IMAP – The Basics

Tutorial Introduction

I switched from Windows to Mac OS X Tiger on a MacBook Pro about two years ago in early 2006, and have been enjoying the experience immensely; even more so with Leopard. I purchased Entourage with Office 2004 for Mac and had been using it with my corporate Exchange server at my company eSolia, but had grown weary of the monolithic local message store, so in December 2007, I decided to give Mail.app, iCal and Address Book a go on Leopard. Looking back, it’s funny that I was so diehard Windows-only.

This tutorial describes how I set up Mail.app in OS X Leopard to handle both private and work email, using Google Mail accessed via the IMAP protocol, and sending mail via my ISP’s SMTP server to avoid the Outlook “sent on behalf of” problem.

I’ll make these naming conventions for this tutorial:

  • Your “private” email is your Google Mail account
  • Your “corporate” email is your account on a domain you or your company owns

Prerequisites

Here’s what you need to prep before you begin:

  1. Google Mail Account information
  2. Information for a forward-able “Corporate” Mail Account
  3. ISP login and SMTP information

Let’s get started.

Setup Forwarding for your Corporate Email

Setup your corporate email address to forward to your Google Mail address. In my case, I did this in Active Directory on my Exchange server, so that anything that comes in to my corporate address gets forwarded to Google Mail and does not get saved on Exchange. Other systems have other methods, like the use of hidden .forward files in the ~ home folder on a *nix server, and this is going to be slightly different for each person. The thing to watch out for is whether forwarding will take place server-side, or, you have to be logged in with your mail agent started for the forwarding to happen. Using Outlook’s client-side rules is an example of the latter.

Setup an Account in Mail.app for Gmail

Setup an Account in Mail.app. You do this in Mail.app Preferences, Accounts, clicking the + sign as per usual in (usually) nice, consistent Apple applications. When the wizard starts, you’ll have a choice to go for an automatic setup, but don’t select that option. Go for the manual setup.

There are plenty of sites, Google’s included, that explain how to set up Mail.app for basic IMAP access, so I won’t bore you too much. In the Account Information tab, you can have both your corporate and private addresses. Note I have rick dot cogley @ esolia … followed by a comma, followed by my private Gmail address, in “Email Address.” The incoming mail server should be imap.gmail.com, and the username is your Gmail account without the @gmail.com.

Avoid the Outlook “On Behalf Of” Problem – Use your ISP’s SMTP

For the outgoing SMTP server, I used my ISP @Nifty’s provided one. Drop down the server list, and choose Edit server list. Then add your SMTP server’s information. @Nifty requires us to log in (smtp-auth) to use their SMTP servers, and they require port 587 (as opposed to the more generic port 25). Set this up as specified by your provider. You might use your company’s SMTP server as well if it is convenient and accessible from both inside your company network and outside.

Why not use Google’s smtp.gmail.com? After all, if you do, everything you send out via it gets put into your sent items, which is convenient. The reason is an esoteric one, which has to do with the way Outlook or Exchange treat mail headers. If you send via smtp.gmail.com to an Outlook / Exchange user, they will see “From rick@gmail on behalf of rick@corporate” which is not very professional, is it.

Setup Advanced Settings

In the Advanced tab, enable the account, include it in checks for mail, decide how much of a mail and its attachments you want to keep for offline viewing. Set the IMAP path prefix to “[Gmail]” (without the quotes, of course) if you want a cleaner look for your folders in the main Mail.app interface. However, a warning: changing this means that Mail.app will RESYNC your entire mail store with Gmail. If you have a lot of mail stored in Gmail already, this could take a serious amount of time. I have about 1.5 GB, and it took days to sync.

Setup Mailbox Behaviors

Next use the Account’s Mailbox Behavior’s tab to set up what Gmail folder goes where, and what sync’s with what. Here’s how I set up mine, with Drafts, Junk and Trash stored in the server, Notes stored in the Inbox, and Sent mail NOT stored on the server. Later we’ll make settings that will get your sent mail into the Gmail sent mail folder automatically, so never fear.

You can also make these settings by choosing the target folder in your mail folder hierarchy, and assigning the folder using the menu Mailbox, Use This Mailbox For.

Setup Junk Mail Processing

Gmail has excellent anti-Virus and Junk mail processing already, so I chose to leave any junk mail that got through in my main mailbox. This works well because Mail.app and Gmail get “confused” when there are multiple Junk mail locations. In Junk settings, I chose to trust the ISP’s junk mail headers, and to not mark as Junk if the sender is in my Address Book.

Setup Google Mail Processing

Now you have to do a few things to make your mail go into the correct folders. First, BCC yourself on all messages in Mail.app. This is in Preferences, Composing.

Next in the Gmail interface, set up a Filter to bypass the Inbox for anything that comes from yourself (while viewing the Inbox, click Create a Filter next to the Search the Web button). I created one filter each for both my corporate and private addresses. The filter should be set to match all mails From your address(es), and the Next Step should be to bypass the Inbox and send it straight to the Archive.

Google’s IMAP implementation is different from the true standard. It seems they keep everything in one big folder per person and tag the mail so that it appears to be in certain folders in the web interface. Now, any mail that you send out of Mail.app is BCC’ed yourself, so that mail To: someone From: yourself will also be forwarded to your “private” Gmail address, and acted upon by the Gmail filters you create. The filter will fire, notice that the mail is from yourself, and automatically tag it correctly as sent mail so that it is visible in the correct place. Despite the fact that you are not storing Sent mail on the server, your local Sent Mail folder will still have a copy of the mail when it is sent from Mail.app.

Not to forget, additionally, you have to set up Gmail to use your “corporate” address. Do this in Gmail settings, Accounts tab. I added my corporate address, and verified as directed by Google.

So the Flow Goes

Someone sends mail to you@your.corporate.com, which is forwarded to your private@Gmail account. If it is a virus or spam, Gmail’s filters for those will act upon the mail. If it passes through the gauntlet, Mail.app downloads the mail, runs another Spam check and processes any rules you have set, then copies the mail into your Inbox folder. You reply to the mail and Mail.app copies your reply into your local Sent Items folder. Because you have BCC’ed yourself, the reply gets routed to you@your.corporate.com again, forwarded to Gmail, and Gmail’s filters act upon it, noticing it is From: you. The mail is automagically copied into the Gmail Sent Mail folder (tagged as Sent).

When you create an email, you choose which email you wish to send from, both of which you entered in Preferences, Accounts, “Email Address”, separated by a comma. Your outgoing SMTP server would be your ISP’s one or your corporate one depending on your setup. Your BCC address is automatically entered in based on your auto BCC setting. You click send, and Mail.app logs into your outgoing SMTP server to process the send, and the mail is processed into the right IMAP folder as appropriate.

Decision Summary

During this setup, we made the following decisions:

  • Use the IMAP protocol not POP, because IMAP allows you to access your mail from multiple IMAP clients.
  • Use your ISP’s SMTP server to resolve the Outlook “on behalf of” problem, and use a Gmail Filter to make sure your mails get put in the Sent Items folder. The Gmail filter will skip the Inbox, and archive the mail from yourself immediately.
  • BCC yourself to make sure the aforementioned filter always fires, putting sent mail in its place.
  • Setup and verify your “corporate” account in Gmail, Settings, Account, so that you can choose From: me@corporate when you compose a mail in Mail.app.

It’s a little bit complex, but it is nice to have a robust backend with great anti-virus and anti-spam measures, plus a large amount of storage space, for free. Kudos to Google for giving us such a wonderful service.

Comments

blogPostPermaLink=’http://rick.cogley.info/blog/index.php?id=4961479062255821102′; blogPostTitle=’Tutorial – Setting up Leopard Mail.app with Google Gmail IMAP – The Basics’; addthis_url = blogPostPermaLink; addthis_title = blogPostTitle; addthis_pub = ‘rick.cogley.info’; var showComments=1; var reverseCommentEntries=0; © 2008 Rick Cogley Contact Me

Buffalo Memory
4GB PC-6400 DDR2 Memory Kit (Two 2048 DDR2-800 Memory Modules)

4GB PC-6400 DDR2 Memory Kit (Two 2048 DDR2-800 Memory Modules)

SKU: 538835
Mfr Part #: A2F800-E2GX2
UPC: 747464115641
_
$299.99
_
Shipping:
Usually ships in 1-3 business days.
TechWorks memory by Buffalo Technology has been a leading memory upgrade solution for Apple computers since 1986, and was the first memory to include a lifetime warranty. Buffalo manufactures TechWorks modules to surpass Apple’s specifications and guarantees that they are 100% compatible with Apple computers. Let Buffalo exceed your expectations and be your Apple memory upgrades solution, giving you the Power to Perform(tm).


Product Specifications

Number of Modules 2
Memory Capacity 4.0GB
DDR Memory Speed 800MHz (DDR2-800)
Buffered/Unbuffered Buffered
Error Correction Code ECC
Slots Required (2) 240-pin DIMM Slots
Manufacturer Warranty Lifetime Limited Warranty

macosxhints.com – A multiple-drive Mac Pro Migration Assistant issue

I attempted to migrate her data from the initial Setup Assistant, Click here to return to the ‘A multiple-drive Mac Pro Migration Assistant issue’ hint
www.macosxhints.com/article.php?story=20070807115154337
Labeled Hints

Macworld | Inside the Mac Pro: Hard drives

Installing drives in the Mac Pro is easier than installing drives in any other If you’re considering this setup, note that a startup drive and multiple
www.macworld.com/2006/10/features/macprohd/index.php

macosxhints.com: A multiple-drive Mac Pro Migration Assistant issue

A multiple-drive Mac Pro Migration Assistant issue I attempted to migrate her data from the initial Setup Assistant, and everything went smoothly until
www.macosxhints.com/article.php?story=20070807115154337&mode=print