Check exim queue size before trying to load it

Version 1.53


When accessing CMD_MAIL_QUEUE to view the mail queue, DA will now call: exim -bpc before trying to load the queue.. on the assumption this command uses other means (cache?) to count the files, rather than actually reading all messages, which is slow. New internal default value in directadmin: mq_exim_max_load_size=2000 If the result of exim -bpc is greater than mq_exim_max_load_size, then an intermediate warning page is shown, with a button to try anyway. This will add the GET values of force=yes telling DA not to worry about it and show it anyway. When forced, the initial exim -bpc call is not done, in case that call itself is slow, where it's not needed since we're going to jump straight into loading the queue no matter what. ======== JSON and CMD_API_MAIL_QUEUE when json=yes is added to the GET, the this is a sample output: { "error": "true", "mq_exim_max_load_size": "2000", "queue_size": "2001", "text": "Queue size (2001) is larger than the maximum value (2000) and may timeout. Click to try anyway.", "use_request": "sort1=2&json=yes&force=yes" } where the use_request takes the current GET (no matter what it is, sorts, etc..) and adds force=yes to the end. This may help in the event a specialized search is done, so that it's preserved during the force. If you call CMD_API_MAIL_QUEUE and hit the limit error, then it's a URL encoded string, rather than json format. But same variable names and values.

Interested to try DirectAdmin? Get a 30-day Free Trial!