Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Documentation and Knowledge Base > XMail Server on Mac OSX

Posted by: Fbarnett Aug 25 2004, 12:37 AM
I would like to install xmailer server after reading all the comments about it. I am at a lost on how to do it. I am running Mac OS 10.3. Can you tell how to install it.



Posted by: hschneider Aug 25 2004, 07:10 AM
Hang on - I'll prepare a short startup guide this afternoon.

Posted by: hschneider Aug 25 2004, 01:14 PM
A 1st step guide for XMail on OSX:


- Download the source .tgz from
- Unpacking results in a folder named xmail-1.20
- Open a terminal window, cd to that folder and enter the following commands:

setenv OSTYPE Darwin
make -f Makefile.bsd

- Now follow the instructions for UNIX/LINUX systems of the file docs/Readme.txt

- To start XMail, you need to become root. For this enter

and your root password when prompted.

Further questions? Please let me know.

Posted by: Fbarnett Aug 25 2004, 05:25 PM
Thank you for your help. I still have a problem with the make file comand, the command cannot not be found. What directory would that file be in?



Posted by: hschneider Aug 25 2004, 05:31 PM
You need to install the developer tools which come on an extra CD with your system.
Or download the latest XTools from
ADC membership is free.

Posted by: Fbarnett Aug 25 2004, 08:51 PM
Thanks for you help. Now I just have to complete the installation.


Posted by: Fbarnett Aug 26 2004, 10:40 PM
new problem

from my mail client what userid password i should use to connect to xmail ? I created userids using CtrlClnt and it went ok. I can see the users created in, however using the same id and passowrd when i try to connect from my mail client it says login failed.

when i send emails to my newly created ids from other computers (or yahoo mail), they dont get rejected message, however i dont know how to read them from my mail client.

i can send messages from my mail client to outside using xmail as a outbound mail server.


Posted by: hschneider Aug 27 2004, 07:56 AM
At first, verify if XMail successfully owns its ports with

telnet server_ip 25
telnet server_ip 110

In both cases XMail's welcome message should be displayed.

Set up your client as follows:

- In- and outgoing server is your XMail server's IP.
- Username is, not only the user's name.
- Password is the user's password in cleartext.
- Make sure that you use encrypted passwords in

Any error messages on your client ?

Posted by: Fbarnett Aug 31 2004, 06:25 AM
Thank you for your reply. Is it possible for you to give an example of how to go about setting up the mail client. I am using Apple Mail. This would include the password.

Thank you


Posted by: hschneider Aug 31 2004, 09:12 AM
Let's assume your XMail machine is, your domain is and your username is fbarnett:

- Server Name:
- Username:
- Password: your_password

Under Server_Options:
- SMTP Server:
- Port: 25
- Identification: Password
- Username:
- Password: your_password

- Port: 110
- Identification: Password

Some menu points can vary, because I use the german version here.

Posted by: Fbarnett Sep 6 2004, 05:15 PM
I am trying this for the first time so bear with me. Also thanks for your patience. I have tried everything you suggested (I think); however i still get an error when trying to connect to the server xmail will not accept my password. I have a custom host with and my domain is and my ip address How do I set this up in the Mailroot, usertab etc. and in preference of the mail client. When I start my machine I do not see Xmail starting. I hope I have explained my problem clearly.

Thank you very much.


Posted by: hschneider Sep 6 2004, 10:15 PM
When I
telnet 25
it resolves to, not Port 25 is not open.

At first run XMail in debug mode with
./XMail -Md --debug

Then do the telnet checkup from above. If you cannot connect, check your OSX and router firewall settings. Port 25 and 110 need to be open to operate SMTP and POP3.
Also check, if your domain name points to the correct IP.

A system startup howto will follow tomorrow.

Posted by: hschneider Sep 7 2004, 08:49 AM
Here it comes. All required files attached!



Open a terminal session. To become root, type
# su
... and enter your root password when prompted.

Open /etc/hostconfig with an editor and set the line with MAILSERVER to

This prevents Postfix from starting automatically.

If this was set to -YES-, you need to stop Postfix first:
# postfix stop

Copy the xmail folder of this archive to

Now there should be a folder named xmail, containing 2 files:
xmail and StartupParameters.plist

Open the file xmail/xmail with an editor and adapt MAIL_ROOT and MAIL_CMD_LINE
to your needs.

Before restarting, test with
# cd /System/Library/StartupItems/xmail
# ./xmail start
# telnet 25

Now the XMail welcome message should come up. End with CTRL-C.

# ./xmail stop
# telnet 25

If you get a 'Connection refused' all things are OK.

Now restart your machine:
# shutdown -r now

... and do the telnet check again to test if XMail is up
and running. Have fun!


This installation lets Postfix live beside XMail, which is the most simple way.
Otherwise you'd need to delete the StartupItems/postfix folder and to add some hostconfig variable checks to the xmail script like those inside the postfix script.

Posted by: hschneider Sep 7 2004, 12:01 PM
How to configure your OSX builtin firewall:


- Open your system configuration panel
- Click "Sharing"
- Click "Firewall"
- If there is already a service running on port 25 or 110, disable it.
- Add a new service
- Choose service type "Other"
- In the "Port-No." field enter: 25,110,6017
  This enables SMTP, POP3 and XMAIL CTRL
