<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.msonormal0, li.msonormal0, div.msonormal0
        {mso-style-name:msonormal;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}
span.hoenzb
        {mso-style-name:hoenzb;}
span.EmailStyle21
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-AU" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Hi Shawn,<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Thanks again. So, now I have to find a way to put that sed operation somehow into PHP code. I believe the PHP code is feeding a message to sendmail command as a file by looking at it. Are there any
 easy ways to insert that snippet somehow? Sorry, I am really not confident with computer languages
</span><span style="font-family:"Segoe UI Emoji",sans-serif;mso-fareast-language:EN-US">☹</span><span style="mso-fareast-language:EN-US">. Cheers.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US">Eoin<o:p></o:p></span></p>
<p class="MsoNormal"><span style="mso-fareast-language:EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span lang="EN-US"> MailScanner <mailscanner-bounces+eoin.kim=rcst.com.au@lists.mailscanner.info>
<b>On Behalf Of </b>Shawn Iverson<br>
<b>Sent:</b> Tuesday, 24 July 2018 12:40 AM<br>
<b>To:</b> MailScanner Discussion <mailscanner@lists.mailscanner.info><br>
<b>Subject:</b> Re: [Question] I'd like to alter Message-ID when releasing from quarantine<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<p class="MsoNormal">Eoin,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">I think that would be a safer route to take.  It would be nice if you could just generate a new message ID, but I know the semantics of the message IDs are a little complex.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Fri, Jul 20, 2018 at 7:24 PM, Eoin Kim <<a href="mailto:Eoin.Kim@rcst.com.au" target="_blank">Eoin.Kim@rcst.com.au</a>> wrote:<o:p></o:p></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div id="m_-217893108689232836divtagdefaultwrapper">
<p style="background:white"><span style="font-size:12.0pt;color:black">Hi Shawn,<o:p></o:p></span></p>
<p style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<p style="background:white"><span style="font-size:12.0pt;color:black">Thanks for your response. I was thinking about it for a while but then I have to think about the source and destination in the rule. I think I have to use FromAndTo: but I am not sure with
 the syntax. I guess From should be my gateway (e.g. 127.0.0.1) and To should be the IP address of the Exchange server, is it? But can I actually put these two addresses on the same line in the rule file? I always used From: or To: separately, never used FromAndTo:, hence,
 I may need a bit of help with the syntax. Plus, what I am acutally worrying about is when I use a rule file, if this operation happening when releasing from quarantine only because I think every email is relayed from the gateway (Ah.... I wish I could speak
 in English better).<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I also was thinking about a different approach, touching the following file -
<b>MailWatch/mailscanner/functions.php</b>. More specifically, the line below: <o:p>
</o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<blockquote style="margin-left:30.0pt;margin-right:0cm">
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">$cmd = QUARANTINE_SENDMAIL_PATH . ' -i -f ' . MAILWATCH_FROM_ADDR . ' ' . escapeshellarg(stripslashes($to)) . ' < ';<o:p></o:p></span></p>
</div>
</blockquote>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Say, if I could execute sed operation (I actually got help, thanks Schlake) beforehand, that would be alright to me. For example, like this:<o:p></o:p></span></p>
</div>
</div>
</div>
<blockquote style="margin-left:30.0pt;margin-right:0cm">
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">1. Run sed -i -e "/^H??Message-ID: /s/\(Message-ID: .*\)@\(.*\)/\1-$$@\2/" <<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">2. After that run $cmd<o:p></o:p></span></p>
</div>
</div>
</blockquote>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">I am not really confident with PHP, well.... actually any languages :( but I think touching
<strong><span style="font-family:"Calibri",sans-serif">functions.php</span></strong> file more makes sense to me because I believe this will only affect when releasing messages from quarantine, which I want. I don't want to put changing Message-ID operation
 in any other situations since RFC document recommends not to touch it.<br>
<br>
What do you think about this Shawn? Thanks again for your help.<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Eoin<o:p></o:p></span></p>
<div>
<div class="MsoNormal" align="center" style="text-align:center;background:white">
<span style="font-size:12.0pt;color:black">
<hr size="2" width="98%" align="center">
</span></div>
<div id="m_-217893108689232836divRplyFwdMsg">
<p class="MsoNormal" style="background:white"><b><span style="color:black">From:</span></b><span style="color:black"> MailScanner <mailscanner-bounces+eoin.kim=<a href="mailto:rcst.com.au@lists.mailscanner.info" target="_blank">rcst.com.au@lists.mailscanner.info</a>>
 on behalf of Shawn Iverson <<a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a>><br>
