PDA

View Full Version : "chdir Maildir failed"


Jürgen
16th March 2009, 22:22
Hello,

I installed a server on the basis of "The Perfect Setup". The system is running with Debian Etch 4.0.

During the installtion there were no errors, everything worked. I get, however, an error when I try to establish a new pop3 connection. The error message of my mail programm is:

Error while sending the password. The server responsed: chdir Maildir failed.

So, I checked the server and connection settings and read some threads about this error, but I still cannot find the bug.

Thanks for your help!

Flash
17th March 2009, 15:13
Did you send a message to that mail account, you usually need to send one before you can use pop3 or imap as it needs to create the folder structure. (if it doesnt, give the postfix user write access to the main dir)

Jürgen
18th March 2009, 00:40
Thanks for your response.

Sending a mail to the mail account doesn't help.

The users and their mail addresses are listed in /etc/postfix/virtusertable.

The mails are also received and saved in /var/mail/{username}. These files have got the right owner and reading permissions as well.

Any other idea? Thanks!

Jürgen
18th March 2009, 17:22
Do you think that it makes sense to remove postfix and to re-install it? Could there be any problems with ISPConfig?

Thanks.

falko
18th March 2009, 20:24
The mails are also received and saved in /var/mail/{username}. These files have got the right owner and reading permissions as well.

You must enable Maildir in ISPConfig (Management > Server > Settings > Email) (and/or run
postconf -e 'home_mailbox = Maildir/'
postconf -e 'mailbox_command ='
/etc/init.d/postfix restart)

Jürgen
18th March 2009, 21:22
Ah! Got it!
I forgot to active the checkbox "Maildir" in ISPConfig.
Why isn't it activated by default?
I have never done it before and it always worked well.

Anyway: Thank you very much! I love this community!

falko
19th March 2009, 17:53
Why isn't it activated by default? Because then the users that use mbox would complain. ;)

pineapple
3rd February 2010, 05:18
Hello

I am having the same problem on my server but only with one domain - each day the users cannot log in because of the rejection message chdir Maildir failed. If I reset their passwords they can access their email but only for another day.

Can anyone think of what has gone wrong?

Thanks and regards

Andrew

falko
3rd February 2010, 16:11
Do you use ISPConfig 2? What tutorial (URL) did you use to set up the system?

pineapple
3rd February 2010, 23:05
I followed the Debian Lenny tutorial and am using ISPConfig Version: 2.2.35. We have been running the server for about five months without any issues until now.

falko
4th February 2010, 15:58
Any errors in your mail log?
What's in /etc/postfix/main.cf?
Did you enable Maildir in ISPConfig?

pineapple
9th February 2010, 23:33
I have tried deleting the users and recreating them but the same problem occurs - initially they can log in and then a few hours later they can't.

main.cf looks like this:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific: Specifying a file name will cause the first
# line of that file to be used as the name. The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = first.form3.com.au
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mail.form3.com.au, first.form3.com.au, localhost.form3.com.au, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names

# code added by AW July 12 to block spam before it hits the server

smtpd_helo_required = yes
disable_vrfy_command = yes
strict_rfc821_envelopes = yes
invalid_hostname_reject_code = 554
multi_recipient_bounce_reject_code = 554
non_fqdn_reject_code = 554
relay_domains_reject_code = 554
unknown_address_reject_code = 554
unknown_client_reject_code = 554
unknown_hostname_reject_code = 554
unknown_local_recipient_reject_code = 554
unknown_relay_recipient_reject_code = 554
unknown_sender_reject_code = 554
unknown_virtual_alias_reject_code = 554
unknown_virtual_mailbox_reject_code = 554
unverified_recipient_reject_code = 554
unverified_sender_reject_code = 554

smtpd_recipient_restrictions =
reject_invalid_hostname,
reject_unknown_recipient_domain,
reject_unauth_pipelining,
permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_rbl_client multi.uribl.com,
reject_rbl_client dsn.rfc-ignorant.org,
reject_rbl_client dul.dnsbl.sorbs.net,
reject_rbl_client list.dsbl.org,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client cbl.abuseat.org,
reject_rbl_client ix.dnsbl.manitu.net,
reject_rbl_client combined.rbl.msrbl.net,
reject_rbl_client rabl.nuclearelephant.com,
permit


I did a send and receive on one of the accounts and this is what appears in the log file (you can also see the successful send and receive underneath on the same server):

Feb 10 08:18:29 first pop3d-ssl: Connection, ip=[::ffff:203.171.75.54]
Feb 10 08:18:36 first pop3d-ssl: chdir Maildir: Permission denied
Feb 10 08:18:58 first pop3d-ssl: Connection, ip=[::ffff:203.171.75.54]
Feb 10 08:18:59 first pop3d-ssl: LOGIN, user=1_andrew, ip=[::ffff:203.171.75.54], port=[62253]
Feb 10 08:19:00 first pop3d-ssl: LOGOUT, user=1_andrew, ip=[::ffff:203.171.75.54], port=[62253], top=0, retr=0, rcvd=24, sent=2881, time=1

Maildir is definitely enabled.

regards

Andrew

falko
10th February 2010, 15:11
Can you check the permissions of the Maildir? Is it owned by the correct user?

pineapple
10th February 2010, 23:27
No, the directories did not have the correct ownership settings! You're a legend - thanks very much.