Hi everyone,
I'm having a strange issue with Secret text global macros in the Email media type and wanted to check whether anyone else has experienced this.
Environment:
Configuration:
I have two global user macros:
Both are configured under Administration → Macros.
The problem:
When both macros are configured as Text, SMTP authentication works perfectly.
However, when I change either macro individually to Secret text, SMTP authentication fails with:
failed to send email: Login denied
This also happens when both macros are configured as Secret text.
What I've already checked:
I've also noticed that the Zabbix documentation lists global user macros as supported in the Email media type's Username and Password fields, but I couldn't find Email credentials in the Secret macro unmasked locations list. (https://www.zabbix.com/documentation.../secret_macros)
My questions:
The Email media type documentation states that user macros are supported in the Username and Password fields. It also recommends using a user macro to prevent SMTP credentials from being exposed when exporting media type configurations, stating that the secret value must be reconfigured on the destination system. (https://www.zabbix.com/documentation...#configuration)
I'd appreciate any suggestions or confirmation from someone who has this working.
Thanks!
I'm having a strange issue with Secret text global macros in the Email media type and wanted to check whether anyone else has experienced this.
Environment:
- Zabbix Server: 8.0.0
- Server revision: c81e276e505
- Zabbix Frontend: 8.0.0
- Database: PostgreSQL 18.6
- SMTP provider: SimplySend
- Media type: Generic SMTP
Configuration:
I have two global user macros:
- {$SMTP.SIMPLYSEND.USERNAME}
- {$SMTP.SIMPLYSEND.PASSWORD}
Both are configured under Administration → Macros.
The problem:
When both macros are configured as Text, SMTP authentication works perfectly.
However, when I change either macro individually to Secret text, SMTP authentication fails with:
failed to send email: Login denied
This also happens when both macros are configured as Secret text.
What I've already checked:
- Both macros are global.
- Both secret values have been explicitly re-entered using "Set new value".
- Both values are present in the globalmacro database table.
- Macro syntax is correct.
- SMTP credentials and connectivity are working when using Text macros.
- Frontend, server and database schema are all version 8.0.0.
I've also noticed that the Zabbix documentation lists global user macros as supported in the Email media type's Username and Password fields, but I couldn't find Email credentials in the Secret macro unmasked locations list. (https://www.zabbix.com/documentation.../secret_macros)
My questions:
- Is Secret text officially supported in both SMTP Username and Password fields in Zabbix 8.0?
- Has anyone successfully used Secret text global macros with Generic SMTP?
The Email media type documentation states that user macros are supported in the Username and Password fields. It also recommends using a user macro to prevent SMTP credentials from being exposed when exporting media type configurations, stating that the secret value must be reconfigured on the destination system. (https://www.zabbix.com/documentation...#configuration)
- Could you clarify whether this recommendation refers to regular Text macros or Secret text macros?
- Are Secret text global user macros actually supported when resolving CURLOPT_USERNAME and CURLOPT_PASSWORD in the Email media type?
- If they are supported, could this be an implementation issue or regression?
I'd appreciate any suggestions or confirmation from someone who has this working.
Thanks!