Knowledge base

<email-patterns>

Patterns for parsing non-standard reports
Custom parsing for a receiver that writes in its own way

The block contains patterns by which the engine parses the bodies of non-standard reports. It has two lines: body-pattern-file — the pattern file itself, repeatable; log-match-info — show in the log which of them matched.

The block is nested in a processor, not written at the root of the file. The bounce processor and the complaint processor have their own sets of patterns.

The extracted fields go into accounting and are placed in the record next to what the engine found itself. For analytics a non-standard report then becomes indistinguishable from a standard one.

Example configuration
# each processor has its own set of patterns
<feedback-loop-processor>
    <email-patterns>        body-pattern-file /etc/pmta/spamcop.txt
        body-pattern-file /etc/pmta/other-isp.txt
        log-match-info true
    </email-patterns>
</feedback-loop-processor>
With several files the second line is mandatory during setup: without it you cannot tell which pattern fired.
yellow — — directive names, blue — blocks. They are highlighted the same way in the text of the card.