Alert sender email address not honored

Hi,

We are using OpenVAS9. I have created an email alert with a proper “From Address” for my organisation. However, the alert email gets sent with sender address “root@myhostname.localdomain”. This can seen from postfix logs. Mail delivery works fine on command line with "mailx -r ".

Any ideas?

How is your local MTA configured, please note it must not rewrite any address. Normally the local MTA rewrites the address to user @ hostname.

By the way, it is seen a bad practice to run GVM as root :wink: Maybe you wanna change that as well.

MTA configuration is out-of-box Postfix conf with just “relayhost” added. As said earlier, it works with mailx -r. What’s the actual command GVM uses when sending the email? What arguments it uses? This seems to be internal to GVM as there is no global_alert_method for emailing.

PS. I did a workaround with using “smtp_generic_maps” which just rewrites the “From address” but this doesn’t solve the original problem.

You can find the related source code in the file below (keyword for the search: sendmail):

https://raw.githubusercontent.com/greenbone/gvm/v8.0%2Bbeta1/src/manage_sql.c

1 Like