Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a very basic Courier installation set up with three virtual accounts: admin@, info@, and jay@ourdomain.com. Admin@ is the default account which receives a ton of spam. Info@ is used for our contact form. jay@ is used as the client's personal account for the website.

I have established a unix account for admin, info, and jay using the following command: useradd -s /sbin/nologin info. I then assigned a password using the passwd command. Very basic stuff for you guys I'm sure.

The postfix install is a generic, almost out of the box.

The admin@ and info@ accounts work fine using Thunderbird and Outlook. For some reason though, it complains the password is incorrect for jay@. I have tried deleting jay and re-creating, and assigning a different password (abcdefg), and it still fails. Now I've tried creating a new account named 'thejay' with a new password, updated the /etc/postfix/virtual file to include the new account, and restarted postfix just to be sure. Invalid password for thejay? What's going on?

I don't even know where to begin looking. Server is running ubuntu 10.0x if that helps.


Requested to look at the mail logs to see what's going on, and there is definitely something wrong. One specific line complains "no such file or directory", but does not specify the directory. I am really just not sure what to do

Log Results (Domain and IP are fake):

mail.log
Feb 12 16:23:50 mydomain imapd: Connection, ip=[::ffff:0.255.0.255]
Feb 12 16:23:52 mydomain imapd: LOGIN FAILED, user=jay, ip=[::ffff:0.255.0.255]
Feb 12 16:23:53 mydomain imapd: LOGOUT, ip=[::ffff:0.255.0.255], rcvd=46, sent=325

mail.info
Feb 13 10:25:37 mydomain imapd: chdir Maildir: No such file or directory
Feb 13 10:25:37 mydomain imapd: jay: No such file or directory
Feb 13 10:25:37 mydomain imapd: LOGIN FAILED, user=jay@mydomain.com, ip=[::ffff:0.255.0.255]

mail.error
Feb 12 15:59:06 mydomain  imapd: jay: No such file or directory
Feb 12 16:00:23 mydomain  last message repeated 7 times
Feb 12 16:01:29 mydomain  last message repeated 5 times
Feb 12 16:02:30 mydomain  last message repeated 9 times
share|improve this question
    
What authentication method are you using? Older version of courier have problems with "encrypted password" (CRAM-MD5). –  Chris S Feb 14 '13 at 3:07
add comment

1 Answer

You should look in your /var/log/mail.log or any mail.* files which may tell you what the problem is.

In this case, the error is that there is no user home directory so Maildir is not able to create the directory where to save/read the emails.

When I create users for this purpose of mailbox, I do

adduser --shell /bin/false joe

/sbin/nologin should be fine too. But I use adduser instead of useradd as it's friendlier. But with useradd, if you give "-d -m" parameters then it will create the user home directory.

I can't guarantee that this is the "best practice" but I know it works.

share|improve this answer
    
Updated with some log results, although I really don't know how to look into the issues reported. Also, forget I said bob, I was trying to keep the name "jay" out of this for privacy but screwed up. It doesn't matter anyway, just a common first name. –  RadGH Feb 13 '13 at 20:31
1  
Ah, looks like you did not create a home directory for the user. –  ETL Feb 13 '13 at 21:10
1  
When I create users for this purpose of mailbox, I do adduser --shell /bin/false joe /sbin/nologin should be fine too. But I use adduser instead of useradd as it's friendlier. But with useradd, if you give "-d -m" parameters then it will create the user home directory. To create a home directory for your existing user, without having to delete and recreate it, try sudo useradd -D --base-dir /home/new_user as per askubuntu.com/questions/152707/… –  ETL Feb 13 '13 at 21:15
    
Thank you for the suggestions. I have tried creating the directory following this page: ubuntuforums.org/showthread.php?p=9415204 - However, that did not resolve the problem. I created another account using the adduser command you provided (which seemed much more detailed), and added the account to the virtual file + reloaded/restarted the service. Doesn't work that way either. I'm thinking it is a config error, I will have someone else take a look at this I guess. I'm clueless. –  RadGH Feb 13 '13 at 22:02
    
On this other user you created: 1) do you have /home/joe directory? 2) what shows up in the log now? Same thing? –  ETL Feb 13 '13 at 23:24
show 1 more comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.