I'm making my first pass at getting bincimap (1.2.11final) set up on a new mail server, and I've run into a bit of a snag getting it to agree to use IMAPdir as its depot type. This is somewhat frustrating, as what I thought getting my custom checkpassword script to work would be the nastiest bit (it wasn't bad at all once I got started-- thanks, python!).
Ahem. So, I'm currently running bincimap out of inetd (this is on Solaris). With absolute pathnames removed for clarity, my inetd.conf line looks like: imap stream tcp nowait root bincimap-up bincimap-up --conf=bincimap.conf --logtype=syslog -- checkpassword bincimapd Everything seems to work; I can authenticate, and issue imap commands. The problem is when I try to interact with my Maildir; I don't like the way Maildir++ stores secondary mailboxes, and since IMAPdir directly addresses my concern, I want to use IMAPdir. Towards that end, here is the relevant section of my bincimap.conf (modified per http://www.bincimap.andreas.hanssen.name/archive/?0::1212): Mailbox { /* Valid choices are Maildir++ and IMAPdir. */ depot = "IMAPdir", /* Maildir is the only valid option. */ type = "Maildir", /* Default storage location; $HOME implied. */ path = "IMAPdir", /* create INBOX in given format if it doesn't exist. */ auto create inbox = "yes", /* list mailboxes in one string, seperated by commas */ auto subscribe mailboxes = "INBOX", /* use this umask when creating mailboxes, or when copying and appending messages. */ umask = "077" } ...though the URL above suggests I should also set 'type' to 'Maildir', that does not jive with what the docs say are valid options for this field. I get the same results with either value. I also get the same results if I set the --depot option on the command line rather than relying on the config file, which was a big surprise to me. I thought for sure that my problem was some lingering syntax error in the config file. Here's what I get (whitespace added for clarity): # telnet localhost 143 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. * OK Welcome to Binc IMAP Copyright (C) 2002-2004 Andreas Aardal Hanssen at 2005-01-13 14:20:13 PST 1 login lanclos somepassword 1 OK LOGIN completed 2 create foobar 2 NO CREATE failed: With a Maildir++ depot, you must create all mailboxes under INBOX. Try creating INBOX/foobar. 2 create INBOX/foobar 2 OK CREATE completed 3 logout * BYE Binc IMAP shutting down 3 OK LOGOUT completed So, bincimap is still under the impression that I want to use Maildir++. It also isn't getting the directory right; when I CREATE the folder INBOX/foobar, it gets created as $HOME/.foobar, not $HOME/Maildir/.foobar, or $HOME/IMAPdir/.foobar (the latter being the "correct" choice according to the config file). Changing other options in the config file does have an impact on the behavior of bincimap; for example, setting 'allow plain auth in non ssl' to 'no' prevents me from doing my debug login as shown above. In trying to debug this problem, I find myself lacking one very useful tool: some mechanism for vetting my bincimap.conf file. I've grown very fond of postfix's 'postconf' program, which tells me exactly what the runtime configuration of a new instance of the postfix daemon would look like. It would be dearly useful to have something like that for bincimap. If not something that useful, at least something like Apache httpd's -T flag that checks the syntax of the configuration file. In the bincimapd man page, the admin is cautioned to make sure that their checkpassword program does not re-set the environment, as bincimap-up hands over configuration data in the form of environment variables. Here is what the environment looks like when my checkpassword script is executed, after having setuid (etc., etc.) to the authenticated user per the checkpassword spec. I don't know how to translate these numeric values into something human-readable, so I'm hoping they make sense. Likewise, if these are supposed to be human readable, that could very well be part of my problem. 'BINCIMAP_GLOBALCONFIG_41757468656e7469636174696f6e::616c6c6f7720706c61696e206175746820696e206e6f6e2073736c': '796573' 'BINCIMAP_GLOBALCONFIG_41757468656e7469636174696f6e::617574682070656e616c7479': '34' 'BINCIMAP_GLOBALCONFIG_41757468656e7469636174696f6e::64697361626c65207374617274746c73': '6e6f' 'BINCIMAP_GLOBALCONFIG_4c6f67::656e7669726f6e6d656e74206970207661726961626c65': '54435052454d4f54454950' 'BINCIMAP_GLOBALCONFIG_4c6f67::697020656e7669726f6e6d656e74207661726961626c65': '' 'BINCIMAP_GLOBALCONFIG_4c6f67::7379736c6f6720666163696c697479': '' 'BINCIMAP_GLOBALCONFIG_4c6f67::7379736c6f6720666163696c697479206e756d626572': '3234' 'BINCIMAP_GLOBALCONFIG_4c6f67::74797065': '7379736c6f67' 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::6175746f2063726561746520696e626f78': '796573' 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::6175746f20737562736372696265206d61696c626f786573': '494e424f58' 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::6465706f74': '494d4150646972' 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::70617468': '494d4150646972', 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::74797065': '494d4150646972' 'BINCIMAP_GLOBALCONFIG_4d61696c626f78::756d61736b': '303737' 'BINCIMAP_GLOBALCONFIG_53534c::63612066696c65': '' 'BINCIMAP_GLOBALCONFIG_53534c::63612070617468': '' 'BINCIMAP_GLOBALCONFIG_53534c::636970686572206c697374': '214144483a5243342b5253413a484947483a4d454449554d3a4c4f573a4558503a2b53534c76323a2b455850' 'BINCIMAP_GLOBALCONFIG_53534c::70656d2066696c65': '2f6574632f6d61696c2f73736c2f696d6170642e70656d' 'BINCIMAP_GLOBALCONFIG_53534c::7665726966792070656572': '6e6f' 'BINCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2067726f7570': '6e6f626f6479' 'BINCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2070617468': '2f6c6f63616c2f62696e63696d61702f62696e' 'BINCIMAP_GLOBALCONFIG_5365637572697479::6a61696c2075736572': '6e6f626f6479' 'BINCIMAP_GLOBALCONFIG_5365637572697479::76657273696f6e20696e206772656574696e67': '' 'BINCIMAP_GLOBALCONFIG_53657373696f6e::617574682074696d656f7574': '3630' 'BINCIMAP_GLOBALCONFIG_53657373696f6e::69646c652074696d656f7574': '31383630' 'BINCIMAP_GLOBALCONFIG_53657373696f6e::7472616e73666572206275666665722073697a65': '31303234' 'BINCIMAP_GLOBALCONFIG_53657373696f6e::7472616e736665722074696d656f7574': '31323030' 'BINCIMAP_IP': '?' 'BINCIMAP_LOGIN': 'LOGIN+1' 'BINCIMAP_STATE': '1' 'BINCIMAP_USERID': 'lanclos' 'HOME': '/u/lanclos' 'LC_COLLATE': 'en_US.ISO8859-1' 'LC_CTYPE': 'en_US.ISO8859-1' 'LC_MESSAGES': 'C' 'LC_MONETARY': 'en_US.ISO8859-1' 'LC_NUMERIC': 'en_US.ISO8859-1' 'LC_TIME': 'en_US.ISO8859-1' 'PATH': '/usr/bin:/usr/sbin' 'SHELL': '/opt/bin/bash' 'TZ': 'US/Pacific' 'USER': 'lanclos' Any assistance is very welcome at this point. I've tried going through the man pages, the web pages, the wiki pages, the mailing list archives, and innumerable Google searches, yet enlightenment continues to elude me. --Kyle
