

![]() | 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: |
3 messages in net.sourceforge.lists.courier-maildrop[maildropl] maildrop problem - SOLVED| From | Sent On | Attachments |
|---|---|---|
| Jonathan Nichols | Apr 8, 2003 6:43 pm | |
| Gatis Gailis | Apr 9, 2003 3:26 am | |
| Jonathan Nichols | Apr 9, 2003 7:44 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] maildrop problem - SOLVED | Actions... |
|---|---|---|
| From: | Jonathan Nichols (jnic...@pbp.net) | |
| Date: | Apr 8, 2003 6:43:44 pm | |
| List: | net.sourceforge.lists.courier-maildrop | |
Hey all - it's been solved! Thanks, guys! :D Gatis - First off, IT WORKED! :-D Here's what happened:
1. Mysql You wrote that you have a user maildrop, same name for me. Try
# mysql -u maildrop -p Mysql# use mailsql; Mysql# select * from users;
If that works we can move on.
This did work, and played a crucial role in finishing everything else.
2. You need system user:group to run maildrop with. I have user maildrop (no login shell, homedir /mail, no special rights or anything) and group maildrop (not member of any other group).
3. Maildrop compile/install Compile options: --enable-syslog=1 \ --enable-use-flock=0 \ --with-etcdir=/usr/local/etc" \ --enable-maildrop-uid=maildrop \ --enable-maildrop-gid=maildrop \
--with-mysqlconfig=/ports/mail/maildrop/maildropmysql.config \ --enable-maildropmysql --enable-restrict-trusted \ --enable-trusted-users='maildrop root' \ --enable-trusted-groups='maildrop wheel' \ --enable-use-dotlock=1 --enable-maildirquota
That's what I ended up doing. I'm using Gentoo Linux. I un-emerged maildrop and compiled the source one instead. I could have edited the makefile for the Gentoo emerge one, but I was too lazy. :) At any rate, the above worked.
All my maildirs are in one directory, namely, /home/mail. Claudio and perhaps you yourself may have them in different dirs, say, /home/mail/domain1, /home/mail/domain2 etc.. If that's the case then perhaps you will need to make a new field, say, fullpath, and put there the full path to maildir (exactly like Claudio did here: http://www.riverside.org/archive/html/maildrop/2003-04/msg00028.html). In that case you would need in /ports/mail/maildrop/maildropmysql.config maildir_field fullpath homedirectory_field fullpath
My virtual domains are in /home/vmail/domain.tld/username - and I left "maildir" and "homedir" in maildropmysql.cf because they did coincide with what I have in MySQL already.
4. Check maildrop -v for Mysql support. Setuid maildrop binary, on my system:
# chmod ug+s /usr/local/bin/maildrop
[root@sieta etc1]# ] ls -l /usr/local/bin/maildr* -rwsr-sr-x 1 root wheel 162080 Apr 8 22:10 /usr/local/bin/maildrop*
If you do it on your system, you will see that owner:group of maildrop is maildrop:maildrop. Change it to root:wheel (Claudio also mentioned this).
Mine is still root:mail, but that's ok, because I had added "mail" to maildrops' trusted groups during compile
If you have sudo you can do # sudo -u maildrop maildrop If permissions are ok it says:
[root@sieta etc1]# ] sudo -u maildrop maildrop maildrop: Invalid home directory permissions - world writable.
Doesn't sound good but it's the only way that worked for me. Less permissions or owner=maildrop of maildrop binary and I got errors.
Yup, got that error.. things are working.
5. Postfix. Nothing that you wouldn't knew already:
[root@sieta etc1]# ] cat /postfix/master.cf | grep maildrop maildrop unix - n n - - pipe flags=Ru user=maildrop argv=/usr/local/bin/maildrop -d ${recipient}
In main.cf only that maildrop_destinaton_recipient_limit = 1, everything else the same as for postfix+mysql setup.
Here's my master.cf line - and you'll see why I did this.
maildrop unix - n n - - pipe flags=Ru user=vmail argv=/usr/local/bin/maildrop -d $recipient
When I had ${recipient} I'd get this: mysql> SELECT email,uid,gid,homedir,maildir,quota,postfix FROM users WHERE email = "{phon...@phoneboy.org}"; Empty set (0.00 sec)
Ah ha! Let's get rid of those curly braces, shall we?
Voila!
mysql> SELECT email,uid,gid,homedir,maildir,quota,postfix FROM users WHERE email = "phon...@phoneboy.org"; +-----------------------+------+------+--------------+---------------------------------------------+-------+---------+ | email | uid | gid | homedir | maildir | quota | postfix | +-----------------------+------+------+--------------+---------------------------------------------+-------+---------+ | phon...@phoneboy.org | 1001 | 1001 | /home/vmail/ | /home/vmail/phoneboy.org/phoneboy/.maildir/ | | y | +-----------------------+------+------+--------------+---------------------------------------------+-------+---------+ 1 row in set (0.00 sec)
mysql>
6. Maildrop config. Absolutely necessary is to get rid of suggested lines in /usr/local/etc/maildroprc like import SENDER ... At least didn't work for me. I renamed away that file altogether. So no maildroprc.
I don't have an /etc/maildroprc either. It's using the maildropmysql.cf file just fine. :-)
I hope that most of this makes sense.. I'm certainly happy with the results.
Now... the next goal.. to actually implement server-side filtering *gasp*.. ;)
Thanks again! -Jonathan







