[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: autohomedir doesn't work for any user



I made the changes sugested, however It is still with the same problem. This
is some information about my files:

root@drb$ ls -las /usr/local/sbin/sqlcreatehomedir
  42 -rwsr-x---   1 root     nofiles    20532 Dec  5 13:11
/usr/local/sbin/sqlcreatehomedir

The directory /export/home/mail/domain.com/ is already there, where I do
have some other users that can receive mails.

It look weird for me, because if try to send an email to mike@xxxxxxxxxx for
the first time (the sqlcreatehomedir should be able to create the directory
mike under the directory  /export/home/mail/domain.com/ ) and the qmail log
said:

 delivery 11: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/

My passwd table have the following lines:

root@drb$ psql -d userdb -U usermgr -c "select * from passwd where
login='mike'"
 login | uid  | gid  |                 home                  | virtual_host
| password | hardquota |         startdate          | stopdate | enabled |
lastlogin
-------+------+------+---------------------------------------+--------------
-+----------+-----------+----------------------------+----------+---------+-
----------
 mike | 1000 | 1000 | /export/home/mail/domain.com/mike | domain.com | | 0 |
2002-12-07 23:24:00.83293  | infinity | t       |
(1 rows)

Now, if I run the sqlcreatehomdir from my prompt, it will create the mike
directory:

/usr/local/sbin/sqlcreatehomedir mike domain.com

After that If I send an email to mike@xxxxxxxxxx, the qmail log shows that
the message has been delivered (and the message is under the directory
/export/home/mail/domain.com/mike/Maildir/new) :
 delivery 13: success: did_1+0+0/

It looks that I am missing something to be able to call the sqlcreatehomedir
to create the directory structure the first time.

Any other sugestions?

Thank you !



Klemen Vodopivec said:
> What are permissions of this file. It must be suid.
>
> klemen@boter:/usr/local/sbin$ ls -las sqlcreatehomedir
>   16 -rwsr-x---    1 root     nofiles     16216 Jul  4 19:11
sqlcreatehomedir
>
> If that is set, tell us what directory you are trying to create. Let's say
> you have set /home/domain.com/users/myuser for percticular user as home
> directory then /home/domain.com/users must exist. Documentation says:
> "Sqlreatehomedir can only create homedirs in already-existing
> directories".
>
> Hope that helps.
>
> Nayib Kiuhan said:
> > I had in my sqlserver file:
> > autohomedir yes
> > and I modifed as you sugested, however I did not work. I already
> > verified that such file was there (/usr/local/sbin/sqlcreatehomedir)
> >
> > Thank you
> >
> >
> >
> >> I believe there is configuration option in sqlserver file. You don't
> >> have that in you sqlserver.
> >>
> >> Syntax is like
> >> autohomedir /usr/local/sbin/sqlcreatehomedir
> >> depending where your script is.
> >>
> >> Nayib Kiuhan said:
> >> > Hi,
> >> >
> >> > I have been struggle to put to work the qmail+pgsql patch. The patch
> >> installed was the qmail-sql-0.23pre2.patch
> >> >
> >> > I do have the users in the database, however at the moment to
> >> delivery the message is not able to create the user directories,
> >> like the sqlcreatehomedir  application is not being call.
> >> >
> >> > If I create the user directory with mkdir,  or even if I create the
> >> directory with sqlcreatehomedir username domain.com, the system is
> >> able to deliver the email.
> >> >
> >> > Do you know what can be the problem? Can be a bug I this release?
> >> >
> >> > I already trace the database connection, and It looks like being
> >> connection to the DB once the email arrive!
> >> >
> >> > If I try to send an email to alias@xxxxxxxxxx, I am getting the same
> >> error: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/
> >> >
> >> > Some of the configuration files are:
> >> >
> >> > ============================root@drb$ more
> >> /var/qmail/control/sqlserver db_use yes
> >> > check_host yes
> >> > connectionstring user=userconsult password=readonly dbname=userdb
> >> popconnectionstring user=usermgr password=secretdb dbname=userdb
> >> dbtable passwd
> >> > autohomedir yes
> >> > virt_host_field virtual_host
> >> > login_field login
> >> > uid_field uid
> >> > gid_field gid
> >> > home_field home
> >> > quota_field hardquota
> >> > enabled_field enabled
> >> > startdate_field startdate
> >> > stopdate_field stopdate
> >> > passwd_field password
> >> > lastlogin_field lastlogin
> >> > localpop domain.com
> >> >
> >> > ============================root@drb$ psql -d userdb -U usermgr -c
> >> "select * from passwd"
> >> >  login | uid  | gid  |                 home                  |
> >> > virtual_host | password | hardquota |         startdate          |
> >> stopdate | enabled | lastlogin
> >>
>
>> -------+------+------+---------------------------------------+-----------
-
>
> ---+----------+-----------+----------------------------+----------+-------
--
> > +-----------
> >> >  alias | 1000 | 1000 | /export/home/mail/domain.com       |
> >> domain.com |
> >> > | 0 | 2002-12-07 12:12:32.456058 | infinity | t       | test  | 1000
> >> | 1000 | /export/home/mail/domain.com/test  | domain.com | | 0 |
> >> 2002-12-07 12:44:21.052264 | infinity | t       | mike | 1000 | 1000
> >> | /export/home/mail/domain.com/mike | domain.com | | 0 | 2002-12-07
> >> 23:24:00.83293  | infinity | t       |
> >> > (3 rows)
> >> >
> >> > ============================root@drb$ psql -d userdb -U usermgr -c
> >> "select * from locals"
> >> >  virtual_host
> >> > --------------
> >> > (0 rows)
> >> >
> >> >
> >> > Thank you for the help,
> >> >
> >> >
> >> > Nayib
> >>
> >>
> >> --
> >> lp, Klemen
>
>
> --
> lp, Klemen
>
>
>