My very large patch for LMTP and Sorting has code to create mailboxes if they don't exist. It is on and only on. However, if there is a concensus on a good set of options for turning this on and off, I'll be happy to code those in!
Aaron On Sat, 28 Jun 2003, Gianni Mariani wrote: > Paul Stevens wrote: > > > Gianni Mariani wrote: > > > >> a) This one is serious because emails are dropped silently. If > >> "dbmail-smtp -m BOX" is used and BOX does not exist, then the email > >> is silently dropped on the floor. > > > > > > This IS serious. I'm also quite sure this didn't occur in earlier > > releases. IMO delivery should fallback to INBOX should -m BOX specify > > a non-existant mailbox. > > > > This is fixed in the debian packages. > > > Are the debian packages significantly different ? > > >> b) If an account exists but the mailbox does not, there should be a > >> way of creating one on demand. For example, if I create an alias like: > >> > >> test_dbmail: "| /usr/local/sbin/dbmail-smtp -m test_dbmail > >> -u gianni" > >> > >> If the mailbox "test_dbmail" in account "gianni" does not exist, > >> (before the patch it would silently fail) it will abort. I suggest > >> that another command line option "-c" for "Create mailbox on demand" > >> would be good. > > > > > > Some patches to remedy this have floated by on the list. None of those > > made it into CVS, alas. Personally I think this belongs in dbmail.conf > > dbmail.conf works too, however it could be nice to have on a per alias > basis. > > > > >> c) If the postgresql database goes down, imapd does not recover when > >> the database comes back and requires a re-start of dbmail-imapd. It > >> would be nice if dbmail-imapd recovered from database re-starts. > > > > > > Mmm. I'm pretty sure this works as expected for mysql. > > Restarting/reconnecting the client will probably also fix your problem. > > > It's probably not too hard to fix. > > >> d) imaps (imap over SSL) would really be nice. > > > > > > Use stunnel for now. > > > I keep forgetting about stunnel, I'll give it a go. > > >> f) scrubbing the database really need a cron job ? (reminds me - I > >> need to check to see if it the > >> dbmail-maintenance does a VACUUM;). > > > > > > It does when you use -c > > > > Also, remember to apply extra indices and contraints to your tables. > > > > For postgres you could use: > > > > > > create index name_idx on mailboxes(name); > > create index owner_id_idx on mailboxes(owner_idnr); > > create index is_subscribed_idx on mailboxes(is_subscribed); > > create index mailbox_id_idx on messages(mailbox_idnr); > > create index seen_flag_idx on messages(seen_flag); > > create index unique_id_idx on messages(unique_id); > > create index status_idx on messages(status); > > > Yep, they look good. > > But the constraints have problems with postgresql 7.2.3. I'll need > postgresql 7.3.3 for these. > > > > > alter table messages add foreign key (mailbox_idnr) references > > mailboxes(mailbox_idnr) on delete cascade; > > alter table mailboxes add foreign key (owner_idnr) references > > users(user_idnr) on delete cascade; > > alter table messageblks add foreign key (message_idnr) references > > messages(message_idnr) on delete cascade; > > > > Esp the indices will improve performance dramatically under anything > > more than trivial loads. The contraints are just for good dba > > meassure. A full dbmail-maintenance run will also provide the same > > functionality. > > The only thing dbmail-maintenance is good for then is vacuum.... :) > > >> g) There should be an config value to use a different port for > >> connecting to postgresql. I like to run different version of > >> postgresql on the same machine and I place them on different ports. > >> Currently dbmail only has "host" "db" "user" and "pass" parameters. > > > > > > Concur. Same goes for mysql. > > > >> I'm now looking for some migration tools, any suggestions welcome. I > >> would like a few command line tools to mess with imap servers, create > >> mailboxes, transfer emails between boxes etc. > > > > > > I've used the toolset from uw-imapd myself (imapxfer now called > > mailutil from the uw-imap package) for moving stuff from one imap > > server to another. > > > I also came across imapsync which uses the perl module > Mail::IMAPClient. Enough rope here for almost anything. > > > Thanks for the suggestion on the indexes and constraints. That really > makes it quite alot better. > > G > > > > _______________________________________________ > Dbmail mailing list > [email protected] > https://mailman.fastxs.nl/mailman/listinfo/dbmail >