- In the  "Description" field enter: XMail Mail Services

Some names can vary, because I run the german edition here.

I appreciate your feedback very much. This will help to build up a universal installation guide for XMail on OSX. Many future users will be thankful for that!

Posted by: Fbarnett Sep 7 2004, 02:36 PM
I am so sorry to say that I did previously delete the Postfix startup file.


Posted by: hschneider Sep 7 2004, 02:55 PM
No prob ....



. /etc/rc.common

StartService ()
   if [ "${MAILSERVER:=-NO-}" = "-YES-" ]; then
           ConsoleMessage "Starting mail services"
           /usr/sbin/postfix start
   elif [ "${MAILSERVER:=-NO-}" = "-AUTOMATIC-" ]; then

StopService ()
       ConsoleMessage "Stopping Postfix mail services"
       /usr/sbin/postfix stop
       killall -1 postfix-watch 2> /dev/null

RestartService ()
   if [ "${MAILSERVER:=-NO-}" = "-YES-" ]; then
       ConsoleMessage "Reloading Postfix configuration"
       /usr/sbin/postfix reload

RunService "$1"

Just add those

if [ "${MAILSERVER:= ....

constructs to startservice() and restartservice() and you are ready to go. The Postfix folder must not be restored then.

Posted by: Fbarnett Sep 7 2004, 07:33 PM
Thank you so much for your time and effort. Xmail is working, but It is still rejecting the password. The following is what I have done, maybe you can see the errors

[Franklyn-D-Barnetts-Computer:/var/MailRoot/domains] franklyn% telnet 25

Connected to
Escape character is '^]'.
220 <> [XMail 1.20 ESMTP Server] service ready; Tue, 7 Sep 2004 12:42:18 -0500
Connection closed by foreign host.

[Franklyn-D-Barnetts-Computer:/var/MailRoot/bin] root# ./CtrlClnt -s -u franklyn -p xxxxx useradd info password U

Another thing where is the mail located when you receive it?

Thanks again.


Posted by: hschneider Sep 7 2004, 07:57 PM
Which password is not accepted ?

I can't see any mistake in your input. Just make sure that your user's password is not encrypted when you pass it via command line.

Doing a
# cat MailRoot/
... should list the new user's record with the encoded password.

Received mails are stored in MailRoot/domains/domainname/username/MailDir/new

Posted by: Fbarnett Sep 7 2004, 08:08 PM
When I try to connet from my Mac Mail Client XMail Server rejects the password.

T set the account up on the mail client Server. User name Password



Posted by: hschneider Sep 7 2004, 09:37 PM
I cannot
telnet 25
.. can you ?

Check your firewall settings. Also on your router.

Posted by: Fbarnett Sep 7 2004, 10:11 PM
I am able to telent at port 25. I also would like to know should I connect the Mail client through the root directory as the system Administer?



Posted by: hschneider Sep 8 2004, 07:31 AM
No. Did you also open port 25 and 110 on your client machine ?

Posted by: Fbarnett Sep 8 2004, 01:55 PM
I have seem to solve the paswoed problem. Now I get the following error message

The original message was received at Tue, 7 Sep 2004 21:39:08 -0700 (PDT)
from smtpin07-en2 []

----- Transcript of session follows -----
<>... Deferred: Connection refused by
Warning: message still undelivered after 4 hours
Will keep trying until message is 4 days old
Reporting-MTA: dns;
Arrival-Date: Tue, 7 Sep 2004 21:39:08 -0700 (PDT)

Final-Recipient: RFC822;
Action: delayed
Status: 4.4.1
Remote-MTA: DNS;
Last-Attempt-Date: Wed, 8 Sep 2004 04:55:09 -0700 (PDT)
Will-Retry-Until: Sat, 11 Sep 2004 21:39:08 -0700 (PDT)

From: "Franklyn D. Barnett" <>
Date: September 7, 2004 11:39:01 PM CDT
To: "Franklyn D. Barnett" <>
Subject: Test


I can send and receive within my domain.



Posted by: hschneider Sep 8 2004, 02:36 PM
The problem is, that you are not reachable from the internet.
Telnetting to 25
.. results in 'no connection' from my location. It might be reachable from your LAN, but not from the internet.

So please test your XMail machine's firewall and also your router's firewall if port 25 is open.

Posted by: Fbarnett Sep 8 2004, 04:00 PM
Could you try telenet port 25?



Posted by: hschneider Sep 8 2004, 05:32 PM
Port 25 is still not open. Try yourself:

BTW: The IP you use is in a private address range. This will cause trouble later on, when you want to receive mails from others.

Posted by: Fbarnett Sep 8 2004, 05:50 PM
Is there a way to make my IP address public?



Posted by: hschneider Sep 8 2004, 05:56 PM
No, obtain an address of another address range or use a router with NAT enabled. See for details.

Posted by: Fbarnett Sep 9 2004, 12:50 AM
I do not know what I did. I try so many things but it seem like port 25 is now open. I try it from the link you sent me.

Thank you so very much for all your help. I am a total novice with using Unix Just tried it because I am a Mac user.

Again many thanks.


Powered by Invision Power Board (
© Invision Power Services (