Filter by IP

Sampson, Aaron Sampson at p2sol.com
Wed Sep 19 19:35:13 IST 2012


Martin,

What did you mean by no tabs? Like the rule-set should look like To: *@domain.com<mailto:*@domain.com> deliver instead of To:                *@domain.com<mailto:*@domain.com>                deliver
It appears in the examples that there are tabs between each part like in the 2nd example listed above.  I did refer to these examples when setting this rule up, but still no luck

From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Martin Hepworth
Sent: Wednesday, September 19, 2012 10:47 AM
To: MailScanner discussion
Subject: Re: Filter by IP

have you made sure there no tab's in that ruleset.
check out the examples in the examples dir and here.

http://wiki.mailscanner.info/doku.php?id=documentation:configuration:rulesets:examples&s=rules

yes you'll need the default entry , try making sure the capitalisasion is consistent with the examples as welll.

To: @domain1.com<http://domain1.com> deliver
To: @domain2.com<http://domain2.com> deliver
From: ip.address        store
FromOrTo: default       deliver

--
Martin Hepworth, CISSP
Oxford, UK

On 19 September 2012 16:00, Sampson, Aaron <Sampson at p2sol.com<mailto:Sampson at p2sol.com>> wrote:
Alex,

So I tried out your suggestion and put in a a ruleset in the non-spam actions. rules that read
to: *@domain1.com<http://domain1.com> deliver
to: *@domain2.com<http://domain2.com> deliver
from: ip.address        store
and then when that did not work added
fromorTo: default       deliver

Still did not work and all e-mails coming into the company were lost (dang it) and I kept getting an error message saying   Syntax error in "header" action in spam actions,
missing ":" in etc/MailScanner/rules/non.spam.rules

We have checked and rechecked the rule-set pattern to see if we missed something and have tried a few things and nothing has worked so far.  We would like to not have to set up an additional smtp server to take care of this issue so any additional thoughts would be great, or let me know if you need/want any additional information


-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info<mailto:mailscanner-bounces at lists.mailscanner.info> [mailto:mailscanner-bounces at lists.mailscanner.info<mailto:mailscanner-bounces at lists.mailscanner.info>] On Behalf Of Alex Neuman
Sent: Monday, September 17, 2012 12:41 PM
To: MailScanner discussion
Subject: Re: Filter by IP
You can probably add the test server's IP to the spam whitelist, then add a "non-spam actions" ruleset that says something like:

To:allowed.domain.com<http://allowed.domain.com> deliver
To:allowed2.domain.com<http://allowed2.domain.com> deliver
From:xx.xx.xx.xx store

That way, the first two domains "hit" and "deliver" the e-mails, while anything else from the test server will be "stored" - you could use "delete" but just in case use "store" so you can release them if necessary.


On Mon, Sep 17, 2012 at 11:01 AM, Sampson, Aaron <Sampson at p2sol.com<mailto:Sampson at p2sol.com>> wrote:
> I am running Centos 6 with Postfix/mailscanner 4.84.5 with Spam
> Assassin and Clamd and I have a Test server that I am trying to
> prevent from e-mailing anyone outside 2 certain domains.  I have been
> trying to figure out the best way to set this up so that it does not
> interfere with the production servers or regular e-mails.  But not really clear on the best way to set this up.
>
> I thought about trying to put something in whitelist.rules but want to
> have a clear plan of attack before I try anything to prevent
> disruption of normal e-mails.
>
>
>
> Wanting to do something like
>
> When From: ip.tst.srv.add           Only Allow to send to: our.domain.com<http://our.domain.com> &
> this domain.com<http://domain.com> (and block anything not to that domain)
>
>
>
> Any thoughts would be greatly appreciated
>
>
>
>
>
> Aaron Sampson
>
> IT Department
>
>
>
>
> --
> MailScanner mailing list
> mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscanner.info>
> http://lists.mailscanner.info/mailman/listinfo/mailscanner
>
> Before posting, read http://wiki.mailscanner.info/posting
>
> Support MailScanner development - buy the book off the website!
>



--

--

Alex Neuman van der Hans
Reliant Technologies / Vida Digital
http://vidadigital.com.pa/

+507-6781-9505<tel:%2B507-6781-9505>
+507-832-6725<tel:%2B507-832-6725>
+1-440-253-9789<tel:%2B1-440-253-9789> (USA)

Follow @AlexNeuman on Twitter
http://facebook.com/vidadigital


-- So-called "legal disclaimers" are not legally binding, so don't bother. A cute graphic saying "save the planet, don't print this" can potentially create more CO2, not less, so don't bother either.
--
MailScanner mailing list
mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscanner.info>
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!
--
MailScanner mailing list
mailscanner at lists.mailscanner.info<mailto:mailscanner at lists.mailscanner.info>
http://lists.mailscanner.info/mailman/listinfo/mailscanner

Before posting, read http://wiki.mailscanner.info/posting

Support MailScanner development - buy the book off the website!

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.mailscanner.info/pipermail/mailscanner/attachments/20120919/8a494418/attachment.html 


More information about the MailScanner mailing list