Filter by IP

Steve Campbell campbell at cnpapers.com
Thu Sep 20 15:29:38 IST 2012


Just a couple more suggestions, then I'll quit throwing out stupid ideas.

Have you tried running "MailScanner --lint"? You may need to give it the 
full path and the -v option.

Have you considered uploading your config file, along with your rules 
file, so that we may look at it?  As Alex indicated, there seems to be a 
syntax error, and multiple pairs of eyes usually helps me find these 
types or errors. Actually, my own pair of eyes are so old, they really 
don't ever contribute much.

steve


On 9/20/2012 9:58 AM, Sampson, Aaron wrote:
> The problem comes in trying to figure out where I went wrong with it.  I have more than triple checked it and also had another IT guy with WAY more experience has double checked everything as well.  Think we are going to build a test system to play around with and see if we can get this to work, but please keep the ideas coming
> . -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Alex Neuman
> Sent: Wednesday, September 19, 2012 8:40 PM
> To: MailScanner discussion
> Subject: Re: Filter by IP
>
> It *does* say "syntax error", you just have to find out where you're typing it wrong, I guess.
>
> And the e-mails were probably not lost, since you have "store" - in fact, your defaults *should* be, specially when testing, "deliver store" so you *always* have a copy in the quarantine.
>
> On Wed, Sep 19, 2012 at 3:35 PM, Sampson, Aaron <Sampson at p2sol.com> wrote:
>> Yes we double checked it several times and referred back to examples
>> in the documentations to see if we had missed something.  By what we
>> can tell it should work but it seems to break every time an e-mail
>> comes from one of those domains.
>>
>>
>>
>> From: mailscanner-bounces at lists.mailscanner.info
>> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Steve
>> Campbell
>> Sent: Wednesday, September 19, 2012 2:01 PM
>> To: mailscanner at lists.mailscanner.info
>>
>>
>> Subject: Re: Filter by IP
>>
>>
>>
>> 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!
>>
>
>



More information about the MailScanner mailing list