relayhost without authentication per mail domain not working
Summary
Setting up a relayhost per mail domain without username/password results in SASL authentication failure error from the relayhost
status=deferred (SASL authentication failed; cannot authenticate to server xxx[xxx]: generic failure)
Problem is similar to #5214 (closed), but there it is setting per server, not per mail domain.
I can't trace it completely, but following the query in mysql-virtual_sender-relayauth.cf postfix tries to authenticate with ":"
Steps to reproduce
- Enter relayhost into mail domain but leave relayhost user and password empty
- try to send email
Correct behaviour
Email should be send via relay if relayhost does not require authentication (f.e. ip-based authentication)
Environment
Server OS + version: (Debian 10)
ISPConfig version: (3.2.9p1)
Proposed fix
change mysql-virtual_sender-relayauth.cf line 9 from
AND concat(relay_host,relay_user,relay_pass) != ''
to
AND concat(relay_user,relay_pass) != ''