Postfix Integration - Run another filter first

Glenn Steen glenn.steen at gmail.com
Fri Aug 8 13:29:52 IST 2008


2008/8/7 Joseph Jamieson <jjamieson at futurefoundations.com>:
> That would work (maybe) although I suck at perl if there's any advanced
> coding required.   As long as the code isn't too complicated I *think* I
> could get by.   I'm not a programmer by trade but I can write some php
> and bash scripts.
>
> If this were to work ideally, I'd be able to use a custom scanner within
> MailScanner which will add some header tags which could then be picked
> up by SpamAssassin - meaning, it will integrate better into the system
> as I can add it as a score line item.   I like the idea of integrating
> many different techniques into a single scoring system.   It helps
> reduce false positives and reduce spam.  I hate letting a single
> technique block messages altogether - such as RBL blocks or dynamic IP
> ranges.   Much rather have those things add a few points to the total
> score.
>
> Am I right about the postfix/filter order though?   Does postfix send
> messages to the HOLD before running the other items listed in master.cf?

Don't think so.
As Leland points out, cleanup is responsible for the header/body
checks, so anything up until that will be prior to MailScanner, while
anything after that will also take place after MailScanner (things
handled by the diverse delivery methods... Like recipient spliting
(look at http://wiki.mailscanner.info/doku.php?id=documentation:configuration:mta:postfix:how_to:split_mails_per_recipient
to see how to solve things like that)).
Since filters are handled by the smtpd process (BEFORE, AFTER and
milter ...), you should be good.
Might be talking out of my rear end, but I don't thinks so:-).

Cheers
-- Glenn

> -----Original Message-----
> From: mailscanner-bounces at lists.mailscanner.info
> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf Of Julian
> Field
> Sent: Thursday, August 07, 2008 4:14 PM
> To: MailScanner discussion
> Subject: Re: Postfix Integration - Run another filter first
>
>
>
> Joseph Jamieson wrote:
>>
>> Greetings,
>>
>> I'm pretty new to MailScanner, but I do have a working system and it
>> works.
>>
>> I am having trouble tracking down a few bits of information, though -
>> and this is mostly a Postfix question but I figured someone here might
>
>> know.
>>
>> MailScanner uses the Postfix header-checks "HOLD" feature to scan the
>> messages. Postfix drops the message into the hold folder, and every
>> few moments MailScanner will check the folder, scan all the messages,
>> and then drop it into a folder for postfix to grab and continue
>> sending the message on its way.
>>
>> At what time in the process does Postfix do this? It appears that
>> postfix will do this before pretty much anything else. So, if I have a
>
>> filter set up in the master.cf (for instance, dspam) MailScanner
>> always gets a hold of the message first. What if I wanted to use dspam
>
>> to tag a message probability, and add some scores to SpamAssassin
>> (which is run by MailScanner?) That way, MailScanner remains the only
>> system that's doing any tagging, quarantining, etc.
>>
>> DSPAM is just an example. I can think of several other nice little
>> things I'd like to be able to do, too.
>>
>> So, I guess the question is: Is there any way to run a filter via
>> Postfix **before** MailScanner gets its turn? Or do I have it all
>> wrong here?
>>
> You could implement DSPAM (or others) as a generic virus scanner or a
> custom spam scanner within MailScanner. How about that approach instead?
>
> It will take you a bit of digging in the MailScanner code to implement,
> but the hooks are there, and I probably even wrote you some sample code
> in CustomConfig.pm or
> /usr/lib/MailScanner/MailScanner/CustomFunctions/*.pm.
>
> Jules
>
> --
> Julian Field MEng CITP CEng
> www.MailScanner.info
> Buy the MailScanner book at www.MailScanner.info/store
>
> MailScanner customisation, or any advanced system administration help?
> Contact me at Jules at Jules.FM
>
> PGP footprint: EE81 D763 3DB0 0BFD E1DC 7222 11F6 5947 1415 B654
> PGP public key: http://www.jules.fm/julesfm.asc
>
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
>
> --
> 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!
>



-- 
-- Glenn
email: glenn < dot > steen < at > gmail < dot > com
work: glenn < dot > steen < at > ap1 < dot > se


More information about the MailScanner mailing list