Hi. I upgraded maildrop on my system today, and noticed it
writes maildirsize slightly differently in regards to leading/trailing
spaces as compared to qmail-local:

50000000S,50000C
45133542 2022
     494    1
428 1
     482    1
     533    1
     771    1
     2379   1


qmail-local flushes left, while maildrop doesn't. Does this affect
anything? Thanks.

A request: this is such a small patch that I don't even want to generate
a patch file. Could you patch qmail-lspawn.c to export MAILDIRQUOTA with
the same contents as QMAILQUOTA for the next release? This would make
integration with maildrop complete without patching qmail-ldap.



The following is a lengthy, boring explanation how to set up maildrop
for deliveries. I am sure many have done the same, but here's what
I did:

1) patched qmail-lspawn to export MAILDIRQUOTA
2) compiled maildrop as an MDA for Courier, not stand-alone (if you
follow documentation you'll see why - MAILDIRQUOTA)
3) echo 'EXITSTATUS=99' > /usr/local/etc/maildroprc - see explanation
and maildropfilter and qmail-local man pages.
4) Sqwebmail is responsible for generating .mailfilter (the only
downside is it's not as flexible as a custom www tool would be for
generating .mailfilter for users, but the benefit is sqwebmail is
already written, and users already use it to generate .mailfilter
files.
5) The defaultdelivery for qmail-local is: 
| if ! test -e ./Maildir; then exit 0; fi; if ! test -e .mailfilter;
then exit 0; else /var/qmail/bin/preline -f /usr/local/bin/maildrop; fi
(as one line; any way to do it in more than one?)
./Maildir/
(this is the second line)

We want the shell to exit 0 if Maildir doesn't exist in a user's home directory so
it is created. We want maildrop to exit with 99 on successful
deliveries in order for a duplicate message not to be delivered. We want
shell to exit 0 if .mailfilter doesn't exist to let qmail-local do the
./Maildir/ delivery as it's faster (even though maildrop will do it by 
default if no .mailfilter). If maildrop fails, messages are deferred
nicely, and the second line is not followed by qmail-local per
qmail-local documentation. Does anyone see any possible problems here?

So here we have sqwebmail authenticate from LDAP directory and handling
maildirsize, qmail-lspawn/qmail-local doing the same, and maildrop
filtering, and also using maildirsize for quotas. Users are filtering on
the server, and with Courier-IMAP their Sqwebmail folders are accessible
as well. My only concern are race conditions on the maildirsize, and 
possible difference in quota implementations between the four could cause
problems. What do you think?

Hope the above helps to people who want to use maildrop in
defaultdelivery.

Reply via email to