Exim queue over html interface

nservices

Verified User
Joined
Dec 11, 2008
Messages
302
Hi,
there is some way to display the Exim mail queue
over browser interface ?

Best Regards,
Star Network.
 
its should work ?

PHP:
<?php
	exec('/usr/sbin/exim -bp', $out);
	print_r($out);
?>
 
any explanation ?

I answered your question. Your question was a yes or no question. You did not ask HOW to do it. You just asked if it could be done. Yes it can be done.

exec is considered a dangerous command and should NOT be enabled for everyone on the server.
 
it only to the administrator

Thanks for your answer,
how i can show this Exim queue to one of my resellers / users ?
 
@scsi, Useless, as the queue changes dynamically; often many times a second.

@nservices, it would be a violation of other users' privacy to show one user or reseller the entire queue, becaue it contains information on email to/from other users.

And it would cause prohibitive server load to try to sort out the emails based on user, because it would require that in some couses thousands of emails be grepped, and thousands of table lookups, to determine which user or reseller would be responsible for specific emails.

Unfortunately this is probably something the administrator will continue to have to handle. Hopefully you have a privacy policy in place as reading emails could in some cases, in some jurisdictions, be covered under various laws.

Jeff
 
this is server for one user

is the owner of the server
but i need to give him only reseller access, not admin
(security, Backups from other servers, etc...)
so i don't have any privacy problem.

i can use the next script ?
PHP:
<?php
    exec('/usr/sbin/exim -bp', $out);
    print_r($out);
?>

Best Regards,
Star Network.
 
By the time you did all of this posting and waiting for a reply you could have simply tried it.
 
Here's what the exim man page says about exim -bp:
-bp

This option requests a listing of the contents of the mail queue on the standard output. If the -bp option is followed by a list of message ids, just those messages are listed. By default, this option can be used only by an admin user. However, the queue_list_requires_admin option can be set false to allow any user to see the queue.
I'm not sure how exim decides the admin user but you can certainly set the option noted in your exim.conf file. However my guess is that you may still have so many messages in your queue that the php will time out.

Note also I don't know php well enough to know if $out can hold an extremely long array of hundreds to thousands of lines.

Jeff
 
Back
Top