Skip to content

mailwatch_milter_relay: very long execution time and high sql load #1265

@dneuhaeuser

Description

@dneuhaeuser

When running 'mailwatch_milter_relay.php' I observed that a run with '--refresh' (e.g. via cron) takes longer and longer, rising while mail.log is growing, from several minutes ultimatively to hours.
In this time there are very high loads on the mysql process.

When looking at the script I ask myself whether the code from line 143 onward really needs to be executed for each and every line in the logfile (each execution of function 'process_entries').

// Scan queue for delivery attempts in queue and matching maillog entries

I believe it should probably be sufficient to run the codelines 143-163 only ONCE AFTER all logfile lines are processed.
All necessary informations for this are in the $idqueue array, right?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions