Printable Version of Topic
Click here to view this topic in its original format
XMail Forum > Documentation and Knowledge Base > Xmail With Dovecot Problem

Posted by: cfmunster May 12 2008, 01:55 AM
I am working off of NomadCF's HOWTO for and I have a problem. I can't get XMail to run as the dovecot user. The syslog gets this error:

Socket bind error

and XMail shuts down when trying this command:

su - dovecot -c "/var/MailRoot/bin/XMail -Mr 24 -Pl -Ph -Sl -Ql -Yi 30 -Yl -Fl -Cl -Ll -PX 0 -Sp 50025 -Pp 50110 -Fp 50079 -Ms /var/MailRoot"

This command runs fine for the root user, so I assume the issue is with the dovecot user permissions. The process starts, I can see a bunch of processes in htop, but then they die and I get the socket bind error.

I added the iptables rules and gave the dovecot user ownership of the /var/MailRoot and subdirs, but no love. Any ideas are appreciated.

Posted by: hschneider May 13 2008, 08:14 AM
Sure that your OS allows such high port numbers?
Try with 2025 and 2079 instead.

Posted by: cfmunster May 13 2008, 08:53 AM
thanks for the thought, harald, but i got the same result in the 2000 range. it works fine with root, just not with user dovecot.

i'm at a tech summit this week, i am going to poke around and find a linux guru and see if i can't get some help. i'll post the answer if i get one.

Posted by: cfmunster May 27 2008, 03:39 AM
OK, I have sorted out the initial issue, which was that the xmail/dovecot instructions were a little old and the version of xmail then did not have pop3s or smtps. I have fixed that problem with a new command, including -X- -B-, to disable pop3s and smtps for testing:

su - dovecot -c "/var/MailRoot/bin/XMail -X- -B- -Mr 24 -Pl -Ph -Sl -Ql -Yi 30 -Yl -Fl -Cl -Ll -PX 0 -Sp 50025 -Pp 50110 -Fp 50079 -Ms /var/MailRoot"

XMail now runs as the dovecot user, but the pop3 service does not run successfully. if I telnet to port 110, I get a server busy error.

Separately, I am getting a PAM auth error from Dovecot, so I may either use the original auth idea from NomadCF or roll my own pam auth against XMail CtrlClnt.

Any thoughts on the best approach are appreciated.


Doh! Guess I should set the POP3 thread count above 0. Mail now works, next I am on to integrating Dovecot authentication.

Posted by: cfmunster May 27 2008, 04:43 AM
Got it! The trick with Dovecot is to set login_user in dovecot.conf to its own user that isn't used anywhere else. By the instructions, I was interpreting that to mean setting login_user as user dovecot, but the system will not let the same user that is running the login process actually log in, so it fails. I created a user/group just for the dovecot login process and set it in login_user, e.g. login_user = <user> in dovecot.conf. Now everything works - Dovecot with Xmail -based authentication.

Posted by: hschneider May 27 2008, 06:42 AM
Thanks for the feedback here !

Powered by Invision Power Board (
© Invision Power Services (