Courier issues: no such file or directory when testing IMAP and POP
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.
Courier issues: no such file or directory when testing IMAP and POP
Using the following software:
Ubuntu Server 8.04
SquirrelMail 1.4.13
Postfix 2.5.1
Courier 0.59.0 (Courier-IMAP 4.3.1)
Apache2 2.2.8
I've installed a mail server per the instructions at http://howtoforge.com/virtual-users-...ail-ubuntu8.04. Neither POP nor IMAP test successfully with the user that I just added after following the setup instructions.
IMAP:
# telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
* OK [CAPABILITY IMAP4rev1 UIDPLUS CHILDREN NAMESPACE THREAD=ORDEREDSUBJECT THREAD=REFERENCES SORT QUOTA IDLE ACL ACL2=UNION STARTTLS] Courier-IMAP ready. Copyright 1998-2008 Double Precision, Inc. See COPYING for distribution information.
01 LOGIN testuser@mydomain.dom Testpassword
* BYE [ALERT] Fatal error: mydomain.com/testuser/: No such file or directory
Connection closed by foreign host.
POP:
# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
+OK Hello there.
user testuser@mydomain.com
+OK Password required.
pass Testpassword
-ERR chdir mydomain.com/testuser/ failed
Connection closed by foreign host.
This doesn't make any sense. I added the user to the mysql database:
And after I did that, I ran the postfix reload command. If I try to log in as firstuser@mydomain.com, which is the user I created during the setup and configuration process, it works fine.
I checked the virtual mail account's home folder, and under the mydomain.com folder, I only see a folder for firstuser. I'd create one for testuser manually, but I don't know if that'll work since it seems to contain a particular folder structure of its own.
What am I missing? Is there some other command that I have to run? I don't recall having to do anything additional when setting up firstuser.
A couple of hints:
1 - look very carefully at the .cnf files you created. Look for any odd ' or ` characters as these don't translate well and any blank spaces at the end of the lines.
2 - there may be an issue with the setup (main.cf) for your virtual user mappings.
3 - What process did you use to create the first user and how does it differ from the second? You appear to be really close to having your server functional if the first user works correctly.
4 - look in your mail.log for any error messages. Sometimes they can be cryptic but any sort of error or warning is a clue that something (a configuration file usually) has a bug in it.
You may be able to turn on debugging in courier (check the documentation to see what it supports and how) which may provide more information regarding what is happening.
If you change anything in postfix's main or master.cf postfix reload will cause it to refresh the configuration files. Since you are using virtual users, you should be able to add one via the database and not have to do anything with postfix.
Lets try this. Send a test email via the first user, the one that is working, and then attempt to send one that is not working. Next, take a loot at your log (probably /var/mail.log) and you should see about 10 lines associated with those two access attempts. Copy those lines, removing any information your not comfortable posting on the forum, such as an email address, and lets take a look at what errors you are getting.
You probably have something simple that isn't quite right, but without the error information we are only guessing as to what. Focus on sending mail first which uses the Postfix portion of the system. Next, we will look at receiving mail which involves courier.
If you would like an example of what I meant by ` back ticks and ' single quotes, look at your reply to me. Half of the entries in your lines contain ` marks which your database program will choke on as these need to be single quotes. If you got one or more of these wrong (e.g. copied and pasted text from the how to) on your second user it is possible that is the problem.
Interesting, I think I figured it out. One thing I did that I didn't mention is that I used mailx to send a test email to the first account. I did not do that with the second account.
I got the second account working by copying the first user's folder structure and removing any mail items within it. That worked. But for the hell of it, I created a third user in the MySQL table. As expected, no folder popped up. So I used mailx to send an email to it. Sure enough, the folder structure for the third user was automatically created.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.