If you have Bacula installed on a machine that has Postfix configured to relay mail to another host, the Bacula bsmtp command will fail with “relay access denied” messages such as this:
Mail prog: bsmtp: bsmtp.c:145 Fatal malformed reply from localhost: 554 5.7.1 <firstname.lastname@example.org>: Relay access denied
To fix this, you can do one of two things.
Add the domain of the email address you are trying to send the emails to with the relay_domains parameter:
postconf -e "relay_domains = emaildomain.com"
The following makes Postfix an open relay. ONLY DO THIS IF YOU HAVE TAKEN OTHER STEPS TO SECURE THE MACHINE. If you do not, your server could be used to relay spam.
postconf -e "relay_domains = static:ALL"
When you are done, restart Postfix, and your mail should now send.