Bert Slagter wrote:
>
> Paul J Stevens wrote:
>> Inserting messages into the database directly (without respecting the
>> cache tables) is a /bad/ idea. I've said so before many times. It will
>> be near impossible in 2.4 with the single-instance storage paradigm.
>>
>> The only supported injection pathways are: dbmail-smtp (aka
>> dbmail-deliver in 2.4), dbmail-lmtpd, and IMAP APPEND.
>>
>> In your case: please use IMAP APPEND or dbmail-smtp.
>>
> Hi Paul,
>
> Thanks for your extensive reply. It clears things up and confirms some
> expectations :).
>
> My conclusion is that we'll have to switch to IMAP APPEND as soon as
> possible. One big issue for us now is that we don't know a user's
> password to login to imap, only the user_idnr from dbmail_users and the
> md5 password hash. Do you have any ideas on that, or do we have to store
> the plain text passwords ourself? User authentication to webmail is now
> handled separately by our own system.
If you want to use IMAP APPEND without knowing the user's password you'll have
to use the acl tables to grant access to those mailboxes to a special user.
Major maintenance hassle. It would be nicer if dbmail supported a special admin
account with full access to all users and all mailboxes via the #Users
namespace. Patches are most welcome :-)
In your case: Why not use dbmail-smtp? Perhaps through a 'super' wrapper, or
something similar.
Actually dbmail really needs a xmlrpc interface for stuff like this ... Perhaps
that would be a nice project after I stabilize 2.4. It would make life a *lot*
easier for webapps.
#!/usr/bin/python
import xmlrpclib
username = "admin"
password = "admin"
sock_c = xmlrpclib.ServerProxy("http://dbmail:9143/xmlrpc/common")
uid = sock_c.login(user=username, password=password)
sock = xmlrpclib.ServerProxy("http://dbmail:9143/xmlrpc/object")
# get all users:
allusers = sock.execute(uid,password,"users","list")
# mailboxes for a user
user_id = sock.execute(uid, password, "users", "find",
{'userid':'someusername'})
mailboxes = sock.execute(uid, password, "mailboxes", "find",
{'owner_idnr': user_id})
etc, etc....
--
________________________________________________________________
Paul Stevens paul at nfg.nl
NET FACILITIES GROUP GPG/PGP: 1024D/11F8CD31
The Netherlands________________________________http://www.nfg.nl
_______________________________________________
DBmail mailing list
[email protected]
https://mailman.fastxs.nl/mailman/listinfo/dbmail