<div dir="ltr">Some versions of mailx do not support "-r".  However, some versions of mailx allow you to specify arguments to be sent to sendmail like so:<div><div><br></div><div>echo test message | mailx -v -s subject <a href="mailto:email.address@example.com">email.address@example.com</a> -<a href="mailto:fnoreply@example.com">fnoreply@example.com</a><br>

</div><div><br></div><div>So in this example, mailx will finish parsing switches when it gets to addresses, and any switch-like arguments after the addresses will get sent to sendmail.</div><div><br></div><div>Unfortunately, you can't use this with MAILC, as Xymon appends the email addresses to the end.  Instead, you could create your own script to use in MAILC.  Something like:</div>

<div><br></div><div>#!/bin/sh</div><div>if [ "$FROMADDR" ]; then mailx "$@" -f"$FROMADDR"; else mailx "$@"; fi</div><div><br></div><div>Then set</div><div><br></div><div>MAILC="FROMADDR='<a href="mailto:noreply@example.com">noreply@example.com</a>' mymailx"</div>

<div><br></div><div>Or perhaps install a new MUA, such as "nail" - one that supports "-r".</div><div><br></div><div>J</div></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">

On 17 January 2014 05:50, John Thurston <span dir="ltr"><<a href="mailto:john.thurston@alaska.gov" target="_blank">john.thurston@alaska.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div class="im">On 1/16/2014 8:56 AM, Mark Felder wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I have a FreeBSD bug report open from a user who claims that if they run<br>
"sudo service xymon-server start" it starts xymon correctly but the<br>
alert emails come from the wrong email address. Where is Xymon getting<br>
the username from to use when sending emails? Is it configurable in<br>
xymonserver.cfg? Could it be made configurable? The patch the user<br>
suggested to the freebsd rc script seems unnecessary.<br>
</blockquote>
<br></div>
I tried setting the value of MAILC in xymonserver.cfg:<br>
 MAILC="mailx -r <a href="mailto:noreply@foo.com" target="_blank">noreply@foo.com</a> "<br>
<br>
My test with  xymond_alert  report that the -r parameter will be used with mailx, but when Xymon actually sends the messages it is not.<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
   Do things because you should, not just because you can.<br>
<br>
John Thurston    907-465-8591<br>
<a href="mailto:John.Thurston@alaska.gov" target="_blank">John.Thurston@alaska.gov</a><br>
Enterprise Technology Services<br>
Department of Administration<br>
State of Alaska</font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
Xymon mailing list<br>
<a href="mailto:Xymon@xymon.com" target="_blank">Xymon@xymon.com</a><br>
<a href="http://lists.xymon.com/mailman/listinfo/xymon" target="_blank">http://lists.xymon.com/<u></u>mailman/listinfo/xymon</a><br>
</div></div></blockquote></div><br></div>