Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 19th April 2006, 20:03
JhonF JhonF is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Virtual Users And Domains With Postfix, Courier And MySQL

Hi, I followed the tutorial but I still have a problem:

Apparently the courier and postfix can accede without problems to the mysql DB (the telnet 25 work fine), but when I want to access pop3 the mail.err says:

Apr 19 11:25:13 localhost courierpop3login: LOGIN FAILED, ip=[::ffff:192.168.0.2 31]

And the mysql.log:

SELECT email, "", password, 5000, 5000, /home/vmail, CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',-1),'/'), "", "", "" FROM users where email = "user@virtual.test"


I believe that the error is in this SQL sentence, but how I make to modify it?
Thanks.
Reply With Quote
Sponsored Links
  #2  
Old 19th April 2006, 21:12
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,344
Thanks: 810
Thanked 5,173 Times in 4,055 Posts
Default

If you execute this query in e.g. phpmyadmin, which result do you get?
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 20th April 2006, 12:01
arajasi arajasi is offline
Junior Member
 
Join Date: Apr 2006
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi everyone,

I have the same problem with courier.
If I execute the query, mysql returns this error message:

#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '/home/vmail, CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING

Any suggestions?

Thanks.
Reply With Quote
  #4  
Old 20th April 2006, 14:39
JhonF JhonF is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

phpMyAdmin says:

SQL query:
SELECT email, "",
PASSWORD , 5000, 5000, / home / vmail, CONCAT( SUBSTRING_INDEX( email, '@' , -1 ) , '/', SUBSTRING_INDEX( email, '@' , -1 ) , '/' ) , "", "", ""
FROM users
WHERE email = "user@virtual.test"
LIMIT 0 , 30

MySQL said:
#1064 - You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near '/home/vmail, CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING.

I believe that Courier is constructing a bad SQL sentence, but I dont know why.


This is my /etc/courier/authmysqlrc

MYSQL_SERVER 127.0.0.1
MYSQL_USERNAME provider_admin
MYSQL_PASSWORD *****
MYSQL_PORT 0
MYSQL_OPT 0
MYSQL_DATABASE provider
MYSQL_USER_TABLE users
MYSQL_CLEAR_PWFIELD password
MYSQL_UID_FIELD 5000
MYSQL_GID_FIELD 5000
MYSQL_LOGIN_FIELD email
MYSQL_HOME_FIELD /home/vmail
MYSQL_MAILDIR_FIELD CONCAT(SUBSTRING_INDEX(email,'@',-1),'/',SUBSTRING_INDEX(email,'@',1),'/')

thanks
Reply With Quote
  #5  
Old 20th April 2006, 16:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,716 Times in 2,558 Posts
Default

What's in /etc/pam.d/smtp?
I see that your /etc/courier/authmysqlrc is not the same than in the tutorial. Please copy the one from the tutorial (only change the MySQL user, password and database).
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #6  
Old 21st April 2006, 19:12
JhonF JhonF is offline
Junior Member
 
Join Date: Apr 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

It is working!!

I decided to begin the tutorial from the beginning, and now it works well. I was due to have forgotten some the steps.

Falko, Thanks for this tutorial. I have test many of which there are in the web, but this one was the unique one that worked.

A few (add) questions:
- What about Auto-Answers ? (for example, when the user is in vacations)
How it would be possible to be implemented with the structure that we have?

- What about alias ? Not forwardings, alias.

Thanks!
Reply With Quote
  #7  
Old 22nd April 2006, 16:39
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,716 Times in 2,558 Posts
 
Default

Quote:
Originally Posted by JhonF
- What about Auto-Answers ? (for example, when the user is in vacations)
How it would be possible to be implemented with the structure that we have?
http://www.howtoforge.com/forums/showthread.php?t=2622
Have a look here: http://www.howtoforge.com/forums/showthread.php?t=2622
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota... killfrog HOWTO-Related Questions 3 25th September 2009 21:45
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53
Another Problem: Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP bluegrass Installation/Configuration 24 8th March 2006 01:41
Virtual Users And Domains With Postfix, Courier And MySQL (+ SMTP-AUTH, Quota, SpamAs Rocky Installation/Configuration 24 9th February 2006 11:08


All times are GMT +2. The time now is 23:06.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.