<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 13 Feb 2020 at 02:52, Alex Tang <<a href="mailto:bear410hk@gmail.com">bear410hk@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto"><p style="font-family:sans-serif;font-size:12.8px">Hi All, </p><p style="font-family:sans-serif;font-size:12.8px"><br></p><p style="font-family:sans-serif;font-size:12.8px">I had a Xymon server need send email with a special sender email address, because of mail server had limitation sender must be company email domain (<a href="mailto:xxxx@abc.com" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">xxxx@abc.com</a>) if I need send email to external email such as gmail or SMS service. I had added Xymon <a href="mailto:XXXX@abc.com" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">XXXX@abc.com</a> in Sendmail genericstable but not working. Also, I had tried to rename the hostname from <a href="http://xymonserver.localdomain.com/" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">xymonserver.localdomain.com</a> to <a href="http://xymonserver.abc.com/" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">xymonserver.abc.com</a> it works, but we cannot change the hostname it will make the other problem. <u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">I can't use -r in Alert.cfg, for example : MAIL -r <a href="mailto:alex.@abc.com" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">alex.@abc.com</a> <a href="mailto:alexalex@extenalweb.com" style="text-decoration-line:none;color:rgb(66,133,244)" target="_blank">alexalex@extenalweb.com</a> SERVICE=uptime,conn<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">it will not send out and Xymon alert.log shows below error<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">mail: option requires an argument -- r<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px">Usage: mail -eiIUdEFntBDNHRVv~ -T FILE -u USER -h hops -r address -s SUBJECT -a FILE -q FILE -f FILE -A ACCOUNT -b USERS -c USERS -S OPTION users<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">so, I tried to change x=xymonserver.cfg but not working, I added -r in Mail="$MAILC -s"<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px"># For the xymond_alert module<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px">MAILC="mail"                            # Command used to send an e-mail with no subject<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px">MAIL="$MAILC -r -s"                     # Command used to send an e-mail with a subject<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">may I know the setting of xymonserver.cfg to allow MAIL Command to use -r in Xymon alert.cfg?<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <u></u></p><p style="font-family:sans-serif;font-size:12.8px">P.S: I can use mail -r to send out email in centos 7.<u></u><u></u></p><p style="font-family:sans-serif;font-size:12.8px"><u></u> <span style="font-size:12.8px">Xymon 4.3.28</span></p><p style="font-family:sans-serif;font-size:12.8px"></p></div><a href="http://lists.xymon.com/mailman/listinfo/xymon" rel="noreferrer" target="_blank"></a></blockquote><div><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">How I did this was just to change Postfix myorigin to the domain of choice and change the entry in xymonserver.cfg MAILC="mail -r username"</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">e.g. xymonserver.cfg: MAILC="mail -r xymon_site1"</div><div class="gmail_default" style="font-family:tahoma,sans-serif">/etc/postfix/<a href="http://main.cf">main.cf</a>: myorigin = <a href="http://mydomain.com">mydomain.com</a></div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">This will send emails from <a href="mailto:xymon_site1@mydomain.com">xymon_site1@mydomain.com</a>

</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif">HTH</div><div class="gmail_default" style="font-family:tahoma,sans-serif"><br></div><div class="gmail_default" style="font-family:tahoma,sans-serif"></div></div></div>