(865) 584-3355

Apple Certified Macintosh Experts
Serving East Tennessee since 1994
 

Server Configuration

OSX Tiger Server is great, but has its issues. Here are some tips to overcome common problems.

Webmail FROM Address Changed to Web Site URL

When a user logs into the webmail service with their AD user account and sends a message, the address when it arrives has been modified to the URL, for example, if i had a username like This email address is being protected from spambots. You need JavaScript enabled to view it. it would become This email address is being protected from spambots. You need JavaScript enabled to view it.

if all webmail is from the same domain name, then set the domain manually by running:
sudo /etc/squirrelmail/config/conf.pl 
Option 2, Option 1
Change domain to your domain

This tip is from an Apple forum thread

 

Postfix Spam Filtering on OSX.4 Tiger Server

The PostFix mail server, part of OSX.4 Tiger Server, is a wonderfully flexible and configurable mail transfer agent. This tutorial fills in the gaps of many online tutorials and provides a recipe to harden OSX server from spam using a combination of greylisting,blackholes, backscatter filtering, checking the sending mail server, recipient and email content. This supplements the anti-virus and spam checks already included in OSX Server to significantly reduce spam received and load on the mail server.

See our tutorial here

 

How to Set a Vacation Message

You can setup a rule in Mail.app, but this can easily end up in "notification wars", where you and someone else on vacation flood each other with hundreds of responses. A better method is to use the capabilities of OSX Server.

From an excellent post by Ian Butler:

Installing Web-Based Sieve scripting on OS X Server 10.4.3 using avelsieve
===========================================

Prerequisites
=========
I have used the following setup on a fresh install of Mac OS X 10.4 Server, with the 10.4.3 Combo Update installed. I then added a user to the local netinfo domain as a test case, and along with the default admin account have enabled mail for these users - Note: Open Directory is not currently running.

Web, DNS, SMTP and IMAP/POP are all running, and SquirrelMail has been enabled in Web Services. SquirrelMail has been tested for the two users mentioned above, and both accounts log in correctly, displaying empty mail boxes.

To enable sieve scripts via Squirrelmail
=========================

1) If it doesn't already exist, create the following directory as root or using sudo from the Terminal;

% sudo mkdir -p /usr/sieve
% sudo chown cyrusimap /usr/sieve
% sudo chgrp wheel /usr/sieve

Directory permissions should then look like;

drwxr-xr-x 3 cyrusimap wheel 102 Nov 3 21:31 sieve

1.5) If it already exists, be sure it has the correct ownership and permissions for all folders

% sudo chown -R cyrusimap /usr/sieve
% sudo chgrp -R wheel /usr/sieve

2) Add (or un-comment if it exists) the following line to the /etc/services file. To do this you either need to su to root, or use sudo to edit the file using the Terminal.

sieve 2000/tcp # Sieve mail filtering

3) Stop the mail services from Server Admin.

4) On the Mail -> Settings -> Advanced tab, ensure you have IMAP set to allow 'PLAIN' as well as 'Clear' Authentication.

5) Start the mail services from Server Admin.

6) Run the following command using the Terminal, as any user;
% telnet localhost 2000

You should see the following output;

Trying ::1...
Connected to localhost.
Escape character is '^]'.
"IMPLEMENTATION" "Cyrus timsieved v2.2.12-OS X 10.4.0"
"SASL" "PLAIN"
"SIEVE" "fileinto reject envelope vacation imapflags notify subaddress relational comparator-i;ascii-numeric regex"
"STARTTLS"
OK

7)If you see this, your timsieved is working correctly. Use the escape character to leave the daemon, and quit telnet.

8) Download the most recent avelsieve distribution from the web page athttp://email.uoa.gr/projects/squirrelmail/avelsieve_download.php. I used the more recent Dev Branch version: avelsieve-1.9.3.tar.gz, and haven't tested the earlier 1.0.1 version. If anyone has this working also, let me know.

9) 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 (this is different from the V1.0.1 setup I believe). I didn't need to edit anything in the config.

10) Run the SquirrelMail config perl script, using sudo like so;
% 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.

11) 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'.

12) 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

 

 

How To View A Message From a Log File or Queue

Get the Postfix queue ID for the message, ie. 159A347C89C

  • In Server Admin, the Mail Queue list displays the Postfix queue ID for all messages not yet delivered.
  • If you see a suspicious mail message in /var/log/mail.log, you can get its Postfix queue id by searching the mail.log for its SMTP ID, ie: postfix/smtp[25897].
    • grep 25897 /var/log/mail.log

Find the deferred message where it is stored

  • cd /var/spool/postfix/
  • Find where in the queue directory hierarchy this message
    lives: find . -name 159A347C89C

View the message

  • The messages are stored in a format not easily readable. To
    make them readable, use the postcat command, e.g. postcat deferred/E/
    E9B8F4F0E7C

Reference: Mac OSX Things

Issues Upgrading to PHP5

PHP5 is an excellent object-oriented programming environment, much more advanced than PHP4 which ships with OSX Server.

You can upgrade to PHP 5.x using Marc Liyanage's binaries.

If you use PHP5, you may have a problem with SquirrelMail.

You can upgrade SM following these instructions.