Hello, i have a problem on some relay servers. They do not accept the mails from domains. at the moment we have set under Specific domains a relay to a outbound gateway: Email -> Domain ->Choose Domain Relayhost -> Relay Server DNS or IP Relayhost User -> Empty Relayhost Password -> Empty One Relay Server is working but another gateway does not warning: SASL authentication failure: All-whitespace username SASL authentication failed; cannot authenticate to server: generic failure We have entered the sql query in the mysql server: SELECT relay_host as relayhost FROM mail_domain WHERE domain = 'domain' AND active = 'y' AND concat(relay_host,relay_user,relay_pass) != '' AND server_id = 1 If there is no PW and User set we get only the relay_host back. nano /etc/postfix/mysql-virtual_sender-relayhost.cf user = isp password = pw dbname = dbname hosts = 127.0.0.1 query = SELECT relay_host as relayhost FROM mail_domain WHERE domain = '%d' AND active = 'y' AND concat(relay_host,relay_user,relay_pass) != '' AND server_id = 1 This works.. but on one server we get the above error. Could anyone help? Regards Dominik
You could try to change in mysql-virtual_sender-relayhost.cf AND concat(relay_host,relay_user,relay_pass) != '' to AND relay_host != '' and in mysql-virtual_sender-relayauth.cf AND concat(relay_host,relay_user,relay_pass) != '' to AND concat(relay_user,relay_pass) != '' Just a suggestion, I have not tested this. But this will not return a data set when there is neither a username nor password, which hopefully prevents Postfix from trying to do sasl auth at all in this case.
Hi Till, thanks for the quick help this solved the issue, i think you should check this to implement it to your source. I use this to implement Cloud Security Gateway from other vendors for Customers who wants more protection than rspamd does. Regards Dominik