Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 8th July 2008, 13:36
eliufoo eliufoo is offline
Junior Member
 
Join Date: Jun 2008
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default Courier Not Creating Mail directories

Hi guys,

I have finished migrating my mail server from using postfix & dovecot to postfix & courier imap using the the following howto (Virtual Users With Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS). And I'm using postfixadmin to manage my virtual users.

I'm now experiancing a problem with users mail dir not been created. I get the following error when loggin to pop3 account using a telnet session.

Quote:
-ERR chdir Maildir failed
maillog

Quote:
Jul 8 13:14:07 helen pop3d: Connection, ip=[::ffff:127.0.0.1]
Jul 8 13:14:07 helen pop3d: Connection, ip=[::ffff:127.0.0.1]
Jul 8 13:14:23 helen authdaemond: received auth request, service=pop3, authtype=login
Jul 8 13:14:23 helen authdaemond: received auth request, service=pop3, authtype=login
Jul 8 13:14:23 helen authdaemond: authmysql: trying this module
Jul 8 13:14:23 helen authdaemond: authmysql: trying this module
Jul 8 13:14:23 helen authdaemond: SQL query: SELECT username, password, password, '1001', '1001', '/var/vmail2', "", concat(quota,'S'), name, "" FROM mailbox WHERE username = 'test@example.com'
Jul 8 13:14:23 helen authdaemond: SQL query: SELECT username, password, password, '1001', '1001', '/var/vmail2', "", concat(quota,'S'), name, "" FROM mailbox WHERE username = 'test@example.com'
Jul 8 13:14:23 helen authdaemond: password matches successfully
Jul 8 13:14:23 helen authdaemond: password matches successfully
Jul 8 13:14:23 helen authdaemond: authmysql: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/var/vmail2, address=test@example.com, fullname=test user 1, maildir=<null>, quota=0S, options=<null>
Jul 8 13:14:23 helen authdaemond: authmysql: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/var/vmail2, address=test@example.com, fullname=test user 1, maildir=<null>, quota=0S, options=<null>
Jul 8 13:14:23 helen authdaemond: authmysql: clearpasswd=$1$d5af5760$/tmcedp.r38VgaexnBet2/, passwd=$1$d5af5760$/tmcedp.r38VgaexnBet2/
Jul 8 13:14:23 helen authdaemond: authmysql: clearpasswd=$1$d5af5760$/tmcedp.r38VgaexnBet2/, passwd=$1$d5af5760$/tmcedp.r38VgaexnBet2/
Jul 8 13:14:23 helen authdaemond: Authenticated: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/var/vmail2, address=test@example.com, fullname=test user 1, maildir=<null>, quota=0S, options=<null>
Jul 8 13:14:23 helen authdaemond: Authenticated: sysusername=<null>, sysuserid=1001, sysgroupid=1001, homedir=/var/vmail2, address=test@example.com, fullname=test user 1, maildir=<null>, quota=0S, options=<null>
Jul 8 13:14:23 helen authdaemond: Authenticated: clearpasswd=test, passwd=$1$d5af5760$/tmcedp.r38VgaexnBet2/
Jul 8 13:14:23 helen authdaemond: Authenticated: clearpasswd=test, passwd=$1$d5af5760$/tmcedp.r38VgaexnBet2/
Jul 8 13:14:23 helen pop3d: chdir Maildir: No such file or directory
Jul 8 13:14:23 helen pop3d: chdir Maildir: No such file or directory
Please assist.

regards,
Elly
Reply With Quote
Sponsored Links
  #2  
Old 8th July 2008, 18:24
eliufoo eliufoo is offline
Junior Member
 
Join Date: Jun 2008
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
Default

http://www.howtoforge.com/forums/showthread.php?t=10122

Found a similar thread and made the changes accordinly except for my,

Quote:
MYSQL_MAILDIR_FIELD CONCAT("/var/vmail/",maildir)
I'm now receiveing the following error,
Quote:
-ERR chdir /var/vmail/elly@example/ failed
Looking at the /var/log/maillog file, i get the following errors

