LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 07-08-2008, 05:44 AM   #1
eliufoo
Member
 
Registered: Oct 2007
Posts: 71

Rep: Reputation: 15
Postfix


Hi guys,

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
Please assist.

regards,
Elly
 
Old 07-08-2008, 04:11 PM   #2
BlueC
Member
 
Registered: Aug 2007
Posts: 122

Rep: Reputation: 17
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...
 
Old 07-08-2008, 06:15 PM   #3
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 63
Actually, courier will not create Maildirs. You must use maildirmake for that.

Postfix will create the Inbox Maildir if none exists, so the Welcome message as indicated by BlueC is a good method.
 
Old 07-09-2008, 12:58 PM   #4
eliufoo
Member
 
Registered: Oct 2007
Posts: 71

Original Poster
Rep: Reputation: 15
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, 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.

Quote:
[root@helen ~]# ls -l /var/log/maildroprc.log
-rw-r--r-- 1 vmail vmail 282 Jul 9 20:18 /var/log/maildroprc.log
Mr. C and BlueC, thanks for you advise. I'm using postfixadmin welcome message to create maildir for users.

Regards,
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Postfix send mail problem(In RH9, kernal 2.4.20, postfix 2.1.5) minor Linux - General 6 09-23-2019 10:09 PM
Postfix error: /usr/lib/postfix/smtpd pid 7529 exit status 1 Chiragrs Linux - Networking 7 05-16-2008 12:42 AM
Postfix Configuration Question: Postfix server as a catch-all on office LAN enso491 Linux - Server 5 04-14-2008 04:35 PM
Starting postfix: Postfix integrity check failed! Leirith Linux - Software 2 01-02-2008 09:55 PM
Postfix - how do hosted domains download their mail from my postfix franschoek Linux - Software 1 04-01-2006 09:41 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:02 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration