Postfix, Mysql errors - email not working

Discussion in 'Installation/Configuration' started by bluebirdnet, Dec 1, 2009.

  1. bluebirdnet

    bluebirdnet Member

    Hi,

    I have installed ispconfig3 on a Debian Lenny box. I followed the howto on this site and everything else seems to work correctly except receiving emails for configured domains.

    The only change i made was to set Postfix (main.cf) to listen on all interfaces instead of loopback, or should it be on loopback?

    I have alot of errors in in my mail.log and mail.err below is a sample of some of the errors.

    mail.log
    Code:
    Nov 30 11:35:06 zork postfix/error[13013]: warning: connect to mysql server *.*.108.144: Can't connect to MySQL server on '209.4$
    Nov 30 11:35:06 zork postfix/error[13013]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup p$
    Nov 30 11:35:07 zork postfix/qmgr[12936]: 982274A00875: to=<[email protected]>, orig_to=<root>, relay=none, delay=889720, de$
    Nov 30 11:38:16 zork postfix/qmgr[12936]: warning: connect to mysql server *.*.108.144: Can't connect to MySQL server on '209.44$
    Nov 30 11:38:16 zork postfix/qmgr[12936]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup pr$
    Nov 30 11:38:17 zork postfix/master[23520]: warning: process /usr/lib/postfix/qmgr pid 12936 exit status 1
    
     
    Last edited: Dec 6, 2009
  2. bluebirdnet

    bluebirdnet Member

    hi just an update I have solved most of my problems except for one.

    Turns out i had my external ip configured in Postfix, Amavis and in ISPconfig in Server Config. I configured Postfix and Amavis with localhost.

    Also my hosts file was all wrong.

    So if anyone knows what this error is ?

    Code:
    Dec  1 14:33:59 zork postfix/trivial-rewrite[2067]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
     
  3. falko

    falko Super Moderator Howtoforge Staff

    Please make sure that the MySQL details in /etc/postfix/mysql-virtual_relaydomains.cf are correct.
     
  4. bluebirdnet

    bluebirdnet Member

    Hey Falko thanks for reply.

    all the cf files have the same credentials and host. Is there suppose to be something in this field in the db ?

    here is the content of that file.

    user = ispconfig
    password = ********
    dbname = dbispconfig
    table = mail_transport
    select_field = domain
    where_field = domain
    additional_conditions = and active = 'y' and server_id = 1
    hosts = localhost
     
  5. bluebirdnet

    bluebirdnet Member

    here is the output of mail.log , cant figure this out?!

    Code:
    Dec  2 15:46:05 zork postfix/trivial-rewrite[9685]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Dec  2 15:46:05 zork postfix/trivial-rewrite[9685]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Dec  2 15:46:05 zork postfix/trivial-rewrite[9687]: warning: connect to mysql server localhost: Can't connect to local MySQL server through socket '/var/run/mysqld/mysqld.sock' (2)
    Dec  2 15:46:05 zork postfix/trivial-rewrite[9687]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
    Dec  2 15:46:06 zork postfix/smtpd[8654]: warning: problem talking to service rewrite: Success
    Dec  2 15:46:06 zork postfix/smtpd[8655]: warning: problem talking to service rewrite: Connection reset by peer
    Dec  2 15:46:06 zork postfix/master[7421]: warning: process /usr/lib/postfix/trivial-rewrite pid 9685 exit status 1
    Dec  2 15:46:06 zork postfix/master[7421]: warning: /usr/lib/postfix/trivial-rewrite: bad command startup -- throttling
    Dec  2 15:46:06 zork postfix/smtpd[7438]: warning: problem talking to service rewrite: Success
    Dec  2 15:46:06 zork postfix/master[7421]: warning: process /usr/lib/postfix/trivial-rewrite pid 9687 exit status 1
    Dec  2 15:46:06 zork postfix/smtpd[7443]: warning: problem talking to service rewrite: Connection reset by peer
     
  6. bluebirdnet

    bluebirdnet Member

    still trying to figure why i have a "table lookup problem". The cf file looks fine. table exists, has anyone ever had this error ?

    postfix/trivial-rewrite[2067]: fatal: mysql:/etc/postfix/mysql-virtual_relaydomains.cf(0,lock|fold_fix): table lookup problem
     
  7. falko

    falko Super Moderator Howtoforge Staff

    It seems as if your MySQL server isn't running. Please restart it and try again.
     
  8. bluebirdnet

    bluebirdnet Member

    really ? of course its running.

    I solved the issue.

    The socket error is because of the chroot environment. Opening 127.0.0.1 in Mysql to the login id and changing host = 127.0.0.1 in all CF files aswell.

    So dont use "localhost" in your configs.

    all is working normally now.
     

Share This Page