Hi all, parsing the mailing list archive, it seems that the lmtp-server will not be developed soon, so I'm looking for someone that could help me in writing one, even if not the best one. That's why: I've just started to study dovecot, as I was recruited, just about forced, to help The System Manager of our University in the global e-mail migration - more than 37'000 users, 440 mailing lists, everything synchronized with administrative databases and so on - from open-vms (yes... you have not sight problems: OpenVMS ... please don't blame us). In particular, we have (we'd like so much) to directly deliver from a front-end load-balanced anti-spam&virus all "good" messages into maildirs, updating at the same time the indexes for dovecot. Our idea is to write an lmtp, possibly not from scratch; we have already a threaded server, recently born as a raw smtp server to test the antivirus and antispam system under heavy load (before to start the migration), that can be converted to lmtp protocol, but we lack of information on the dovecot API for delivering in a "dovecot-way". As often occurs, we have not months to get it done, therefore _any_ kind of suggestion will be very much appreciated. Thank you all for the help, and patience! -- Leonardo Lanzi Department of Physics - University of Florence - Italy -- PS - Examples of help: 1. "The code is self-explaining, but obviously you're too old to learn: accept to be in the mist, and switch to cyrus" 2. "the following n-functions ... of deliver can accept your data from memory and do all the job" 3. "I've already done everything, download it at the following url..." 3a. "I've already done everything, but you must send me, _before_, your smtp stressing server, or all your tests on latency of irq handlers with 2.6 kernel, or at least one 18-year-old scottish-malt-whisky bottle!"
> migration), that can be converted to lmtp protocol, but we lack of > information on the dovecot API for delivering in a "dovecot-way".IMO.. use the dovecot lda. Eat the performance hit of calling it. Let dovecot-lda track all the API changes to indexes and such. Throwing an extra machine at the problem won't cost much compared to the headache of tracking long-term changes from dovecot.
On Wed, 2006-11-29 at 18:59 +0100, Leonardo Lanzi wrote:> parsing the mailing list archive, it seems that the lmtp-server will not > be developed soon, so I'm looking for someone that could help me in > writing one, even if not the best one. That's why:Well.. Dovecot's deliver is what you should be looking to do this. Unfortunately its code is quite kludgy. For Dovecot v2.0 I'm doing larger changes which makes it much cleaner, but for now it's ugly.. Settings are read from environment variables. So in deliver there's now code which parses dovecot.conf itself and puts pretty much everything in it into environment variables. You'll need to do this or just set the environment variables manually somehow. Do you need to parse the message in any way? If not and you just want to save it, then it's easier. You can use the mailbox_save_*() functions in src/lib-storage/mail-storage.h to do it. Deliver however wants to use the headers of the mails so it create an in-memory mbox formatted mailbox of the incoming message, which is rather ugly. There's also src/plugins/convert/ which contains convert-tool binary. Its code is simpler than deliver's, and it might be easier to understand. For seeing how mailbox_save_*() functions work, you can check how mailbox_copy() is implemented in src/lib-storage/mail-copy.c. One reason why I don't really like implementing LMTP is because it doesn't work well with multiple UIDs. You've only 3 choices: 1) Run everything under a single UID 2) Run LMTP delivery code as root which is temporarily setuid to the user (security hole gives root access) 3) Fork a new process to handle each delivery (couldn't you just use deliver binary then?) -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20061129/d7596bcf/attachment.bin>