Filter by IP

Sampson, Aaron Sampson at p2sol.com
Fri Sep 21 15:30:03 IST 2012


@Alex I did have this set to store while testing.
@Dave I will have to try setting it up again and ending with the : I do not believe we have any of the settings ending in that though, but I will have to go back and double check that.

And I can't do MailScanner --lint or show the mail log since I had to undo all of the changes since it was not delivering mail to the entire company and I quickly had to put it back.  I'm going to try to set up a couple of test servers today to recreate the problem (as long as I don't have any other fires to put out) and will post the info back on here.

-----Original Message-----
From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Alex Neuman
Sent: Friday, September 21, 2012 7:50 AM
To: MailScanner discussion
Subject: Re: Filter by IP

I would try "store" instead of "delete" at least while we're testing.
That way you can get stuff back.

On Thu, Sep 20, 2012 at 9:45 AM, Sampson, Aaron <Sampson at p2sol.com> wrote:
> To: *@allow.domain1.com deliver header "X-Spam-Status: No"
>
> To: *@allow.domain2.com deliver header "X-Spam-Status: No"
>
> From: 192.168.xxx.xxx delete
>
> From: 192.168.xxx.xxx delete
>
> From: 192.168.xxx.xxx delete
>
> FromOrTo: default deliver header "X-Spam-Status: No"
>
>
>
> Tried this with and without adding the deliver header "X-Spam-Status: No"
>
>
>
>
>
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of John 
> Clancy
> Sent: Thursday, September 20, 2012 8:33 AM
>
>
> To: MailScanner discussion
> Subject: Re: Filter by IP
>
>
>
> I'm not an expert by any means but perhaps doing an 'od -c' on the 
> file and posting it here might help someone to spot the problem.
>
>
>
> JC
>
> ----- Original Message -----
>
> From: Sampson, Aaron
>
> To: MailScanner discussion
>
> Sent: Thursday, September 20, 2012 2:15 PM
>
> Subject: RE: Filter by IP
>
>
>
> No it was created on UNIX on the e-mail server
>
>
>
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Steve 
> Campbell
> Sent: Thursday, September 20, 2012 7:27 AM
> To: mailscanner at lists.mailscanner.info
> Subject: Re: Filter by IP
>
>
>
> This isn't a DOS, instead of a UNIX file, perhaps? Was it created and 
> modified on the server or did you copy it from a Windows machine? Do 
> you need to run dos2unix on it?
>
> steve campbell
>
> On 9/19/2012 3:01 PM, Steve Campbell wrote:
>
> Are you certain you didn't type ";" instead of ":" in you rule file? 
> It sort of indicates that one of your lines needs that ":" in it
>
> steve campbell
>
> On 9/19/2012 2:25 PM, Sampson, Aaron wrote:
>
> I did make sure that the capitalization was the same through it all 
> and that everything was spaced out the same as well, still got the 
> same error message.  Did discover that everything seemed to be working 
> properly with Mail Scanner until I attempted to send out an e-mail 
> from one of the domains that I had listed.  Once that e-mail attempted 
> to go through the system the syntax error appeared.
>
>
>
> 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:r
> ulesets: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 deliver
> To: @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> 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 deliver
> to: *@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] 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 deliver
> To: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> 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
>> &
>> this 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
>> 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
> +507-832-6725
> +1-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
> 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
> 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
> 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
> 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
+507-832-6725
+1-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
http://lists.mailscanner.info/mailman/listinfo/mailscanner

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

Support MailScanner development - buy the book off the website! 


More information about the MailScanner mailing list