1

I've got a task of migrating one mail server from one box to another and so far I have configured Postfix and it's working. But, Courier pop3d server fails without exception.

So, I have Courier pop3d server which needs to authenticate user agains MySQL database.

/var/log/maillog

Oct 20 03:40:09 vps-1161420-22112 pop3d: Connection, ip=[::ffff:127.0.0.1]
Oct 20 03:40:15 vps-1161420-22112 pop3d: LOGIN: ip=[::ffff:127.0.0.1], command=USER
Oct 20 03:40:21 vps-1161420-22112 pop3d: LOGIN: ip=[::ffff:127.0.0.1], command=PASS
Oct 20 03:40:21 vps-1161420-22112 pop3d: LOGIN: ip=[::ffff:127.0.0.1], username=noreply@domain.tld
Oct 20 03:40:21 vps-1161420-22112 pop3d: LOGIN: ip=[::ffff:127.0.0.1], password=some-foo
Oct 20 03:40:21 vps-1161420-22112 authdaemond: received auth request, service=pop3, authtype=login
Oct 20 03:40:21 vps-1161420-22112 authdaemond: authmysql: trying this module
Oct 20 03:40:21 vps-1161420-22112 authdaemond: stopping authdaemond children
Oct 20 03:40:21 vps-1161420-22112 authdaemond: restarting authdaemond children
Oct 20 03:40:21 vps-1161420-22112 authdaemond: modules="authmysql", daemons=5
Oct 20 03:40:21 vps-1161420-22112 authdaemond: Uninstalling authmysql
Oct 20 03:40:21 vps-1161420-22112 authdaemond: Installing libauthmysql
Oct 20 03:40:21 vps-1161420-22112 authdaemond: Installation complete: authmysql
Oct 20 03:40:22 vps-1161420-22112 pop3d: LOGIN FAILED, user=noreply@domain.tld, ip=[::ffff:127.0.0.1]
Oct 20 03:40:22 vps-1161420-22112 pop3d: authentication error: Input/output error

The last two lines of don't say much on what could the IO error actually be.

I have configured mysql connection within file: /etc/authlib/authmysqlrc:

MYSQL_SERVER            localhost
MYSQL_USERNAME          postfix
MYSQL_PASSWORD          some-password
....
other mysql settings

I have verified that I can connect to MySQL itself using there credentials.

So, is there some way to increace verbosity of pop3d or authmysql? I have set DEBUG_LOGIN=2 in authdaemonrc file.

Thank a lot!

Jovan Perovic
  • 123
  • 1
  • 3
  • 13

1 Answers1

1

I was able to resolve this myself.

The key issue is that I built courier-authlibbinaries on my dev box but my production box had mysql-5.5.* and my dev box had mysql-5.6.*.

Obviously, the difference between lib files caused the authmysql to crash when invoked...

Hope this will be helpful to someone...

Jovan Perovic
  • 123
  • 1
  • 3
  • 13