New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
check_mailq with mailscanner #754
Comments
Mailscanner sets up multiple mail queues. Are you specifying the right mail queue name? You might need a few invocations of |
well if i let it to autodetect then i get on line 355 an error
if i specify the mailserver (exim, sendmail or whatever) then my mail queue is zero.
there were 3 mail server specified that also gave errors:
OS: Almalinux 8.9 |
upon further checking i found out that: Mailq can usually only be accessed by root or a TrustedUser. so i added visudo: |
help ? |
Looking at how this plugin works, it does not provide a way to specify multiple queues. So it is going to be hard to make it useful with a mailscanner install. The default queue (iirc) for mailscanner is used for incoming mail on the server. Then mailscanner processes batches of that mail and puts it into another queue for delivery. It sounds like that queue is where your problems are. And since you would have to provide an option to the |
i see. ok. thank you. |
I haven't used exim, so I'm not sure if there's anything unique to that. I don't see any way to get the plugin to work in your scenario without tweaking the code. |
so mailscanner is using exim. but to get the mail queue they use this command: |
There is an option in the source for adding arguments to the mailq command, but it seems to only work in sendmail and postfix. For exim, it looks like you would need to tweak the source somehow to support what you are looking for. |
I made a potential fix in this PR. Does this fix your issue? |
hello, i did what you suggested. how should the command look like ? because i tried this:
didnt work.
didn't work. for comparison:
this is what it should get me. |
Try it without the
|
|
I apologize, I messed up the command, it should be
|
this should have shown:
|
Oh I see what's going on here, exim changed the structure of the message ID's at some point. I added a fix for this. Can you try the PR now? |
thank you for your help. still using these commands doesnt change anything:
|
What does the output of Does it differ from How about |
so :
|
That's strange that https://www.exim.org/exim-html-current/doc/html/spec_html/ch-the_exim_command_line.html The exim documentation says that If you do What version of exim do you have? When you say you updated the 510 line, did you also do the rest of the changes in the PR? I'm referring to the changes allowing the |
you mean if i added:
and so on ? here is my check_mailq file in txt |
What's your output of
|
|
I see. The plugin is expecting that mailq is from exim with the exim formatting.
Would you be able to try making it such that mailq is provided by exim instead of ssmtp and then try the plugin again? |
i'm sorry but i don't know how to do that. also i tested your command on different server (all of them are cpanel). on cloudlinux 8:
and on cloudlinux 7:
|
If you try reinstalling exim with |
i opened a ticket at cpanel. this is their official resposne: Thank you for contacting cPanel Technical Support! I see that you are a cPanel Partner. We appreciate your business and thank you for choosing cPanel! At this time the cPanel team does not ship the mailq binary with exim: [20:32:05 artemis root@95244923 It is provided by the ssmtp package as you mentioned. [20:32:34 artemis root@95244923 ~]cPs# rpm -qf $(which mailq) You would need to file a feature request for cPanel to also provide mailq. You can do this on our website here: How to submit a feature request You could attempt to create your own exim package to include mailq, details to do that in our documentation here: If you need anything else don't hesitate to contact us again. |
Well I don't think I can help a whole lot in this situation anymore as I don't have access to anything cpanel related. The plugin was designed to call the mailq command and parse it depending on whatever mail agent you specified because many different packages provide mailq. If you need to use exim, you need mailq to be equivalent to |
Kind of a hack, but can you try either configuring nagios plugins with,
or modifying the Then the command looks like
|
Fix [#754]: Add config directory option for exim mailservers
Hello,
I have a few cpanel servers that are running on configserver mailscanner.
If I specify in check_mailq the mailserver it mostly says that there is no email in queue even though I have over 100 mails in queue right now.
Can it be that mailscanner is not working with mailq plugin ? or is there a way to make both work ?
The text was updated successfully, but these errors were encountered: