Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Courier-Pop, with authmysql, and MySQL 4.1.x

Status
Not open for further replies.

shadedecho

Programmer
Oct 4, 2002
336
US
I have courier-pop installed on my debian system, along with newly installed mysql 4.1.8. I cannot get courier-pop to talk to this version of mysql. The username and password are correct, and it has permission to read the database and tables. In fact, I can issue command line mysql statments on the machine similar to what i would have expected the courier-authdaemon to have done, and I get no errors.

However, when I try to POP my mail box from my local machine, using the username and password in the mysql table, it fails to authenticate, and i get:

Dec ???????? shared authdaemond.mysql: failed to connect to mysql server (server=127.0.0.1, userid=mailman)
Dec ???????? shared courierpop3login: LOGIN FAILED, ip=[::ffff:xxx.xxx.xxx.xxx]

in /var/log/mail.err

where ????... is the timestamp and xxx.xxx... is the IP address of my local machine that I am trying to POP from to my mail server.

It says "failed to connect" which leads me to believe that something about courier is unable to connect to a mysql 4.1 server for some reason. Anyone know what's up?

I have identical tables (with identical usernames and passwords, etc) over in a mysql 4.0.22 server on an adjacent machine, and when i instead point this courier mail server at that mysql instance, everything works just fine, so I know it's not something with my courier setup.
 
Can you log in to mysql using "-h localhost" *and* "-h 127.0.0.1"?
 
yes. and I can log in on the command line WITH the username and password that I am specifying in my /etc/courier/authmysqlrc file.

Here's more information, which I think is at the root cause of this...

I am using MySQL 4.1.8, compiled with UTF-8 character set as default.

/var/log/mail.info:

????????????? shared authdaemond.mysql: ^GFile '/usr/share/libmysqlclient/charsets/?.conf' not found (Errcode: 2)
????????????? shared authdaemond.mysql: ^GCharacter set '#33' is not a compiled character set and is not specified in the '/usr/share/libmysqlclient/charsets/Index' file

Character set #33 is apparently the UTF-8 character set. The problem is that mysql 4.1.8 does not install those files in the way that authdaemon is apparently expecting them. Apparently, now, the MySQL 4.1.x servers use .xml files to specify the character sets.

Apparently, the debian packages of courier-authdaemon do not have UTF-8 character set support compiled into them. So I guess it's trying to use mysql server's character set definitions, and failing.

So, I was surmising that maybe all I needed to do was recompile ONLY the authdaemon program for mysql to have UTF-8 character set support in it inherently.

However, as I am looking into this option, I'm not sure if this is possible, or will even work if it was. I downloaded the source for Courier, which apparently builds ALL the packages, and I have no idea how to re-build JUST the authdaemon program.

Frankly, I am way out of my league here, I do well to be able to install packages, or on occasion compile a program from source if it's not too complicated.

I'm crying out into the wilderness to see if anyone knows how I can get around this problem, other than simply back-versioning MySQL to 4.0.x which i KNOW works.

 
Okay, one more question: Can you login to mysql with "-u mailman -h xxxxxxx -p" where xxxxxxx is the ip address of your machine as you stated in your original post. I'm asking because most of these problems are usually related to grant permissions and the fact that a connection via local socket and over then network have to be granted rights seperately.
 
from my last post:
yes. and I can log in on the command line WITH the username and password that I am specifying in my /etc/courier/authmysqlrc file.

i have verified this has nothing at all to do with login permissions. I can login via the mysql command line to BOTH servers, local and via networking, with the same credentials as I am specifying in the authmysqlrc file.

I do know about how you have to grant permissions separately. I took care to have the exact same permissions on both servers to minimize the chance of having this be a stupid gotcha like that.
 
You also have some important issues with making sure that you've made the libmysqlclient library (or whatever the libraries are that have multiple levels of dependence).

Basically my understanding is that the libraries from mysql are compiled into a library for either courier or vpopmail and then vpopmail/courier looks at that. If you didn't get the compile correct, you're SOL. Obviously your MySQL is OK.

I would recommend that you view Michael Bowe's install to see his steps on courier and vpopmail.





Hosting Solutions for Home or Business.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top