Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm testing new settings for my mailserver using Virtual Users With Postfix, PostfixAdmin, Courier, Mailscanner, ClamAV On CentOS.
All appears well, except that courier-imap or postfixadmin is not creating maildir for users. Hence, I'm getting the following pop3 error when login 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
Try sending an email to the address first and if everything is setup correctly then courier-imap will create the Maildir. You can automate this in postfixadmin by setting postfixadmin to send a welcome email when a new account is setup.
If it still doesn't work after sending an email to the address then there is something else amiss...
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)
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, s
tatus=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, s
tatus=deferred (mail transport unavailable)
I solved this by changing the ownership of maildroprc.log file from root to vmail.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.