<html><head>
<meta charset="utf-8" content="IE=9; IE=8; IE=7; IE=EDGE" http-equiv="X-UA-Compatible"/>
        <style type="text/css" title="rt_noDelete">
    blockquote.rt {
    margin: 0 0 15px;
    border-left: 4px solid #81c784;
    padding: 0 0 0 12px;
    display: block;
    }
    p { margin: 0 0 0 0 }
.email-signature {font-family:"Arial"; font-size: 14pt; font-style: italic; font-weight: normal; text-decoration: none; }
    </style></head><body>
Hello Mailscanner,<br/>
<p> </p><p> </p><p>I am trying to create a filter to rewrite the from and to of messages we send to our internal fax service.</p><p> </p><p>My requirements are:</p><p>Determine if the message is from one of three allowed domains</p><p>If yes, then determine if the message is being sent to our fax software.</p><p>if yes, then</p><p>    change the from address to the address our fax software will respond to</p><p>    change the to address to the format our fax software knows how to handle</p><p>    add some headers for our own tracking.</p><p> </p><p>This filter is in a new file in /usr/local/cpanel/etc/exim/sysfilter/options</p><p> </p><p> </p><p>This is what I have so far, </p><p> </p><p>if ($h_from: contains "@(companya.org|companyb.net|companyc.com)"
</p><p>then if $h_to: contains "@fax.companya.org"</p>
<p>               then</p>
<p>headers add "Actual-From: $h_from:"</p>
<p>                       headers remove From</p>
<p>                       headers add "From: <a href="sendfax@companya.org">sendfax@companya.org</a>"</p>
<p>                       headers remove Reply-To</p>
<p>                       headers add "Reply-To: $h_from"</p>
<p>headers add "Actual-To: $h_to:"</p>
<p>                       headers remove To</p>
<p>                       headers add "To: $local_part@companyc.com"</p>
<p>               endif</p>
<p>endif</p><p> </p><p> </p><p> </p><p>Any pointers or suggestions would be most appreciated!</p><p> </p><p>Thanks</p><p>Jason</p><p> </p><p> </p></body>