Discussion:
Unable_to_chdir_to_maildir._(#4.2.1)
Anselm Nehls
2002-05-25 01:20:20 UTC
Permalink
hello everyone.

a few days ago, i installed qmail on my system. i'm a bit unsure about
everything as it's the first email system i am setting up at all, but
after some initial trouble everything seems to work fine now; except for
my aliases: deliveries from and to my normal unix accounts
(***@host.com) work fine, but mails to any of my other domains keep
failing with the message

May 25 02:29:40 host qmail: 1022286580.620811 starting delivery 1: msg
16005 to local ***@aliasdomain.com
May 25 02:29:40 host qmail: 1022286580.620895 status: local 1/10 remote
0/20
May 25 02:29:40 host qmail: 1022286580.625287 delivery 1: deferral:
Unable_to_chdir_to_maildir._(#4.2.1)/
May 25 02:29:40 host qmail: 1022286580.625417 status: local 0/10 remote
0/20

i am using Maildir, and i want to keep using it. i was thinking it had
something to do with the permissions, but i created the Maildirs with
maildirmake and as the non-aliased delivery works fine, i dont think
it's a permissions problem.

this is what the relevant part of my ~user dir looks like:

drwx------ 5 anehls apache 4096 Mai 23 06:59 Maildir
-rw-r--r-- 1 anehls apache 11 Mai 25 01:50 .qmail

(the .qmail file contains the line ./Maildir/)

i dont exactly know how the mail is being transferred from alias to my
userdir; i have set up the domains in rcpthosts and in locals, and i
have made virtual domains.

the .qmail-virtualdomain-user files in qmail/alias contain links to my
local username like

&anehls

i also tried

/home/anehls/Maildir/

and similar things, but nothing works.


now, please tell me... what am i doing wrong?

thanks in advance.

kind regards,
anselm nehls
George Auch
2002-05-25 02:37:04 UTC
Permalink
Post by Anselm Nehls
hello everyone.
a few days ago, i installed qmail on my system. i'm a bit unsure
about everything as it's the first email system i am setting up at
all, but after some initial trouble everything seems to work fine
now; except for my aliases: deliveries from and to my normal unix
accounts
failing with the message
May 25 02:29:40 host qmail: 1022286580.620895 status: local 1/10
remote 0/20
Unable_to_chdir_to_maildir._(#4.2.1)/
May 25 02:29:40 host qmail: 1022286580.625417 status: local 0/10
remote 0/20
i am using Maildir, and i want to keep using it. i was thinking it
had something to do with the permissions, but i created the Maildirs
with maildirmake and as the non-aliased delivery works fine, i dont
think it's a permissions problem.
drwx------ 5 anehls apache 4096 Mai 23 06:59 Maildir
-rw-r--r-- 1 anehls apache 11 Mai 25 01:50 .qmail
(the .qmail file contains the line ./Maildir/)
i dont exactly know how the mail is being transferred from alias to
my userdir; i have set up the domains in rcpthosts and in locals, and
i have made virtual domains.
the .qmail-virtualdomain-user files in qmail/alias contain links to
my local username like
&anehls
i also tried
/home/anehls/Maildir/
and similar things, but nothing works.
now, please tell me... what am i doing wrong?
thanks in advance.
kind regards,
anselm nehls
Anselm,

Check your /var/qmail/control directory, there should be a
virtualdomains file. (If not type: touch virtualdomains, and,
chmod 644, the file should be owned by root)

In virtualdomains add:

my.virtualdomain.com:user_name

where user_name is a user with a /home/user_name/Maildir

In the /var/qmail/alias directory you should have a file:

.qmail-alias_name

This file should contain the user_name who has a Maildir

Hope this helps,

George
--
George Auch
Linux 2.4.19-pre8 i686
Anselm Nehls
2002-05-25 09:41:57 UTC
Permalink
hello george,
Post by George Auch
Check your /var/qmail/control directory, there should be a
virtualdomains file. (If not type: touch virtualdomains, and,
chmod 644, the file should be owned by root)
my.virtualdomain.com:user_name
where user_name is a user with a /home/user_name/Maildir
.qmail-alias_name
This file should contain the user_name who has a Maildir
i've already had the virtualdomains file, and i set it up like this:

domain.com:domainalias

to define aliases for the domains i am using. then afterwards, i created
files like .qmail-domainalias-useralias in the qmail/alias directory
where i entered the unix-username the alias should point to.

this seemed to be a logical thing, and it was exactly what webmin did,
too, when i tried using it to create the aliases.


however, i followed your directions, but now qmail doesnt even find the
mailbox and returns a "Sorry, no mailbox here by that name. (#5.1.1)"

i dont know if i understood you correctly, here's what i did:

in virtualdomains:
domain.com:anehls

in dir qmail/alias:

.qmail-domain.com-useralias

which contains "&anehls"


this, however, doesn't work either, and i get a bounce message.

with my old setup, i've had the messages in the queue at least, even
though they couldnt be delivered :)

did i do it wrong? or any better ideas?

(although it doesnt look like a logical solution for me: why should i
have to assign a unix-username to a domain first?)

well, dunno.. i'm confused :)

thanks though.

anselm
Adrian Ho
2002-05-25 10:38:45 UTC
Permalink
Post by Anselm Nehls
domain.com:anehls
This delivers mail received for ***@domain.com to the local address
anehls-***@domain.com. If anehls is a real user, and neither
~anehls/.qmail-abc nor ~anehls/.qmail-default exist, qmail will bounce
Post by Anselm Nehls
"Sorry, no mailbox here by that name. (#5.1.1)"
which is exactly what you're seeing.

Of course, all the above assumes you're not overriding the normal logic
with the qmail-users mechanism. If you are, modify the logic accordingly.
Post by Anselm Nehls
.qmail-domain.com-useralias
which contains "&anehls"
this, however, doesn't work either, and i get a bounce message.
Exactly. The above only affects local deliveries to the final address
domain.com-***@some.domain.you.receive.mail.for.

It sounds like you're thorougly confused about how virtualdomains works.
I highly recommend that you "man qmail-send" (the virtualdomains
description) and "man dot-qmail" (the EXTENSION ADDRESSES section).
Also try sending test mail to various addresses in the virtual domains
you control, then read the qmail-send logs to see what addresses are
actually being delivered to.

The combination of the above two activities should hopefully help you
understand what you're doing, a very important aspect of qmail
administration. 8-)
--
Adrian Ho Tinker, Drifter, Fixer, Bum aho-djb-***@03s.net
ListArchive: <http://marc.theaimsgroup.com/?l=qmail>
Useful URLs: <http://cr.yp.to/qmail.html> <http://www.qmail.org>
<http://www.lifewithqmail.org/> <http://qmail.faqts.com/>
Anselm Nehls
2002-05-25 12:17:48 UTC
Permalink
Post by Adrian Ho
It sounds like you're thorougly confused about how
virtualdomains works. I highly recommend that you "man
qmail-send" (the virtualdomains
description) and "man dot-qmail" (the EXTENSION ADDRESSES
section). Also try sending test mail to various addresses in
the virtual domains you control, then read the qmail-send
logs to see what addresses are actually being delivered to.
hello adrian,

thank you so much.
the qmail-send manpage finally solved my problem with a simple yet
important sentence i had seen nowhere before:

"qmail-send handles virtualdomains after locals: if a domain is listed
in locals, virtualdomains does not apply."

in a moment of total confusion i had put all my domains into
control/locals ... and was wondering why no mail was delivered to a user
that didnt even exist :)

problem solved, thanks again, but i guess i'll be back with more soon ;)

regards,
anselm

Loading...