Change email alert return address
Comments
-
Hi,
it is hardcoded, you can change it here:
bin/AlertStor2rrd.pm lines 1691 and 140
my $mailfrom = "stor2rrd";
Bad thing is that you have to do it again after next upgrade.
We will think about parametrisation for the future ...
-
Thank you.
-
Looks like there is a hard coded email from "lpar2rrd" somewhere. On hardware failures I am getting a "rejected" email from this from address. Where might this be in the code?
Thanks, -
if you use the latest code 2.01 then there is definitelly user stor2rrd for HW alerting:
bin/Xorux_lib.pm line 211
my $mailfrom = "stor2rrd";
-
Running the latest code 2.01, and that location "mailfrom" was changed. But receiving hardware errors "from": "lpar2rrd@xxx.com" in my alert system.
-
Found a solution to my issue, so thought I would share. Used postfix to resolve.
Added the following to last line of /etc/postfix/main.cf file
smtp_generic_maps = hash:/etc/postfix/genericAdded the following to the last line of /etc/postfix/generic
lpar2rrd user@fqdn
stor2rrd user@fqdnRan
postmap /etc/postfix/genericRestarted postfix
service postfix restartWith this I still needed to change the mailfrom in AlertStor2rrd.pm and Xorux_lib.pm files, but it is now sending from the address I needed. -
ok, I tested actual solution and sendmail ignores "from:" item and places there actuall Unix user name.
how did you change mailfrom variable in AlertStor2rrd.pm and Xorux_lib.pm?
-
I changed the mailfrom variable in the code as per your instructions above.
Howdy, Stranger!
Categories
- 1.6K All Categories
- 41 XORMON NG
- 25 XORMON
- 149 LPAR2RRD
- 13 VMware
- 16 IBM i
- 2 oVirt / RHV
- 4 MS Windows and Hyper-V
- Solaris / OracleVM
- XenServer / Citrix
- Nutanix
- 6 Database
- 2 Cloud
- 10 Kubernetes / OpenShift / Docker
- 122 STOR2RRD
- 19 SAN
- 7 LAN
- 17 IBM
- 3 EMC
- 12 Hitachi
- 5 NetApp
- 15 HPE
- Lenovo
- 1 Huawei
- 1 Dell
- Fujitsu
- 2 DataCore
- INFINIDAT
- 3 Pure Storage
- Oracle