Re: [exim] Maildir, mysql database, and creating home dirs

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Derrick MacPherson
Dátum:  
Címzett: Giuliano Gavazzi
CC: exim, Bill Hacker
Tárgy: Re: [exim] Maildir, mysql database, and creating home dirs
Giuliano Gavazzi wrote:
>
> On 7 Jan 2006, at 04:31, Derrick MacPherson wrote:
>
>>
>> I understand why mail can get rejected, I know about recip
>> verification etc. Off another system, very basic exim config, no sql.
>> I created a test account called dlm - with home dir not created. I
>> sent a test message, here's the log
>>
>> exigrep 1Ev4Jg-0006QF-3D /var/log/exim/mainlog
>> +++ 1Ev4Jg-0006QF-3D not completed +++
>> 2006-01-06 19:00:28 1Ev4Jg-0006QF-3D <= dmacpher@??? H=
>> (mail.vfs.com) [x.x.x.x] P=esmtp S=2176 id=43BF2D6B.6050608@???
>> 2006-01-06 19:00:29 1Ev4Jg-0006QF-3D == dlm@??? R=localuser
>> T=local_delivery defer (13): Permission denied: cannot create
>> /home/dlm/Maildir
>>
>> The local_delivery transport:
>>
>> driver = appendfile
>> directory = $home/Maildir
>> delivery_date_add
>> envelope_to_add
>> return_path_add
>> group = mail
>> user = $local_part
>> mode = 0660
>> no_mode_fail_narrower
>> maildir_format
>> maildir_tag = ,S=$message_size
>>
>> I've never seen any of the unix systems I've worked on before create
>> the home directories when there's incoming mail. I know FTP programs
>> can create home directories, when you tell it to. Even after adding
>> the create_directory option to the local_delivery it's still not
>> creating the home directory. I create the home directory, and then it
>> delivers.
>>
>
> this has nothing to do with
>
> |create_directory     |  Use: appendfile  |  Type: boolean  |     
> Default: true|

>
> that, as you can see, is true by default.


Ah ya, missed that, thank you.

> Read the error again and you will see that it is a permission issue.
>
>> Is this a difference between sql related accounts and local account
>> deliveries? I can drop the config on the web somewhere if someone
>> would like to see it. Thanks.
>
>
> No need. Before you were complaining because it created the home
> directory, but it actually was only creating the Maildir (that is
> possible, given the normal permissions in one's home dir). Now you seem
> to complain that it does *not* create a home dir...


No, I was providing the second example to show the difference between
how on a different system where it's using a local real user it would
not create the home directory, and how on a different system with a user
out of a sql db it's creating the home directory.

I have 2 goals here, a) to get the home directory created with the
proper permissions, b) for my own interest sake to find out WHY it's
being created at all when it doesn't do it for a local real user

If I create a real local user, then remove the home directory and send
an email, it won't create the home directory, I get an error:

2006-01-07 08:54:46 1EvHFO-000OkP-JU == ddd@??? R=localuser
T=local_delivery defer (-29): Failed to find user "" from expanded s
tring "${lookup mysql{SELECT emailUnixUID FROM tb_emailaddress LEFT JOIN
tb_domain ON (tb_domain.domainID = tb_emailaddress.emailDom
ainID) WHERE emailLocalPart = '${quote_mysql:${local_part}}' AND
domainName='${quote_mysql:${domain}}'}}" for the local_delivery tra
nsport

So why does it create a home dir for a db user, and not a real user?

(Goes off and tries something)

I've added the directory_mode = 0750 option and that seems to have fixed
my issue, so I guess it's just made to create home dirs for new DB users
automagicaly, I don't know if that's in the documentation at all, but
maybe it should be if it's not.

Thanks Bill and Guiliano for your input, it's most appreciated