<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <style type="text/css">body p { margin-bottom: 0cm; margin-top: 0pt; } </style>
  </head>
  <body bidimailui-charset-is-forced="true">
    <p><font size="+1"><font face="Arial">it is also possible to use
          mutt instead of mail and use the REPLYTO variable or create
          .muttrc with the return address. I think the domain definition
          should go into the $hostname and also use-domain should be set
          to no.</font></font></p>
    <p><font size="+1"><font face="Arial"><br>
        </font></font></p>
    <p><font size="+1"><font face="Arial"><br>
        </font></font></p>
    <div class="moz-cite-prefix">On 13/02/2020 10:35, Malcolm Hunter
      wrote:<br>
    </div>
    <blockquote type="cite"
cite="mid:CALkV0eXsfuaiBV3a2DAxZL6VyP7uHVy5CrYX30uo_caXWF1sGA@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <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"
              moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">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" moz-do-not-send="true">xymonserver.localdomain.com</a> to <a
                  href="http://xymonserver.abc.com/"
                  style="text-decoration-line:none;color:rgb(66,133,244)"
                  target="_blank" moz-do-not-send="true">xymonserver.abc.com</a> it
                works, but we cannot change the hostname it will make
                the other problem. </p>
              <p style="font-family:sans-serif;font-size:12.8px"> </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" moz-do-not-send="true">alex.@abc.com</a> <a
                  href="mailto:alexalex@extenalweb.com"
                  style="text-decoration-line:none;color:rgb(66,133,244)"
                  target="_blank" moz-do-not-send="true">alexalex@extenalweb.com</a> SERVICE=uptime,conn</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </p>
              <p style="font-family:sans-serif;font-size:12.8px">it will
                not send out and Xymon alert.log shows below error</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </p>
              <p style="font-family:sans-serif;font-size:12.8px">mail:
                option requires an argument -- r</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</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </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"</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </p>
              <p style="font-family:sans-serif;font-size:12.8px"># For
                the xymond_alert module</p>
              <p style="font-family:sans-serif;font-size:12.8px">MAILC="mail"                  
                         # Command used to send an e-mail with no
                subject</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</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </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?</p>
              <p style="font-family:sans-serif;font-size:12.8px"> </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.</p>
              <p style="font-family:sans-serif;font-size:12.8px"> <span
                  style="font-size:12.8px">Xymon 4.3.28</span></p>
            </div>
          </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" moz-do-not-send="true">main.cf</a>:
            myorigin = <a href="http://mydomain.com"
              moz-do-not-send="true">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"
              moz-do-not-send="true">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>
      </div>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
Xymon mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Xymon@xymon.com">Xymon@xymon.com</a>
<a class="moz-txt-link-freetext" href="http://lists.xymon.com/mailman/listinfo/xymon">http://lists.xymon.com/mailman/listinfo/xymon</a>
</pre>
    </blockquote>
  </body>
</html>