On Wed, Sep 22, 2021 at 10:15:50AM +0200, Sven Schwedas <sven.schwe...@tao.at> wrote:
> On 22.09.21 04:26, Alex wrote: > > Yes, thanks. I realize I can do that - it's the > > "your_script_that_saves_to_sql" part that would be very helpful :-) > > Not sure if there's a one-size-fits-all script that works in all setups, > it's going to be highly individualized. > > > There's also great difficulty with correlating log lines from > > postscreen, smtpd. local, etc, and tracing all of the processes from > > the initial CONNECT through to the eventual delivery. > > We ended up using the queue ID for our log analyzer, but that is only > assigned one step after CONNECT. Other than that it works reasonably well > tho, rspamd and cyrus use it as well, so we can track it through our whole > stack. On that note, you'll probably want to set enable_long_queue_ids = yes. It ensures that queue IDs are unique/non-repeating so that log analysis doesn't get mislead. http://www.postfix.org/postconf.5.html#enable_long_queue_ids cheers, raf