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

autohomedir doesn't work indirectly on alias user

Hi Michael,

This might be the intended behavior, and I'm probably nit-picking, but I figure
it can't hurt to mention. :)

If autohomedir is enabled, and an alias user exists in the passwd table, but no
home dir has been created for it yet, then delivery to an alias address (other
than alias itself) will fail because sqlcreatehomedir does not get called.

For example, consider the alias user with a dotqmail for 'webmaster':

insert into passwd (login, virtual_host, home) values ('alias', 'domain.com',
insert into dotqmails (login, virtual_host, extension, dotqmail) values
('alias', 'domain.com', 'webmaster', 'alex@xxxxxxxxxxxx');

Note that the dir /virtual/alias does _not_ exist yet. If I do:

echo to: webmaster | /var/qmail/bin/qmail-inject

Here is what happens:

new msg 64904
info msg 64904: bytes 207 from <root@xxxxxxxxxx> qp 36959 uid 0
starting delivery 26: msg 64904 to local webmaster@xxxxxxxxxx
delivery 26: failure: Sorry,_no_mailbox_here_by_that_name._(#5.1.1)/
bounce msg 64904 qp 36962
end msg 64904

If I simply create an empty /virtual/alias dir, it works fine:

new msg 64904
info msg 64904: bytes 207 from <root@xxxxxxxxxx> qp 36976 uid 0
starting delivery 29: msg 64904 to local webmaster@xxxxxxxxxx
new msg 65149
info msg 65149: bytes 316 from <root@xxxxxxxxxx> qp 36979 uid 1010
starting delivery 30: msg 65149 to local alex@xxxxxxxxxxxx
delivery 29: success: did_0+1+0/qp_36979/
end msg 64904
delivery 30: success: did_1+0+0/
end msg 65149

Shouldn't sqlcreatehomedir be called for the alias user in the first case? If I
mail directly to the alias user:

echo to: alias | /var/qmail/bin/qmail-inject

it works fine, creating the /virtual/alias dir automatically as expected:

new msg 64904
info msg 64904: bytes 203 from <root@xxxxxxxxxx> qp 36994 uid 0
starting delivery 31: msg 64904 to local alias@xxxxxxxxxx
delivery 31: success: did_1+0+0/
end msg 64904


Alex Howansky
Wankwood Associates