On Thu, Feb 19, 2009 at 4:28 PM, Simon Aquilina <sim...@hotmail.com> wrote:
> > I am on the verge of giving up on maildrop ... but ... > before that I have some more comments below ... > > > Date: Wed, 18 Feb 2009 21:17:19 +0100 > > From: mo...@ml.netoyen.net > > To: postfix-users@postfix.org > > Subject: Re: Postfix + Maildrop > > > > Simon Aquilina a écrit : > > >[snip] > > >> > > >> > > > >> > Enterting the command maildrop -V 4 -d sysad...@mydomain.com < 1 > return > > >> > the following: > > >> > base 1: No such file or directory. > > >> > > >> well, you asked it to read from a file named "1". use "< /dev/null" > > >> instead. > > > > > > I did as you suggested and the results I get are the following; > > > > > > Message start at 0 bytes, envelope sender=root > > > maildrop: Attempting sysad...@mydomain.com > > > maildrop: Unable to open filter file, errno=2 > > > > > > > well, since your maildrop doesn't use authlib, it wants a real user (one > > that it can find in /etc/passwd). > > > > anyway, you can try with a higher verbosity level. for example > > > > maildrop -V 9 -d someuser < /dev/null > > This gives me the same error; "maildrop: Unable to open filter file, > errno=2". > > I went to the maildrop website. Here I found a link about maildropfilter. > The first thing I noticed is that it seems the file must be called > .mailfilter rather then .maildropfiler. In this page it clearly says that > the .mailfilter must be in the $HOME directory. Now I do not know if my > logic is correct, however by $HOME directory I understand the directory > defined in the /etc/passwd file for the user value defined in postfix > master.cf file. > > is this correct? or? > > Also am I correct in putting the maildroprc file in /etc/courier/ > considering that all courier config files are in this location? or this is > irrelevant? Where could I check where maildroprc should be placed? > The homedirectory in /etc/passwd is meant for local users , if you are storing the user information on mysql database it depends on the information you entered. I am storing the email user information on LDAP database instead of mysql . #man maildroprc (will give you the details about file location of maildroprc and mailfilter files). I am using Redhat Enterprise linux 5 and the location for maildroprc is /etc/maildroprc. > > Regarding USER filter file , it is residing on individula users home > directory > > > > > > > > > > However I cannot understand why I am getting the third line. On the > > > documentation it says that .maildropfilter should be in $HOME/. I > > > understand that this means the home directory of the user used by > > > maildrop. In my case the user is 'mail' and the home directory is > > > '/var/mail/'. I created a file named '.maildropfilter' and inside it I > > > placed only a single line to point to the mailbox (available further > > > below). To be sure I also passed the following commands; chown mail > > > .maildropfilter and chmod 666 .maildropfilter. I then copied the file > to > > > '/etc/courier/' as well but still had the same results :( > > > > > >> > > >> > > > >> > Enter the command maildrop -v returns the following: > > >> > maildrop 2.0.4 Copyright 1998-2005 Double Precision, Inc > > >> > GDBM/DB extensions enabled > > >> > Maildir quota extensions enabled > > >> > <License text> > > >> > > >> so your maildrop was not built with authlib support. as a result, it > > >> can't query authdaemon. with authlib support, you get something like: > > >> > > >> $ maildrop -v > > >> maildrop 2.0.4 Copyright 1998-2005 Double Precision, Inc. > > >> GDBM extensions enabled. > > >> Courier Authentication Library extension enabled. > > >> Maildir quota extension enabled. > > >> This program is distributed under the terms of the GNU General Public > > >> License. See COPYING for additional information. > > >> > > > > > > I spent all morning on the internet trying to find how to install > > > maildrop with authlib support and did not find much. However I did find > > > something interesting. On one website there was written that maildrop > > > started displaying "Courier Authentication Library extension enabled." > > > after it was configured to use authmysqlrc. Needless to say I did not > > > fine the information where such setting should be placed! > > > > > > > maybe try: > > http://www.ckvsoft.at/pmwh/index.php/Installation:Ubuntu:Maildrop > > This was helpful. I am going to update my .mailfilter with the sample given > here. However when I run the install commands I get the message that both > applications are already installed on my machine. Should I maybe uninstall > maildrop and re-install it in that way? > > > > > > > >> > > >> look at the "Courier Authentication Library extension enabled." line. > > >> > > >> if the mailbox location or uid/gid is "dynamic", yiu'll need to > > >> reinstall maildrop with authlib support. > > >> > > >> if the mailbox location is "static" (for example > > >> /base/domain/user/maildir/) and you use a single uid:gid for all > > >> mailboxes, then you can run maildrop with -d mailboxuid and have > > >> maildroprc determine the mailbox path. > > > > > > At the moment all uid:gid have the same value. Therefore I was trying > to > > > get maildrop to work with the auth support and then work on connecting > > > maildrop to mysql later. > > > > > > For this reason I changed my master.cf file maildrop setting to be > > > finish with '... -d 1000 ${recipient} ${user}'. Considering maildrop > > > should drop the emails in: '/var/mail/virtual/{user}/new/' I put a > > > single line in .maildropfilter file as follows: 'MAILBOX = > > > "/var/mail/virtual/$1/new/" '. NOTE: I only have this line in the > > > .maildropfilter file. > > > > > > > 1- The variable is DEFAULT, not MAILBOX. > > 2- don't put a "new/" there. maildrop will try to deliver to > > $whatyoutellit/new/. > > 3- in your example, ${user} is $2, not $1. but you lose the domain part > > (${nexthop} or ${domain} depending on your postfix version). > > Ok :) > > > > > > > > >> > > >> > > > >> > Enter the command authtest sysad...@mydomain.com return the > following: > > >> > Authentication FAILED: Operation not permitted > > >> > > > >> > > >> if you got this as root, then you have a problem. any selinux, > apparmor, > > >> ... ? > > > > > > It seems I have apparmor installed... is this a problem? > > > > > > > it may be. you can uninstall it and see. the day you feel "confident", > > you can reinstall it (or install selinux instead). you'll need to > > understand how it works and how to configure it to allow what you want > > to allow (I personally don't know!). > > > > >> > > >> > Also from where do I turn logging on? I do not have the file > > >> > /etc/maildroprc! > > >> > > >> you create it. but the location is system dependent. so you'll have to > > >> fins out whether your maildrop uses this file. this is easy: just put > > >> random stuff there and see maildrop barking for syntax errors... > > > > > > I created the maildroprc in '/etc/courier/' I put a single line (again) > > > which is as follows 'logfile = "/var/log/maildrop.log" '. When I run > the > > > above mentioned commands I do not get anything written in the log file > > > (I pre-created and gave all type of rights on it). Where should I see > > > maildrop complain about the syntax? > > > > > > > well, you're not making it easy. maildrop won't be allowed to write to > > /var/log. try /tmp/maildrop.log instead. > > > > or use the logger command instead: > > > > `/usr/bin/logger -i -p mail.info -t "maildrop args: $1, $2, $3"` > > > > > > ------------------------------------------------------------------------ > > > Discover the new Windows Vista Learn more! > > > > nah, thanks ;-p > > > > > < > http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE> > > > > > ------------------------------ > Discover the new Windows Vista Learn > more!<http://search.msn.com/results.aspx?q=windows+vista&mkt=en-US&form=QBRE> > -- Best Regards Gejo Paul