<div>Hi Gerard,</div>
<div> </div>
<div>That... will likely work. I will test and thank you very much.</div>
<div> </div>
<div>I did read the README in the rules folder a while ago, but for some reason had it in my head that you couldn&#39;t declare 2 variables on one line (<a href="mailto:to%3Auser1@example.com">to:user1@example.com</a> and from:*@<a href="http://foo.com">foo.com</a>) which is why I was looking deeper.</div>

<div> </div>
<div>Thanks again, and I will report on my success (or lack thereof)</div>
<div> </div>
<div> </div>
<div> </div>
<div> </div>
<div class="gmail_quote">On Tue, Dec 8, 2009 at 3:37 PM, Gerard Cleary <span dir="ltr">&lt;<a href="mailto:gcle@smcaus.com.au">gcle@smcaus.com.au</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div class="im">On Wed, 9 Dec 2009 04:50:53 Edward Dam wrote:<br>&gt; For example:<br>&gt;<br>&gt; <a href="mailto:user1@example.com">user1@example.com</a> should only be allowed incoming email from  *@<a href="http://foo.com/" target="_blank">foo.com</a><br>
&gt;<br>&gt; However all other users at <a href="http://example.com/" target="_blank">example.com</a> should receive all email as they<br>&gt; normally would. Basically we need to restrict email for a specific user to<br>
&gt; a single incoming domain.<br><br></div>I have probably missed something completely obvious that makes this problem much more difficult than I can see, but I use a ruleset based on<br>the &quot;Reject Message = no&quot; entry in the MailScanner.conf file which works well.<br>
<br>I changed the MailScanner.conf file to say:  Reject Message = %rules-dir%/reject.rules.<br><br>Then in the rules directory I have a file called reject.rules which contains entries like:<br><br>To:  <a href="mailto:user1@example.com">user1@example.com</a> and From: *@<a href="http://foo.com/" target="_blank">foo.com</a> no<br>
To:  <a href="mailto:user1@example.com">user1@example.com</a> yes<br>To: default no<br><br><br>The README file in the MailScanner/rules directory contains all the ruleset instructions and the EXAMPLES file is excellent for ideas on using<br>
rulesets.<br><br>All the best,<br>Gerard.<br><font color="#888888"><br>--<br></font>
<div>
<div></div>
<div class="h5"><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>Before posting, read <a href="http://wiki.mailscanner.info/posting" target="_blank">http://wiki.mailscanner.info/posting</a><br><br>Support MailScanner development - buy the book off the website!<br></div></div></blockquote>
</div><br>