Nathan Zabaldo wrote:
have you checked the location of your mysql socket?!


/var/run/mysqld/mysqld.sock


what about posix?


Total novice here on linux.  Not sure what that means?

Mysql will allow either unix-sockets via /var/run/mysqld/mysqld.sock and/or via network sockets. The latter is only allowed if you comment out 'skip-networking' in /etc/mysql/my.cnf or an option of similar meaning. Mysql installations on debian will have networking disabled by default.

has dbmail/postfix the right to reach that socket file if it exists?

Dbmail does have the right to talk to mysql. Otherwise the daemons wouldn't start, and you wouldn't be able to list users with dbmail-adduser.



/var/run/mysqld is owned by mysql:mysql and the permissions are drwxr-xr-x
How do I give dbmail and postfix permission to access the file

You don't. The actual mysqld.sock is world-writable and it should. Access to mysql is managed through grant statements in sql.

The x's are of course replaced with accurate information for accessing the
database.  I can connect from a command with the same username and pass.
Under POP the effective user is root and the effective group is mysql.  Same
with Imap.  What should they be set to?  Clearly my issue is connecting to
mysql from postfix and dbmail.

Why did you change the effective users and groups? They were set to dbmail:dbmail for very good reasons. *Never* run dbmail as effective user root. Effective group mysql is almost just as bad! Change them now.

Basic strategy:

make sure you can connect to mysql with the exact parameters you specify in dbmail.conf and your postfix sql_recipients.cf file. That is: don't just specify the user and password, but also specify the hostname. You might have an .my.cnf installed somewhere that changes the hostname without you realizing it. Probably not in your case, but be specific.

Once you are certain you can connect, start dbmail's daemons. If they run (assuming you use the debian init scripts) you know for sure that dbmail-adduser, and the daemons can connect just fine. The debian init scripts use the dbmail-adduser to test the connection parameters and only then start the daemons. If all that works, your dbmail.conf is clean.

Don't use the same user/password in sql_recipients.cf as you use in dbmail.conf. Use a separate, less privileged mysql user with readonly access to just the aliases table. I repeat: don't use the mysql user specified in dbmail.conf for anything but trivial testing.

If you can connect from the commandline with the parameters in sql_recipients.cf but postfix can't, check the permissions on that file.

If all this doesn't help: set trace_level=5 everywhere in the dbmail.conf, and 
send us your syslogs and configs.

--
  ________________________________________________________________
  Paul Stevens                                  mailto:[EMAIL PROTECTED]
  NET FACILITIES GROUP                     PGP: finger [EMAIL PROTECTED]
  The Netherlands________________________________http://www.nfg.nl

Reply via email to