SMTP server (pop/imap) interaction with Postfix/MySQL[5.0.51] (Ubuntu Hardy)
Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
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.
SMTP server (pop/imap) interaction with Postfix/MySQL[5.0.51] (Ubuntu Hardy)
Hi,
Newbie here, both to mail and Linux, please move this thread to a more appropriate place if necesary.
The problem: I have postfix installed on this remote server that I have SSH access to, and I believe I can get it (postfix) working by itself. Now, I want to use thunderbird to read/send mail, and extend this capability to other users.
What I have done so far:
-----------------------
Step 1:
------
Installed postfix using apt-install, worked OK. The test: I have 2 user accounts, "a" and "b". I have had a "~b/.forward" file that contained the line "b@gmail.com". Logging in as user "a", I could send e-mail to "b@clinicaldb.com" as well as "b@gmail.com". This said (a) User "a" can send e-mail internally and to external addresses (b) User "b" can receive e-mail and (c) Postfix can read the ".forward" file to forward e-mail to external addresses.
Step 2:
------
Following the instructions/tutorials at the server provider, I installed SASLDauth and Courier; generated a self signed certificate, reconfigured the iptables to allow access to the ports. I already have had MySQL. So I created a "mailadmin" user to access the DB, and a vmail account to save mail. If you want me to go back through this process, I can repeat it and give the details. End result: Thunderbird said "Invalid login". Trying to mail locally failed, logs said MySQL authentication failure. Rolling back the "main.cf" file (to that of Step 1) and restarting postfix starts the mail - but I cannot access it from outside world.
Step 3:
------
I followed the steps outlined at "http://flurdy.com/docs/postfix/", installed all the components. At the very 1st level of testing, postfix is failing. Here is the output while testing with telnet (It worked before, I messed up something and dont know how to fix it)
-----------------------------------
$ telnet clinicaldb.com 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 clinicaldb.com ESMTP Postfix (Ubuntu)
EHLO clinicaldb.com
250-clinicaldb.com
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH LOGIN PLAIN
250-AUTH=LOGIN PLAIN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
MAIL FROM: <cdbuser@clinicaldb.com>
250 2.1.0 Ok
MAIL TO: <sengupta@clinicaldb.com>
503 5.5.1 Error: nested MAIL command
QUIT
221 2.0.0 Bye
Connection closed by foreign host.
-----------------------------------
I cannot figure out how to debug this "nested MAIL command". Checking the aliases, I do not see any circular alias. The files in /var/log/ mail.[log|err|info] does not tell me anything. This is where I need help, to continue.
Thank you, bakdong. That was one silly mistake on my part. I couldnt figure out the error message. I got that one fixed - and hopefully got postfix running. Testing the system, I can send mail outside with postfix, I can receive it, too; I see the folder /home/vmail/sengupta created (vmail is the virtual user, sengupta the real one). A subdirectory "new" contains the mail in a text format.
Here is the problem - I cannot be sure if Courier/SASL/PAM - the whole set up can read any email from thunderbird, I cannot get thunderbird to login and receive mail. From all the set ups and editing I have done, here are the issues I see:
An aside: With my limited knowledge of Linux, I was going through the set up - and observed this: MySQL encrypt() function takes an optional 2nd argument - the salt. If not supplied, a random string is used. Now, if I do not supply a salt, MySQL is going to generate pretty much a random string, and PAM has no way of knowing what the salt is - so I do not see a logical way how this authentication is done. May be I am missing something trivial again, any comments on this? Thanks a lot, - M.S.
I've not done this config myself so can only give you very general pointers I'm afraid. Apart from saying that you've got an authentication problem, which I'm sure you already know, it's a case of having to go through every step again, checking as you go and splitting the process into logical steps.
Can you (or any other expert) tell me a config that worked with MySQL 5.+. If I cannot get this going, I have to give up on MySQL and try something else. Any suggestions for a feasible config? Thanks, - M.S.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.