MailWatch icon indicating copy to clipboard operation
MailWatch copied to clipboard

Wishlist: write mailq data to mysql for multiple server with centralised mysql installs

Open gordoncolyn opened this issue 7 years ago • 4 comments

I have multiple mailscanner servers with a centralised mysql server and web server. Can the postfix mailq script be amended to write data to mysql so that the central web server can see all server mailq's? I propose the script is run every minute. Obviously this is a snapshot of information for reference and to assist in troubleshooting to highlight a large mailq on any one of the servers.

gordoncolyn avatar Sep 09 '17 05:09 gordoncolyn

@gordoncolyn You should be able to adjust the sql parameters in your conf.php to point to the central mysql server. But don't have such a setup here so didn't test it yet.

Skywalker-11 avatar Sep 11 '17 14:09 Skywalker-11

@Skywalker-11 - I think what @gordoncolyn wants is for postfixmailq to be designed like mailwatch_sendmail_queue.php which logs queue info to the database for display by mailq.php.

Currently for postfix implementations, it's live postqueue -p output but only obtainable for the local server.

It might be possible to obtain multiple remote postqueue -p from rpc calls, but it should also be possible to implement sql logging in a similar way that exim / sendmail does.

asuweb avatar Sep 11 '17 17:09 asuweb

Good idea.

As Exim user, I can say that sql logging of queue is useful in some case.

stefaweb avatar Sep 11 '17 18:09 stefaweb

Yep, that is exactly what I need

gordoncolyn avatar Sep 16 '17 07:09 gordoncolyn