You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-user@james.apache.org by Mag Gam <ma...@myfastmail.com> on 2004/09/18 08:49:12 UTC

Running James as Other User

Is it possible to run James as another user instead of root? I know in
the documentation it says we can't run it since port 25 is below 1024. I
want to create a user called "mail" and have it run it.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org


RE: Running James as Other User

Posted by Intelekia <in...@intelekia.com>.
Hi there,

Somebody (don't remember who) published a solution some time ago in the
mailing list. I haven't tested myself, hope it helps.

-------------------------------

Normally ports < 1024 can only be bound by processes running as root.
One solution for running services as non-root users and having them still
operate on privileged ports is to map the externally exposed port to one
that a non-root Java service, such as James, can start-up with.
1.	Setup port mapping via iptables.
bash-2.05b# iptables -t nat -A PREROUTING -p tcp --dport 25 -i eth0 -j
REDIRECT --to-port 10025
… where 25 is the external port and 10025 is an "ephemeral" high port you
set James' SMTP to listen to.  Watch that eth0 is correct for your box.
2.	Persist this setup after reboots.
bash-2.05b# iptables-save > /etc/sysconfig/iptables
3.	Repeat for 110, or 80 and 443 for Tomcat, etc.

-----Original Message-----
From: Mag Gam [mailto:mag0007@myfastmail.com] 
Sent: sábado, 18 de septiembre de 2004 9:49
To: server-user@james.apache.org
Subject: Running James as Other User

Is it possible to run James as another user instead of root? I know in
the documentation it says we can't run it since port 25 is below 1024. I
want to create a user called "mail" and have it run it.

Thanks!

---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org




---------------------------------------------------------------------
To unsubscribe, e-mail: server-user-unsubscribe@james.apache.org
For additional commands, e-mail: server-user-help@james.apache.org