Hello list! First time posting on a list like this, if i provide too little/too much info i appologize.
I´m having some issues with the mysql backend (opensmtpd-extras-mysql-20150119) for opensmtpd. Im having trouble finding the problem, any help would be appreciated. My smtpd.conf is as follows. # $OpenBSD: smtpd.conf,v 1.7 2014/03/12 18:21:34 tedu Exp $ # This is the smtpd server system-wide configuration file. # See smtpd.conf(5) for more information. # To accept external mail, replace with: listen on all # listen on all table aliases db:/etc/mail/aliases.db # local smtpd conf pki hostname.org key "/etc/mail/ssl/hostname.org.key" pki hostname.org certificate "/etc/mail/ssl/hostname.org.crt" table vusers mysql:/etc/mail/mysql.conf table vdomains mysql:/etc/mail/mysql.conf table valiases mysql:/etc/mail/mysql.conf table credentials mysql:/etc/mail/mysql.conf #listen on all secure auth-optional <credentials> pki hostname.org listen on all port submission tls auth <credentials> pki hostname.org accept for domain <vdomains> userbase <vusers> virtual <valiases> deliver to maildir # Uncomment the following to accept external mail for domain "example.org" # # accept from any for domain "example.org" alias <aliases> deliver to mbox accept for local alias <aliases> deliver to mbox accept from local for any relay And here is the mysql.conf file. # This is the mysql config file for smtpd host localhost username mail password passwd database mail query_alias select destination from aliases where valias=?; query_domain select domain from domains where domain=?; query_userinfo select uid,gid,directory AS maildir from accounts where login=?; query_credentials select login, password from accounts where login=?; I cant seem to get any queries to the mysql server. When i start smtpd i get connect and prepare statements in the sql query log. 31 Connect mail@localhost as anonymous on mail 31 Prepare select destination from aliases where valias=? 31 Prepare select domain from domains where domain=? 31 Prepare select login, password from accounts where login=? 31 Prepare select uid,gid,directory AS maildir from accounts where login=? I get a section of these for every query in mysql.conf The mail log looks like this when restarted Sep 25 18:24:10 hostname smtpd[8150]: info: pony agent exiting Sep 25 18:24:10 hostname smtpd[448]: info: lookup agent exiting Sep 25 18:24:10 hostname smtpd[11319]: info: control process exiting Sep 25 18:24:10 hostname smtpd[17044]: info: scheduler handler exiting Sep 25 18:24:10 hostname smtpd[29033]: info: ca agent exiting Sep 25 18:24:10 hostname smtpd[31739]: info: queue handler exiting Sep 25 18:24:10 hostname smtpd[11764]: warn: parent terminating Sep 25 18:24:10 hostname smtpd[22276]: info: OpenSMTPD 5.4.4 starting Sep 25 18:24:10 hostname smtpd[27066]: info: startup Sep 25 18:24:11 hostname smtpd[27066]: warn: smtpd: couldn't enqueue offline message /var/spool/smtpd/offline/1441781737.dmjqANOkRi; smtpctl exited ab normally Sep 25 18:24:11 hostname smtpd[27066]: warn: smtpd: couldn't enqueue offline message /var/spool/smtpd/offline/1441797778.gqHzcHu5K9; smtpctl exited ab normally ... ... (I get a bunch of these "couldn't enqueue offline message" post.) When i try to send a mail to a mailaddress in the database on the host i get this in the maillog. Sep 25 18:24:51 hostname smtpd[12492]: smtp-in: New session 257f3544b2e7f76d from host some.host.com [xxx.xx.xxx.xx] Sep 25 18:24:51 hostname smtpd[12492]: smtp-in: Failed command on session 257f3544b2e7f76d: "RCPT TO:<[email protected]>" => 550 Invalid recipient Sep 25 18:24:51 hostname smtpd[12492]: smtp-in: Closing session 257f3544b2e7f76d But no queries on the mysql log. // Andreas Sörenby
