The Artima Developer Community
Sponsored Link

Python Buzz Forum
SqWebMail and XMail

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.
SqWebMail and XMail Posted: Nov 27, 2004 8:53 AM
Reply to this message Reply

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.
Latest Python Buzz Posts
Latest Python Buzz Posts by Ng Pheng Siong
Latest Posts From (render-blog Ng Pheng Siong)

Advertisement

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:

export MAIL_ROOT=/pkg/xmail
exec /pkg/xmail/bin/sendmail -t -f "$1"

Read: SqWebMail and XMail

Topic: Splice Previous Topic   Next Topic Topic: Dynamic Superclassing in Python

Sponsored Links



Google
  Web Artima.com   

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