Password Reset: Fails to connect to localhost to send

UCS 4.4-8 errat 1108

When requesting a password token via email, the system returns Error no 111 (connection refused). It appears postfix is simply refusing to accept the connection. There isn’t a corresponding log entry in mail.info. I must be missing an entry in the ucr.

Any recommendations?

management log shows:

19.11.21 19:22:11.646 MODULE ( PROCESS ) : Initializing module.
19.11.21 19:22:11.675 MODULE ( PROCESS ) : get_plugins(): Loaded sending plugin class ‘VerifyEmail’ for sending method ‘verify_email’.
19.11.21 19:22:11.694 MODULE ( PROCESS ) : get_plugins(): Plugin class ‘SendSMS’ for sending method ‘mobile’ is disabled.
19.11.21 19:22:11.703 MODULE ( PROCESS ) : get_plugins(): Loaded sending plugin class ‘SendEmail’ for sending method ‘email’.
19.11.21 19:22:11.719 MODULE ( PROCESS ) : get_plugins(): Plugin class ‘SendWithExternal’ for sending method ‘None’ is disabled.
19.11.21 19:22:11.719 MODULE ( PROCESS ) : get_plugins(): plugin class ‘VerifyEmail’ for sending method ‘verify_email’: udm_property: ‘PasswordRecoveryEmailVerified’ token_length: ‘64’
19.11.21 19:22:11.719 MODULE ( PROCESS ) : get_plugins(): plugin class ‘SendEmail’ for sending method ‘email’: udm_property: ‘PasswordRecoveryEmail’ token_length: ‘64’
19.11.21 19:22:13.407 MODULE ( ERROR ) : Unknown error: Traceback (most recent call last):
File “/usr/lib/python2.7/dist-packages/univention/management/console/modules/passwordreset/init.py”, line 976, in _call_send_msg_plugin
plugin.send()
File “/usr/lib/python2.7/dist-packages/univention/management/console/modules/passwordreset/sending/send_email.py”, line 121, in send
smtp = smtplib.SMTP(self.server)
File “/usr/lib/python2.7/smtplib.py”, line 256, in init
(code, msg) = self.connect(host, port)
File “/usr/lib/python2.7/smtplib.py”, line 316, in connect
self.sock = self._get_socket(host, port, self.timeout)
File “/usr/lib/python2.7/smtplib.py”, line 291, in _get_socket
return socket.create_connection((host, port), timeout)
File “/usr/lib/python2.7/socket.py”, line 575, in create_connection
raise err
error: [Errno 111] Connection refused

19.11.21 19:22:13.407 MODULE ( ERROR ) : send_token(): Error sending token with via ‘email’ to ‘tmarvin’.
19.11.21 19:22:13.416 MODULE ( PROCESS ) : Error sending token: [Errno 111] Connection refused

Screen Shot 2021-11-21 at 17.26.34

In case anyone else encounters this issue: It appears there may be a bug in one of the templates for file generation of the master.cf.

Per the documentation on creating a relay host, I created and edited the /etc/postfix/smtp_auth file, the ran postmap to create the db file. Nothing else was touched other than reloading the postfix configuration.

More digging using netstat -tulpn revealed smtp wasn’t listening on port 25 even though the smtpd was running.

I ran postconf to review the entries and a warning was issued at the initial output about a stanza with an empty line. On further inspection, the smtp entry was missing in the first stanza.

After correcting the entry, smtp was listening on 25. This may become an issue again as I’ve not uncovered where in the template(s) the smtp entry is missing (or perhaps a transient error.)

Mastodon