Postfix won't move mail from /var/spool/mail to /home/vmail
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.
Postfix won't move mail from /var/spool/mail to /home/vmail
I have postfix setup for virtual domains with mysql, and its accepting email fine, just dumping it in /var/spool/mail. It's not doing me much good there, it needs to end up in /home/vmail/%domain%/%user%. I've checked the config over several times and am not finding anything. Anyone have any ideas?
Let's start by posting the output of "postconf -n" and relevant lines from the logs showing what happens to a typical email addressed to a virtual domain (from receipt of mail to delivery).
The problem is that the domain you're sending to is listed in mydestination, which means that the local delivery agent will be called to deliver to it:
Code:
Mar 4 20:11:16 radio276 postfix/local[2079]: 4EDB2444E20: to=<asmith@radio276.com>, relay=local, delay=0, status=sent (delivered to mailbox)
Instead, that domain should be listed in virtual_mailbox_domains and only there.
Somethings wrong with the authentication then. There's nobody sending mail from the network the server is on so I didn't bother putting it in $mynetworks. Any suggestions where to look?
You should be familiar with the sasl readme, which also explains how to test sasl. So, briefly, you would telnet to port 25 (e.g. "telnet localhost 25"), make sure that you see AUTH in the postfix greeting (and the mechanisms you expect, e.g. PLAIN), authenticate to the server, and, in case the authentication fails, read the log files to see what the complaint is.
Something you should consider after you get things working is "smtpd_tls_auth_only = yes", which advertises AUTH only after the client establishes tls. That way, you could just use PLAIN passwords, and not worry about their being trasmitted in the clear.
[Edit]
One more thing. Windows clients don't understand PLAIN. You have to include LOGIN in the mechanisms.
From the log below, it looks like it has issues getting the data out of the DB. Apparently its dropping the domain name out of the query. I've checked the config, can't seem to find where that's set, so I'm out of ideas. Suggestions where to look?
Mar 6 10:03:24 radio276 authdaemond: received auth request, service=smtp, authtype=login
Mar 6 10:03:24 radio276 authdaemond: authmysql: trying this module
Mar 6 10:03:24 radio276 postfix/smtpd[30204]: warning: SASL authentication failure: Password verification failed
Mar 6 10:03:24 radio276 postfix/smtpd[30204]: warning: localhost.localdomain[127.0.0.1]: SASL plain authentication failed
Mar 6 10:03:24 radio276 authdaemond: SQL query: SELECT email, password, "", 5000, 5000, "/home/vmail", CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/'), quota, "", "" FROM users WHERE email = "jmoschetti.com"
Mar 6 10:03:24 radio276 authdaemond: zero rows returned
Mar 6 10:03:24 radio276 authdaemond: no password available to compare
Mar 6 10:03:24 radio276 authdaemond: authmysql: REJECT - try next module
Mar 6 10:03:24 radio276 authdaemond: FAIL, all modules rejected
Looks like you're using the Courier authdaemon to authenticate. If so, you should use authtest to perform your tests. Read its man page. The config files you're looking for should be in /etc/authlib/, possibly /usr/local/etc/authlib/. The sql query is defined in authmysqlrc, but instead of doing a query, I suggest that you use the default table as described here. You would have had an easier time had you started with a simple setup, i.e. authenticating against userdb, before moving to mysql.
There's nothing wrong with the server actually. Turns out the problem was on my end. The university doesn't like to allow you to use an SMTP server besides theirs, so they modify the packets (had a lengthy discussion/bitching session with the techies). I enabled SSL SMTP on port 465 to avoid that, works now
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.