|
I'm working on a new, pre-installed distribution of Linux, designed as
a Windows server on steroids for small business workgroups. We've
selected Postfix and bincIMAP as the mail system and I now have both
running (after a couple of days headaches). The biggest problem I had was getting the IMAP server to properly select the mail depository and, since I think this may be a bug rather than my error, I'm posting the information for any of you to find my error. After all, nobody is as blind as one who cannot see! I'm using an IMAPdir structure, with the following hierarchy: /grp/user/.mailbox INBOX Drafts Sent Templates Trash All of these are standard Maildir structures, with cur, new and tmp sub-directories. The entire structure is copied into the user's home directories from /etc.skel and all permissions are set appropriately. Postfix is set to deliver to .mailbox/INBOX and never had a problem doing this successfully. Because our system has some new security twists, and because we treat users and groups as semantically equivalent, I had to write my own replacement for the CHECKPASSWORD stub but that was no big deal. In the XINETD script below, you'll see this as "imapuser" and note that it is not followed by "bincimapd" since this is exec'd directly from my password stub. When running the basic tests, I had no problem logging in (via SSL) or creating, renaming and deleting additional folders. However the SELECT failed, and I noticed that the list of folders did not include the extra ones I had copied from /etc/skel. After investigation, I found the IMAP server had created a new ".mailbox" in the root directory of the system, complete with a new INBOX. Apparently, bincimapd had ignored the HOME= value I had passed it in the environment (together with USER, SHELL and the values passed in from the bincimap-up stub). I suspect this may be because the ".mailbox" path begins with a dot (which I need in order to hide the mail depository from overly curious Windows users). I have worked around the problem, temporarily, by passing the absolute path of the depository as an extra argument to bincimapd. However, from my understanding of the documentation, this should not work. And, if the problem does get fixed in the future, I'll have to change my password stub again. Just in case the error is mine, and I have done something really stupid things in my time, I am including the config files below. Thanx for any help you can give, I. ==================================================================== xinetd.d script: # Internet Message Access Protocol (IMAP).
service imaps
{
disable = no
socket_type = stream
wait = no
user = root
group = root
instances = 250
log_type = SYSLOG daemon info
server = /sbin/bincimap-up
server_args = -s -c /etc/imap/imap.conf -- /sbin/imapuser
}
/etc/imap/imap.conf: //----------------------------------------------------------------------
Authentication {
allow plain auth in non ssl = "no",
/* allow login or
* authenticate
* when not in
* SSL/TLS mode
*/
auth penalty = 3, /* on auth failure,
* server sleeps so
* many seconds
* before allowing
* client to
* authenticate
* again.
*/
disable starttls = "no"
}
//----------------------------------------------------------------------
Security {
jail path = "/bin",
jail user = "nobody",
jail group = "nobody"
}
//----------------------------------------------------------------------
Log {
type = "syslog", /* supports
* multilog or
* syslog or
* stderr (for testing).
*/
syslog facility = LOG_DAEMON,
environment ip variable = "REMOTE_HOST"
}
//----------------------------------------------------------------------
Mailbox {
depot = "IMAPdir", /* Don't use Maildir++ style
* depot.
*/
type = "Maildir", /* only Maildir
* supported
*/
path = ".mailbox", /* default path */
auto create inbox = "yes", /* create INBOX in
* given format if
* it doesn't
* exist.
*/
auto subscribe mailboxes = "INBOX,Drafts,Sent,Templates,Trash",
/* list mailboxes
* in one string,
* separated by
* commas
*/
umask = "007" /* use this umask
* when creating
* mailboxes, or
* when copying and
* appending
* messages.
*/
}
//----------------------------------------------------------------------
Session {
idle timeout = 1800, /* idle timeout in
* seconds
*/
auth timeout = 60, /* timeout before
* auth in
* seconds
*/
transfer timeout = 1200, /* timeout per
* transferred com
* unit (I/O)
*/
transfer buffer size = 1024 /* number of bytes
* to buffer before
* passing on to
* client.
*/
}
//----------------------------------------------------------------------
SSL {
pem file = "/etc/local/.keychain/imapcert.pem",
/* private key and
* certificate
* chain PEM file
* name
*/
ca file = "", /* file to use as
* certificate
* authority
*/
ca path = "", /* path to search
* for more certificate
* authorities
*/
cipher list = "!ADH:RC4+RSA:HIGH:MEDIUM:LOW:EXP:+SSLv2:+EXP",
verify peer = "no"
}
//----------------------------------------------------------------------
--
|
- Re: [binc] Problem with SELECTing INBOX. Ivan M.
- Re: [binc] Problem with SELECTing INBOX. Peter Stuge
