Avoid double scanning from MailScanner

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Avoid double scanning from MailScanner

Abi Askushi
Hi All,

The question on the following is: how can I enable MailScanner filtering for both incoming and outgoing emails, without having double scans at incoming emails and none at outgoing?

I have setup the following:

Incoming emails are delivered with SMTP to server -> then forwarded to MailScanner -> then to the filter script -> then to UUCP -> then to alternate postfix server.

The Mailscanner is invoked with header_checks through main.cf:
header_checks = regexp:/etc/postfix/header_checks

cat /etc/postfix/header_checks
/^Received:/    HOLD

The filter is invoked with smtpd options from master.cf, as below:

smtp      inet  n       -       -       -       -       smtpd
    -o content_filter=filter:dummy

The filter does a basic check and increases a counter, then delivers back with local delivery (pickup) the email.

On this step, the pickup triggers again the MailScanner, which is not needed since the MailScanner already did his job.

to avoid this I disabled header_checks at pickup with following option at master.cf:
pickup    fifo  n       -       -       60      1       pickup
    -o receive_override_options=no_header_body_checks

And this resolves the issue for incoming emails.

For outgoing emails though, which come from UUCP (delivered locally through pickup) I do not have MailScanner scanning if I disable the header checks at pickup.

What is your suggestion to have Mailscanner scan once (and not twice) at incoming and once at outgoing (and not none) emails?

Hope hat make sense.

Thanx,
Alex
Reply | Threaded
Open this post in threaded view
|

Re: Avoid double scanning from MailScanner

Bastian Blank-3
On Fri, Mar 30, 2018 at 12:40:53PM +0300, Alex K wrote:
> The Mailscanner is invoked with header_checks through main.cf:
> header_checks = regexp:/etc/postfix/header_checks
> cat /etc/postfix/header_checks
> /^Received:/    HOLD

No, this does not invoke anything, it just puts mails into the hold
queue, where the admin needs to release them, see postsuper -H.

Mailscanner uses unsupported interfaces to get mail.  Please ask them
for help regarding problems with their software.

Bastian

--
Violence in reality is quite different from theory.
                -- Spock, "The Cloud Minders", stardate 5818.4
Reply | Threaded
Open this post in threaded view
|

Re: Avoid double scanning from MailScanner

Abi Askushi


On Fri, Mar 30, 2018 at 1:06 PM, Bastian Blank <[hidden email]> wrote:
On Fri, Mar 30, 2018 at 12:40:53PM +0300, Alex K wrote:
> The Mailscanner is invoked with header_checks through main.cf:
> header_checks = regexp:/etc/postfix/header_checks
> cat /etc/postfix/header_checks
> /^Received:/    HOLD

No, this does not invoke anything, it just puts mails into the hold
queue, where the admin needs to release them, see postsuper -H.
You're right. Wrong word...but you I guess get what I mean. The mail that is put on hold is processed from Mailscanner. 

Mailscanner uses unsupported interfaces to get mail.  Please ask them
for help regarding problems with their software.

Bastian

--
Violence in reality is quite different from theory.
                -- Spock, "The Cloud Minders", stardate 5818.4