cover photo

elmussol

elmussol@elsmussols.org

getting SMTP working

 Xerta last edited: Thu, 22 Mar 2018 11:18:08 +0100  
After using another SMTP server for a while, I'm having another attempt to get my SMTP up and functioning. The previous problem as far as I remember was with SASL auth (hence my question to Tony earlier today). I have made the change in the relevant config. I'm using Dovecot/Postfix. When I try to send from my laptop I get in /varlog/mail.log (where 87.111.xxx.xxx is the IP of my router):

Jul  7 16:09:25 pendle postfix/smtpd[24863]: warning: hostname cliente-88706.iberbanda.es does not resolve to address 87.111.xxx.xx: Name or service not known
Jul  7 16:09:25 pendle postfix/smtpd[24863]: connect from unknown[87.111.xxx.xx]
Jul  7 16:09:28 pendle postfix/smtpd[24863]: warning: SASL authentication failure: Password verification failed
Jul  7 16:09:28 pendle postfix/smtpd[24863]: warning: unknown[87.111.xxx.xx]: SASL PLAIN authentication failed: authentication failure
Jul  7 16:09:28 pendle postfix/smtpd[24863]: warning: unknown[87.111.xxx.xx]: SASL LOGIN authentication failed: authentication failure


Not much to go on. Where else should I be looking? What other info would be useful?
 email  tech
  
Poking around in the logs I found:

root@pendle:/var/log# tail -f auth.log
Jul  9 16:28:39 pendle postfix/smtpd[10971]: sql_select option missing
Jul  9 16:28:39 pendle postfix/smtpd[10971]: auxpropfunc error no mechanism available
Jul  9 16:28:39 pendle postfix/smtpd[10971]: _sasl_plugin_load failed on sasl_auxprop_plug_init for plugin: sql


This is the config:

root@pendle:/etc/postfix/sasl# cat smtpd.conf 
pwcheck_method: saslauthd
mech_list: plain login
allow_plaintext: true
auxprop_plugin: mysql
sql_hostnames: 127.0.0.1
sql_user: mail
sql_passwd: ################
sql_database: maildb
sql_select: select password from users where email = '%u'


I obviously need to look into this. Any quick pointers would be appreciated.
  
My postfix is built with dovecot support:

root@pendle:~# postconf -a
cyrus
dovecot


It therefore this strikes me as wrong in /etc/postfix/main.cf:

root@pendle:/etc/postfix# cat /etc/postfix/main.cf | grep sasl_t
smtpd_sasl_type = cyrus


So I changed it to dovecot and get the following in /etc/log/mail.log on service postfix restart:

Jul 10 12:24:41 pendle postfix/smtpd[18885]: warning: SASL: Connect to /var/spool/postfix/var/run/saslauthd failed: No such file or directory
Jul 10 12:24:41 pendle postfix/smtpd[18885]: fatal: no SASL authentication mechanisms
Jul 10 12:24:42 pendle postfix/master[18829]: warning: process /usr/lib/postfix/smtpd pid 18885 exit status 1
Jul 10 12:24:42 pendle postfix/master[18829]: warning: /usr/lib/postfix/smtpd: bad command startup -- throttling


Writing it down and thinking aloud. Comments welcome.
  
Does smtpd run as root or with group sasl? Otherwise it won't be able to see that saslauthd.