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.

Thanks.

FBarnett

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:

QUOTE

- Download the source .tgz from http://xmailserver.org
- 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

su
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?

Thanks.

FBarnett.

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 http://developer.apple.com/tools/download/
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.

Franklyn

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 mailuser.tab, 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.

thanks.

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:
QUOTE

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

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

Franklyn

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

Mail/settings/Acounts/Account_Information:
- Server Name: 192.168.0.1
- Username: fbarnett@local.net
- Password: your_password

Under Server_Options:
- SMTP Server: 192.168.0.1
- Port: 25
- Identification: Password
- Username: fbarnett@local.net
- Password: your_password

Mail/settings/Acounts/Extras:
- 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 dyndns.org and my domain is fdbarnett.com and my ip address 10.0.0.3. 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.

Franklyn.

Posted by: hschneider Sep 6 2004, 10:15 PM
When I
telnet fbarnett.com 25
it resolves to 10.0.1.3, not 10.0.0.3. 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!

QUOTE

QUICK INSTALL
-------------

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
MAILSERVER=-NO-

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
/System/Library/StartupItems

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 127.0.0.1 25

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

# ./xmail stop
# telnet 127.0.0.1 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!

--Harald



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:

QUOTE

- 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.

Franklyn.

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

CODE

#!/bin/sh

. /etc/rc.common

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

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
   else
       StopService
   fi
}

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 fdbarnett.com 25

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

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

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

Thanks again.

Franklyn.


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/mailusers.tab
... 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

Thanks.

Franklyn.

Posted by: hschneider Sep 7 2004, 09:37 PM
I cannot
telnet fdbarnett.com 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?

Thanks.

Franklyn

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
**********************************************
** THIS IS A WARNING MESSAGE ONLY **
** YOU DO NOT NEED TO RESEND YOUR MESSAGE **
**********************************************

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

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

Final-Recipient: RFC822; franklyn@fdbarnett.com
Action: delayed
Status: 4.4.1
Remote-MTA: DNS; fdbarnett.com
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" <fbarnett@mac.com>
Date: September 7, 2004 11:39:01 PM CDT
To: "Franklyn D. Barnett" <franklyn@fdbarnett.com>
Subject: Test


Test2

I can send and receive within my domain.

Thanks

Franklyn.


Posted by: hschneider Sep 8 2004, 02:36 PM
The problem is, that you are not reachable from the internet.
Telnetting to
fdbarnett.com 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?

Thanks

Franklyn

Posted by: hschneider Sep 8 2004, 05:32 PM
Port 25 is still not open. Try yourself:
http://dnstools.com/?checkp=on&portNum=25&target=fdbarnett.com&submit=Get+Info

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?

Thanks.

Franklyn

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 http://www.jpsdomain.org/networking/nat.html 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.

Franklyn.

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)