SMTP problems

Discussion in 'Installation/Configuration' started by Uzelth, Jan 31, 2008.

  1. Uzelth

    Uzelth New Member

  2. topdog

    topdog Active Member

    Seems like a SASL misconfiguration, check the logs to see what is going on and double check that you followed the SASL section of the how to properly.
     
  3. Uzelth

    Uzelth New Member

    Okay, here's some more info:

    /var/log/mail.log
    Code:
    Jan 31 15:47:57 elerosse postfix/smtpd[2248]: connect from removed[82.34.114.43]
    Jan 31 15:47:58 elerosse postfix/trivial-rewrite[2252]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Jan 31 15:47:58 elerosse postfix/trivial-rewrite[2252]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Jan 31 15:47:58 elerosse postfix/trivial-rewrite[2252]: fatal: mysql:/etc/postfix/mysql-virtual_domains.cf(0,lock|fold_fix): table lookup problem
    /etc/postfix/mysql-virtual_domains.cf
    Code:
    user = removed
    password = removed
    dbname = removed
    query = SELECT domain AS virtual FROM domains WHERE domain='%s'
    hosts = localhost
    TABLE domains
    Code:
    +--------+-------------+------+-----+---------+-------+
    | Field  | Type        | Null | Key | Default | Extra |
    +--------+-------------+------+-----+---------+-------+
    | domain | varchar(50) | NO   | PRI |         |       |
    +--------+-------------+------+-----+---------+-------+
    1 row in set (0.00 sec)
    SQL query and results
    Code:
    mysql> SELECT domain AS virtual FROM domains WHERE domain='removed.com';
    +-------------+
    | virtual     |
    +-------------+
    | removed.com |
    +-------------+
    1 row in set (0.00 sec)
    Everything appears to be in order, so the error in mail.log is a tad baffling... I fixed a problem in /etc/pam.d/smtp which resolved the SASL error, now it just hangs when sending.

    I tried changing the host to 127.0.0.1 again, but that just gives a mysql error again :\
     
    Last edited: Jan 31, 2008
  4. topdog

    topdog Active Member

    The problem is postfix cannot connect to the mysql database to get the virtual information double check that you can connect using the username and password also check that the socket it is trying to use exists.
     
  5. falko

    falko Super Moderator Howtoforge Staff

    What's the output of
    Code:
    netstat -tap
    ?
     

Share This Page