[SlugBug] Adding a new mailbox by SSH
James Wallbank
james at lowtech.org
Wed Sep 6 16:42:21 BST 2006
Hello Bruno,
Thanks for this advice:
> This is an older courier setup. The authdaemon is configured in the
> authdaemonrc file, the pop3 authentication methods will be configured in
> the pop3d file: look for 'AUTHMODULELIST' or something like that - The
> first one in the list that works is the authentication method that is
used.
A comment in pop3d refers me to the authentication in the authdaemonrc
My heart sank when, in authdaemonrc, I read:
authmodulelist="authcustom authcram authuserdb authldap authpgsql
authmysql auth pam"
Does that imply a "custom" authentication method? Any thoughts on how to
track that down?
Meanwhile, you are quite right that this configuration of postfix seems
to use maildrop - in the file /etc/postfix/transport there's a line for
each virtual domain, with the word maildrop: specified at the end. eg:
domain,com maildrop:
I did a bit more poking around, and I'm *sure* that each mail user is
NOT a real user mapped in /etc/passwd.
Now I think I'm getting somewhere... but it's somewhere bad!
I found the following:
/etc/userdb/
Inside this directory is a plain text file for each virtual domain, with
pipe-separated fields (one per line for clarity).
user at domain.com uid=<UID of owner of virtual domain>| \
gid=<GID of owner of virtual domain>| \
home=</path/to/vdomainhome/system/virtualusername>| \
mail=</path/to/vdomainhome/system/virtualusername/Maildir>| \
gecos=<User's Real Name>| \
systempw=<md5hash of virtual user's mail password>
Also the following:
/etc/userdb.dat <-- GNU dbm 1.x or ndbm database, little endian
/etc/userdb.lock <-- An empty file
/etc/userdbshadow.dat <-- GNU dbm 1.x or ndbm database, little endian
Clearly the two data files are cooked from the data inside /etc/userdb -
with a custom mechanism :-(.
I'm beginning to suspect that the real answer here is starting to be
"you can't add new mail users without using the control panel" which is
annoying. What do you think?
Thanks,
James
=====
Bruno Postle wrote:
> On Wed 06-Sep-2006 at 15:38 +0100, James Wallbank wrote:
>
>>
>> Real mailboxes on the system seem to be listed in the "virtual" file,
>> set to redirect to themselves... does that make sense? Typical lines
>> might read:
>>
>> user at domain.com user at domain.com
>> trash at domain.com trash at domain.com
>> @domain.com trash at domain.com
>> elsewhere at domain.com webmailbox at gmail.com
>
>
> These are mapping one (or more) email address to another. There must be
> some other configuration that delivers user at domain.com to a mailbox, it
> could be:
>
> 'user' is an actual user on the system, their mailbox isn't virtual.
>
> There is a system alias from 'user' to a real user, look in the
> 'aliases' file.
>
> Postfix has a vmailbox configured somewhere for 'user at domain.com'
>
> Some other tool is used to distribute mail to virtual mailboxes other
> than the postfix virtual delivery agent. Something like 'maildrop'
> would be configured in the main.cf file.
>
>> The server has no /etc/authlib, but /usr/lib/courier-imap/etc/ looks
>> promising. Can I find out the authentication method from these contents?
>>
>> authdaemonrc imapd.dist pop3d.cnf quotawarnmsg.example
>> authdaemonrc.dist imapd-ssl pop3d.dist shared
>> imapd imapd-ssl.dist pop3d-ssl shared.tmp
>> imapd.cnf pop3d pop3d-ssl.dist
>
>
> This is an older courier setup. The authdaemon is configured in the
> authdaemonrc file, the pop3 authentication methods will be configured in
> the pop3d file: look for 'AUTHMODULELIST' or something like that - The
> first one in the list that works is the authentication method that is used.
>
> Hope this helps.
>
More information about the SlugBug
mailing list