0

I'm having some trouble with postfix and SASL when using a MySQL backend on an Ubuntu server.

auth.log

Oct 12 13:25:21 lvps92-60-121-255 postfix/smtpd[28508]: sql auxprop plugin using mysql engine
Oct 12 13:25:21 lvps92-60-121-255 postfix/smtpd[28508]: SQL engine 'mysql' not supported
Oct 12 13:25:21 lvps92-60-121-255 postfix/smtpd[28508]: auxpropfunc error no mechanism available
Oct 12 13:25:21 lvps92-60-121-255 postfix/smtpd[28508]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sqlite

/etc/postfix/sasl/smtpd.conf

pwcheck_method: saslauthd
mech_list: plain login cram-md5 digest-md5
log_level: 7
allow_plaintext: true
auxprop_plugin: mysql
sql_engine: mysql
sql_hostnames: 127.0.0.1
sql_user: postfix
sql_passwd: (password)
sql_database: postfix
sql_select: select password from mailbox where username = '%u@%r'

Since the POP/IMAP configuration works and can connect I'm a bit stumped. The only references I can find to this error are trailing spaces at the end of each line, which I've checked for. I'm using Ubuntu. Does anyone have an idea of where I'm going wrong?


Edit: it looks like I'm missing an appropriate libmysql.so (guessing the name) in /usr/lib/sasl2 (where there is a libsqlite.so and a libsql.so). How can I get this?

Ross
  • 173
  • 2
  • 11

3 Answers3

2

You have error in the smtpd.conf, it should be looks like

pwcheck_method: auxprop
mech_list: PLAIN LOGIN CRAM-MD5
auxprop_plugin: sql
sql_engine: mysql
sql_hostnames: localhost
sql_user: postfix
sql_database: postfix
sql_passwd: password
sql_select: select password from mailbox where username = '%u@%r'
log_level: 3

Note: auxprop_plugin should be sql and not mysql

All you need is to install libsasl2-modules-sql

# apt-get install libsasl2-modules-sql
ALex_hha
  • 7,193
  • 1
  • 25
  • 40
1

You need the MySQL package for (Cyrus) SASL. In Debian derived distributions it is named libsasl2-modules-sql.

This is because it has nothing to do with Postfix' MySQL interface.

mailq
  • 17,023
  • 2
  • 37
  • 69
-1

You likely need to install the package postfix-mysql (or something similar, that's the Debian name).

Sven
  • 98,649
  • 14
  • 180
  • 226
  • I do feel like I am missing a package but I have `postfix-mysql` installed - can you think of any others that might be relevant? – Ross Oct 12 '11 at 13:05
  • run `yum list available | grep postfix | grep mysql` and see if anything looks promising. If not, do the same for `yum list available | egrep 'postfix|mysql'`. – Kevin M Oct 12 '11 at 19:22
  • Sorry, should have noted I'm using Ubuntu. I ran `apt-cache pkgnames | grep postfix | grep mysql` and that only returned "postfix-mysql". – Ross Oct 12 '11 at 20:24
  • It looks like I'm missing `/usr/lib/sasl2/libmysql.so` (guessing the name) - isn't this installed by `mysql-client`/`libsasl2-modules-sql`? – Ross Oct 12 '11 at 20:30