

![]() | Start a set with this search |
![]() | Include this search in one of my sets |
![]() | Exclude this search from one of my sets |
![]() | Permalink to these results Paste this link in email or IM: |
| Atom feed for tracking future search results Paste this URL into your reader: |
1 message in net.sourceforge.lists.courier-maildrop[maildropl] Re: Help, quota suport fo...| From | Sent On | Attachments |
|---|---|---|
| Marcio Merlone | Nov 13, 2002 6:02 am |

![]() | Permalink for this message Paste this link in email or IM: |
![]() | Permalink for this thread Paste this link in email or IM: |
| Atom feed for this thread Paste this URL into your reader: |
| Subject: | [maildropl] Re: Help, quota suport for virual users accounts! | Actions... |
|---|---|---|
| From: | Marcio Merlone (mm...@surf.com.br) | |
| Date: | Nov 13, 2002 6:02:39 am | |
| List: | net.sourceforge.lists.courier-maildrop | |
Alex Pita wrote:
Could you point me (us) some doc or url where I can learn how to use maildrop with users that exists only on a ldap/mysql server? I will not have real users on my mail server and using a local delivery agent always looks better, but don't know how with virtual (non-passwd) users.
Hi Marcio,
It's me Alex. You ask me in one of past emails about maildrop + mysql users accounts.
I want to confirm you, that finally, after few horibile days, it works for me. (see the last threads named Postfix problem: Cannot set my user or group id! and Postfix+maildrop+mysql big problem! I give up! No more ideas!)
Just few important changes for maildrop to work:
1. # useradd vmail
[alex@dinu alex]$ id vmail uid=12346(vmail) gid=12346(vmail) groups=12346(vmail) [alex@dinu alex]$
2. after that chown -R vmail.vmail /home/mailusers.
Remember: No setuid is required (on contrary is not recomended to set some setuid on maildrop binary). Enough in this case to compile maildrop with --enable-trusted-users=vmail
3. Update mysql database (in my case maildb-> table users) to use the correct UID and GID when is trying to deliver mail to your virtual email accounts!
You can specify static u/gid on postfix - main.cf, so you dont overload your tables making unnecessary lookups.
virtual_uid_maps=static:1234 virtual_gid_maps=static:1234
update users set uid='12346' AND gid='12346'; here 12346 is uid owner and gid owner of vmail unix account
With static on main.cf you still have to have the correct (same) values on your tables, since courier-imap or maildrop still need them.
4. update /etc/postfix/master.cf as you see below:
maildrop unix - n n - - pipe
flags=Rhu user=vmail argv=/var/tmp/aaa/bin/maildrop -d ${recipient}
Dont know much yet about master.cf, why those flags Rhu?
That's it! Now you have the howto :-)
PS: Be carefully, that till now i found some missing features or some problems:
-if i add a new mysql email account, maildrop can't create the mailbox account first time when a message is sent to this new user! This is and important missing feature. If i use transport=virtual, the mailbox account is automatically created first time a messge is sent to this account ! If transport=maildrop, bad luck! In this case is very difficult to create manually each maibox account ( not for 1, 2 or 3 users but if i have tousands accounts could be a big problem)!
That's why I use this patch:
http://www.commedia.it/ccontavalli/#courier
with this script:
#!/bin/sh # # Script for use with Carlo Contavalli's courier patch # for automgic maildir creation uppon pop/imap login # http://www.commedia.it/ccontavalli/#courier # # This script assumes a static uid:gid mapping for virtual mail users. # and can be run by hand on command prompt passing a maildir as # argument. # # Script grown by Marcio Merlone (mm...@surf.com.br) based on suggested # script on Carlo's online docs.
# Customize these lines for your needs! staticuid="mail" staticgid="mail" LOGGER=/usr/bin/logger MDIRMAKE=/usr/lib/courier-imap/bin/maildirmake
# Hopefully you don't need to customize any further.
maildir=$1
# Check for arguments. [ -z "$1" ] && printf "Use: `basename $0` <dir>\n" && exit 0
child=`basename $1` parent=`echo $1|sed 's/'${child}'//g'`
# Check for parent dirs (useful for setups for virtual # mailboxes with domain as # /virtual/domain/id/Maildir or something like this... if [ ! -d "$1" ]; then echo "Directory "$parent" does not exists, creating..." mkdir -p $parent $LOGGER -p auth.notice -t courier "Directory "$parent" automagic created." fi
echo $parent" "$child
# Finally creates the maildir. $MDIRMAKE $maildir && $LOGGER -p auth.notice -t courier "Maildir "$parent"/"$child" for uid "$UID" aka "$AUTHADDR" automagiclly created." chown -R $staticuid:$staticgid $maildir chmod -R g+rx $maildir
- Also, no warning message is sent into accounts which use more then 90% of soft-quota! This can be setted up i think putting a .mailfilter file in each mailbox directory. I dont know now more hints about this quotawarn message.
I was thinking about writing a simple and small script that runs twice (?) a day from cron that reads maildirsize and drops a new file (not using mail delivery agents, but using cat > $FILE << EOF) formatted as a real messages (so it becomes one) with the warn according to some parameters (quota x maildirsize). Done! And regardless quota he _will_ be warned. If user is overquota, even the deliverquota warning message is not delivered. Yes, it does have some implications on quota calculation, but I belive that it is not fair to stat this warning on user quota.
- ALso i saw that if a email account is over quota, all messages arrived to this account are bounced(till here is very good) BUT..... remain in /home/mailusers/test.ro/titi/Maildir/tmp directory all the rejected messages (this messages are not erased from tmp)! This is another big problem! ( think that could be a bug in my version of maildrop-1.4.0
Did not notice that, will take a look.
- also i cant find any info about what must contain the file: /var/tmp/aaa/etc/autoresponsequota
AND, the main problem is the maildrop mailing list is very dead! You ask and also you give the answer! On this mailing list are a lot o questions about quotawarn, deliverquota for courier-imap(pop and imap) and not yet a concrete answer! So, i'm afarid that maildrop it can't be for the momment a tools to use on production server!
Hey, calm down. Realize that none on mail list has obligation to answer. If you find that few answer there, become one to answer. Learn about the software and go there help others! And you cannot say "this software is not for production!" based on its mailling list, you have to analyze the software per se, see others experience with, if it meets your requests or not. It does mine, so I use it (in fact the server I am setting up is not yet in production). But even if the software has some improvements to be done, it is stable to use on production envs if you can deal with the features (for me is just the quaota wan, that I can circunvent...).
IMHO, if you need quota support for mysql or ldap users, just use without problem Xavier patch! No one of above problem! (i exhange some info with Xavier and in the next future release of this patch, he will implemet quotawanr message into mailboox account which overload the quota)
Just fine, but I will use extended features of maildrop to have mail filtering on server, and give this for my customers so they can block they own spam ;).
Best Regards, Alex
PS2: if you have some news about maildrop please drop me a line...
Regards, Alex
--
Marcio Merlone