<b>Sent:</b> Friday, 20 July 2018 6:17 PM<br>
<b>To:</b> MailScanner Discussion<br>
<b>Subject:</b> Re: [Question] I'd like to alter Message-ID when releasing from quarantine</span><span style="font-size:12.0pt;color:black">
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
</div>
</div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Eoin,
<o:p></o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">Can you create a ruleset for header removal in MailScanner (I'm not sure removing the Message-ID is a good idea, but you could give it a try)?<o:p></o:p></span></p>
</div>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black"><o:p> </o:p></span></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:black">On Fri, Jul 20, 2018 at 12:52 AM, Eoin Kim <<a href="mailto:Eoin.Kim@rcst.com.au" target="_blank">Eoin.Kim@rcst.com.au</a>> wrote:<o:p></o:p></span></p>
<blockquote style="border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm">
<div>
<div>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black">Hi all,<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black">I am trying to configure MailScanner with MailWatch on Debian 9. Sorry, I didn’t want to involve MailWatch here but since I am trying to use a function from it, I included the name here. As the MTA, I installed Postfix.
 What I want to achieve is releasing mails from quarantine via sendmail not by a file (this is the feature from MailWatch). However, I am having a problem with this.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black">There is a Microsoft Exchange server sitting behind this Debian host and it rejects the released email because of the duplicate Message-ID. My senior person doesn’t want to enable the feature of ignoring duplicate
 on Exchange server. I know there is a feature in MailScanner which removes Message-ID from the mail header. However, I don’t want to remove this from every single message. Are there any ways to alter Messag-ID only when the message is released from quarantine?<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black">I know that if I release emails as a file, no worries. However, I don’t want to do so as there are a huge amount of users who don’t use MUA. I would really appreciate if I can get any helps. Thanks a lot.<o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<b><span lang="EN-GB" style="font-size:12.0pt;color:#0070C0">Eoin Kim</span></b><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:#1F497D">Systems Administrator</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:10.0pt;color:black"> </span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<b><span style="font-size:12.0pt;color:black">RCS Telecommunications </span></b><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:10.0pt;color:black">Level 1 – The Annexe, 133 Mary Street</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:10.0pt;color:black">Brisbane, QLD, 4000, Australia</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:10.0pt;color:black">Office: 07 3228 0843</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span lang="FR" style="font-size:10.0pt;color:black">Mobile: 0419 726 231</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:10.0pt;color:black">Email: <a href="mailto:eoin.kim@rcst.com.au" target="_blank">
eoin.kim@rcst.com.au</a></span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
<p class="MsoNormal" style="mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;background:white">
<span style="font-size:12.0pt;color:black"> <o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt;background:white"><span style="font-size:12.0pt;color:black"><br>
<br>
</span><span style="font-size:12.0pt;color:#888888"><br>
<span class="hoenzb">-- </span><br>
<span class="hoenzb">MailScanner mailing list</span><br>
<span class="hoenzb"><a href="mailto:mailscanner@lists.mailscanner.info" target="_blank">mailscanner@lists.mailscanner.info</a></span><br>
<span class="hoenzb"><a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a></span><br>
<br>
</span><span style="font-size:12.0pt;color:black"><o:p></o:p></span></p>
</blockquote>
</div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888"><br>
<br clear="all">
</span><span class="hoenzb"><span style="color:#888888"><o:p></o:p></span></span></p>
<div>
<p class="MsoNormal" style="background:white"><o:p> </o:p></p>
</div>
<p class="MsoNormal" style="background:white"><span class="hoenzb"><span style="font-size:12.0pt;color:#888888">--
</span><o:p></o:p></span></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888">Shawn Iverson, CETL
</span><o:p></o:p></p>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888">Director of Technology<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888">Rush County Schools<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888">765-932-3901 x1171<o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888"><a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888"><o:p> </o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888;border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="96" height="96" style="width:1.0in;height:1.0in" id="_x0000_i1026" src="cid:~WRD000.jpg" alt="Image removed by sender."><img border="0" width="89" height="96" style="width:.927in;height:1.0in" id="_x0000_i1027" src="cid:image001.jpg@01D4231E.86941630" alt="Image removed by sender."></span><span style="font-size:12.0pt;color:#888888"><o:p></o:p></span></p>
</div>
<div>
<p class="MsoNormal" style="background:white"><span style="font-size:12.0pt;color:#888888;border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="100" height="100" style="width:1.0416in;height:1.0416in" id="_x0000_i1028" src="cid:~WRD000.jpg" alt="Image removed by sender."></span><span style="font-size:12.0pt;color:#888888"><o:p></o:p></span></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt"><br>
<br>
<br>
-- <br>
MailScanner mailing list<br>
<a href="mailto:mailscanner@lists.mailscanner.info">mailscanner@lists.mailscanner.info</a><br>
<a href="http://lists.mailscanner.info/mailman/listinfo/mailscanner" target="_blank">http://lists.mailscanner.info/mailman/listinfo/mailscanner</a><br>
<br>
<o:p></o:p></p>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">Shawn Iverson, CETL<o:p></o:p></p>
<div>
<p class="MsoNormal">Director of Technology<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">Rush County Schools<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">765-932-3901 x1171<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><a href="mailto:iversons@rushville.k12.in.us" target="_blank">iversons@rushville.k12.in.us</a><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="96" height="96" style="width:1.0in;height:1.0in" id="_x0000_i1029" src="cid:~WRD000.jpg" alt="Image removed by sender."><img border="0" width="89" height="96" style="width:.927in;height:1.0in" id="_x0000_i1030" src="cid:image001.jpg@01D4231E.86941630" alt="Image removed by sender."></span><o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><span style="border:solid windowtext 1.0pt;padding:0cm"><img border="0" width="100" height="100" style="width:1.0416in;height:1.0416in" id="_x0000_i1031" src="cid:~WRD000.jpg" alt="Image removed by sender."></span><o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>