This post originated from an RSS feed registered with Python Buzz
by Ng Pheng Siong.
Original Post: SqWebMail and XMail
Feed Title: (render-blog Ng Pheng Siong)
Feed URL: http://sandbox.rulemaker.net/ngps/rdf10_xml
Feed Description: Just another this here thing blog.
Here are the salient points in integrating SqWebMail and XMail:
» In my case, XMail
runs as the uid/gid pair xmail:xmail. This means its maildirs
are owned by xmail, which implies that SqWebMail must run as
xmail, too, because SqWebMail is going to manipulate XMail's
maildirs directly.
» A configure option is cacheowner. Set it to
xmail.
» The CGI program sqwebmail starts off as root and changes its
uid subsequently. The uid it changes to is the one specified for the
account that is logging in to SqWebMail. This uid must be the xmail
uid, for every account in userdb, because, I repeat, SqWebMail is
going to manipulate XMail's maildirs directly, all of which are owned by
xmail.
» userdb supports all the fields found in a typical /etc/passwd
file and then some. At least the following are necessary for
sqwebmail:
uid - This must be xmail's uid as found in /etc/passwd.
gid - This should be the system gid xmail.
home - I set this to the account's directory within XMail's
filesystem layout.
mail - This points to the account's Maildir directory within
XMail.
systempw - This contains the account's password. userdb uses the
"$1$..." salted password hashing convention, a great improvement over
XMail's password system.
» SqWebMail uses a templated HTML system which is amenable to
skinning: the HTML files and associated images are kept in the filesystem,
separate from each other and the sqwebmail binary. configure
has an option enable-imagedir to specify, duh, the image directory.
This didn't work for me and I took the easy way out of copying all the
images into the directory containing the HTML files.
» I didn't take userdb's claim of being a complete
/etc/password replacement at face value at first, and fooled around with
funny numbers as the uids/gids of the accounts contained therein. (Or it
may have been the username for the cacheowner option to
configure.) I was rewarded with this baffling error message upon
hitting SqWebMail's "Login" button: "Internal error (module sqconfig.c,
line 77)".
» SqWebMail installs a shell script sendit.sh which invokes
sendmail to, well, send mail. This must be modified to use XMail's
sendmail clone: