Mehmet Avcioglu:
> On Sun, Dec 11, 2022 at 3:27 PM Mehmet Avcioglu <[email protected]> wrote:
>
> > Is it possible to log the result of a table lookup? Perhaps similar to the
> > header_checks INFO option.
>
> I guess it is not.
>
> I can write a daemon that acts like a tcp map and log the results, but I
> wouldn't be able to match those log lines to other logs as I wouldn't get
> the queue id? Is there a way to achieve this?
Not inside Postfix itself. Postfix code that knows about queue IDs
and other email-related context is 1-2 layers away from the code
that does the lookup; that code knows nothing about email at all.
However, Postfix does make information from multiple layers available
for policy decisions:
- The policy protocol (www.postfix.org/SMTPD_POLICY_README.html),
- The Milter prototool (www.postfix.org/MILTER_README.html). Milters
can be implemented in C, Python, Perl, PHP, and other languages.
- Other external content filters.
Wietse