12 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Invalid home director...
FromSent OnAttachments
sdgesa gaeharthNov 10, 2003 7:13 am 
John LockeNov 10, 2003 8:06 am 
sdgesa gaeharthNov 10, 2003 8:58 am 
John LockeNov 10, 2003 10:53 am 
sdgesa gaeharthNov 10, 2003 11:08 am 
Sam VarshavchikNov 10, 2003 3:43 pm 
sdgesa gaeharthNov 10, 2003 7:04 pm 
John LockeNov 10, 2003 7:21 pm 
Sam VarshavchikNov 10, 2003 8:19 pm 
sdgesa gaeharthNov 11, 2003 11:53 am 
John LockeNov 11, 2003 6:13 pm 
Jamie McClellandNov 16, 2003 2:06 pm 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Invalid home directory error with postfix or command-lineActions...
From:John Locke (jo@freelock.com)
Date:Nov 11, 2003 6:13:50 pm
List:net.sourceforge.lists.courier-maildrop

On Mon, 2003-11-10 at 11:08, sdgesa gaeharth wrote:

On Mon, 2003-11-10 at 08:58, sdgesa gaeharth wrote:

thanks for the reply... I changed the permissions, they look like this now:

drwxr-xr-x 168 root root 8192 Nov 9 21:10 mail

But I still get the same error. /usr/local/bin/maildrop -d "jo@domain.com"

/usr/local/bin/maildrop: Invalid home directory permissions - world writable.

with postfix: (temporary failure. Command output: maildrop: signal 0x0B

Cheers

can you tell me if I have put in the correct parameters in the set up the sql config file for maildrop compared to the directory structure that I have set up?

************************** Here is the sql config file for maildrop:

hostname localhost port 3306 database maildb dbuser test dbpw test dbtable users uid_field address uidnumber_field uid gidnumber_field gid maildir_field maildir homedirectory_field '/mail' quota_field quota ************************** Here is the sql database: +----------------+------+------+-----------------+-----------------+-------+ | address | uid | gid | domain | maildir | quota | +----------------+------+------+-----------------+-----------------+-------+ | jo@domain.com | 1154 | 1001 | dullesmicro.com | jo@domain.com/ | 1000 | +----------------+------+------+-----------------+-----------------+-------+ ************************** Here is the file structure:

/mail/jo@domain.com /mail/jo@domain.com/cur /mail/jo@domain.com/new /mail/jo@domain.com/tmp

If I understand this correctly, the way you have this set up, the /mail directory would need to be owned by whatever user "1154" is, and owned by the "1001" group.

As Sam pointed out, you're breaking all kinds of conventions, and still don't have the permissions right. I don't know how to help further, but I can illustrate the permissions I use, and maybe you can find your solution.

First of all, I have both local and virtual users. All local users have a valid Unix user account and home directory. All virtual users use a Unix account I've set up as "virtual:virtual (5000:5000)"

All local mail goes to /home/$USER/Maildir. All virtual mail goes to /var/spool/mail/virtual/$DOMAIN/$USER. Everything under /var/spool/mail/virtual is owned by virtual:virtual. Local user mail directories are owned by the local Unix user account.

So my MySQL settings look like this: /etc/maildropmysql.config: hostname localhost port 3306 socket /var/lib/mysql/mysql.sock database maildb dbuser dbuser dbpw password dbtable users uid_field id uidnumber_field uid gidnumber_field gid maildir_field maildir homedirectory_field home quota_field quota

+------------------------------+------+------+-------------------------+ -----------------------------------+-------+ | id | uid | gid | maildir | home | quota | +------------------------------+------+------+-------------------------+ -----------------------------------+-------+ | virt@virtualdomain.com | 5000 | 5000 | virtual/ | /var/mail/virtual/virtualdomain | | | virt@virtualdomain.com | 5000 | 5000 | virtual2/ | /var/mail/virtual/virtualdomain | | | loc@freelock.com | 501 | 501 | Maildir/ | /home/local | | | loc@freelock.com | 502 | 502 | Maildir/ | /home/local2 | |

[john@server john]$ ls -lR /var/mail/virtual /var/mail/virtual: drwxr-sr-x 4 virtual virtual 4096 May 9 2003 virtualdomain/

/var/mail/virtual/virtualdomain: drwx--S--- 8 virtual virtual 4096 Jan 5 2003 virtual/ drwx--S--- 10 virtual virtual 4096 Nov 7 09:48 virtual2/

Here's the maildrop binary: -rwsr-xr-x 1 root mail 1147821 Oct 18 16:09 /usr/local/bin/maildrop*

Here's the delivery line for Virtual users (from Postfix master.cf): maildrop unix - n n - - pipe flags=DRhu user=mail argv=/usr/local/bin/maildrop -d ${recipient}

(if you're not using Postfix, this line drops privileges to the "mail" account, and passes the entire email address to Maildrop).

I've compiled Maildrop with the "mail" user as a trusted user, and I've configured Postfix to use this maildrop transport for all the addresses I want maildrop to handle.

So in this arrangement, the two virtual users share the same .mailfilter file--if I want them to have individual .mailfilter files, I could change the "home" column in MySQL to the full path, including the Maildir directory, and then change the Maildir column to be the full absolute path (same as the home column).

Note that you don't have to use MySQL for local users--you could just set Postfix to deliver local mail using the local_mailbox_command = /usr/local/bin/maildrop. I found that if I did it this way, I needed to add a DEFAULT=$HOME/Maildir to the .mailfilter file for each local user (if I added it to /etc/maildroprc, it broke delivery to virtual users). I put all my users in MySQL because I actually route mail for some accounts through Dspam for spam filtering, which then delivers to Maildrop, and it was easier this way...

Hope that helps, --John