Quote:
Jul 8 19:37:22 helen postfix/qmgr[16269]: A2DCAC0647: from=<elly@example.com>, size=413, nrcpt=1 (queue active)
Jul 8 19:37:22 helen postfix/qmgr[16269]: A2DCAC0647: from=<elly@example.com>, size=413, nrcpt=1 (queue active)
Jul 8 19:37:22 helen postfix/qmgr[16269]: warning: connect to transport maildrop: No such file or directory
Jul 8 19:37:22 helen postfix/qmgr[16269]: warning: connect to transport maildrop: No such file or directory
Jul 8 19:37:22 helen postfix/qmgr[16269]: 8D23BC174E: from=<amby@example.com>, size=406, nrcpt=1 (queue active)
Jul 8 19:37:22 helen postfix/qmgr[16269]: 8D23BC174E: from=<amby@example.com>, size=406, nrcpt=1 (queue active)
Jul 8 19:37:22 helen postfix/error[16686]: A2DCAC0647: to=<amby@example.com>, relay=none, delay=4197, delays=4197/0.03/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 8 19:37:22 helen postfix/error[16686]: A2DCAC0647: to=<amby@example.com>, relay=none, delay=4197, delays=4197/0.03/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 8 19:37:22 helen postfix/error[16687]: 8D23BC174E: to=<test@example.com>, relay=none, delay=173, delays=173/0.02/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 8 19:37:22 helen postfix/error[16687]: 8D23BC174E: to=<test@example.com>, relay=none, delay=173, delays=173/0.02/0/0, dsn=4.3.0, status=deferred (mail transport unavailable)
courier-pop3 doesn't receive an email since maildrop is failing to deliver the email. And maildrop is failing cause it doesn't see the directory to deliver the email???

What happening here?

Last edited by eliufoo; 8th July 2008 at 18:51.
Reply With Quote
  #3  
Old 9th July 2008, 14:41
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

Did you send an email first to that account before you tried to fetch emails? Maildir is created automatically when the first email arrives.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #4  
Old 9th July 2008, 20:23
eliufoo eliufoo is offline
Junior Member
 
Join Date: Jun 2008
Posts: 15
Thanks: 0
Thanked 1 Time in 1 Post
 
Default

Got it fixed. :-)

It was a typo problem with authmysqlrc file. I found out that, trailing spaces are PROHIBITED and I had plenty of those. See below changes I made. (I will also advise others read authmysqlrc file. my is located in /etc/authlib/authmysqlrc)

Single space between field & value.

Quote:
MYSQL_SERVER localhost
MYSQL_USERNAME vmailuser
MYSQL_PASSWORD vmailpass
MYSQL_SOCKET /var/lib/mysql/mysql.sock
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE postfix
MYSQL_USER_TABLE mailbox
MYSQL_CRYPT_PWFIELD password
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD '1001'
MYSQL_GID_FIELD '1001'
MYSQL_LOGIN_FIELD username
MYSQL_HOME_FIELD '/opt/mail'
MYSQL_NAME_FIELD name
MYSQL_MAILDIR_FIELD CONCAT("/opt/mail/",maildir)
MYSQL_QUOTA_FIELD concat(quota,'S')
Also, if you are using maildrop to delivery message to your virtual uses. You might encounter the following error.


Quote:
Jul 8 02:14:49 helen postfix/qmgr[9222]: warning: connect to transport maildrop: No such file or directory
Jul 8 02:14:49 helen postfix/qmgr[9222]: warning: connect to transport maildrop: No such file or directory
Jul 8 02:14:49 helen postfix/error[27271]: 71169C12DC: to=<elly@example.co.tz>, orig_to=<root>, relay=none, delay=75934, delays=75934/0.02/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
Jul 8 02:14:49 helen postfix/error[27271]: 71169C12DC: to=<elly@example.co.tz>, orig_to=<root>, relay=none, delay=75934, delays=75934/0.02/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
I solved this by changing the ownership of maildroprc.log file from root to vmail.

Quote:
[root@helen ~]# ls -l /var/log/maildroprc.log
-rw-r--r-- 1 vmail vmail 282 Jul 9 20:18 /var/log/maildroprc.log

Elly

----------------------------------------
Working Towards United States Of Africa
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
procmail can't write Hellbound General 27 8th June 2009 21:51
ISPConfig 2.2.14 released till General 48 19th July 2007 23:46
Postfix reject connections gabrix Server Operation 27 25th January 2007 08:37
Core 4: Error Messages on Fresh Install re CTX/SSL jjw Installation/Configuration 30 6th September 2006 12:16
Problem with the apache (I can't start ist) M.Behrens Installation/Configuration 11 31st March 2006 10:48


All times are GMT +2. The time now is 14:14.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.