The Artima Developer Community
Sponsored Link

Python Buzz Forum
XMail No Root

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Ng Pheng Siong

Posts: 410
Nickname: ngps
Registered: Apr, 2004

Ng Pheng Siong is just another guy with a website.
XMail No Root Posted: Oct 7, 2004 8:58 AM
Reply to this message Reply

This post originated from an RSS feed registered with Python Buzz by Ng Pheng Siong.
Original Post: XMail No Root
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)

Advertisement

As mentioned, XMail runs as root. The following steps make XMail run as a non-root uid/gid on a Unix-like host.

» Create group 'xmail' and user 'xmail'.

» Change the permissions of /var/MailRoot:

# chown root:xmail /var/MailRoot
# chmod 750 /var/MailRoot

» Change ownership of the following files and directories in /var/MailRoot to 'xmail:xmail'; for directories, the ownership changes apply recursively:

dnscache/
domains/
logs/
message.id
pop3locks/
spool/
tabindex/

» The file 'mailusers.tab' contains "encrypted" passwords; it must be readable by uid/gid 'xmail' although it can be owned by root, e.g.,

-rw-r-----   1 root   xmail     1118 Oct  5 08:17 mailusers.tab

» Since XMail no longer runs as root, it is unable to bind to ports 25 (smtp), 79 (finger) and 110 (pop3). The command line options for these ports are "-Sp", "-Pp" and "-Fp", respectively. XMail comes with a sample startup script: modify the line XMAIL_CMD_LINE in this file to incorporate the above command line options, e.g.:

XMAIL_CMD_LINE="-Sp 50025 -Pp 50110 -Fp 50079"

Because the script is run by root, another modification further down that file is needed to add the requisite "su - xmail -c ..." command to start XMail as the uid 'xmail'.

» The final step is to add firewall rules to redirect traffic hitting the standard ports to the non-privileged ports that XMail is running on.

Read: XMail No Root

Topic: On voting Previous Topic   Next Topic Topic: ZServerSSL for Zope 3 Source

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use