I want to add item/trigger to Zabbix to check that some server A can send mails via mail server B (SMTP relay) without sending on real/fake email and I haven't a problem with firewall/iptables rules and postfix rules. Mail service belongs to me and I use Postfix / CentOS 7.

How can I do it?

I know that I can send real mail via mailx or netcat, the command will be something like this:

echo "Test message" | mailx -v -r "from@some.com" -s "Some subject" -S smtp="mail-server-b.com:25" to@some.org

and parse result but I don't want to do it.

1 Answer 1


I don't know of a way to do that reliably. You can check whether you get connection to the SMTP port, for example, but it does not mean you will be able to send the mail. Mail could be rejected or removed at any later stage. The only way to reliably test this is to send a test email periodically.

  • If I check only port, it means that I check only firewall/iptables rules. But I need to check relay too. Thanks for answer.
    – Harlam
    Dec 5, 2017 at 16:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.