• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Plesk doesn't send cron notifications when mail service has never been activated

devTow

New Pleskian
Server operating system version
CentOS 7.9
Plesk version and microupdate number
Plesk Obsidian 18.0.47
Hi there,

I have found what I believe to be a bug but as I do not have 5 helpful posts, I'm not able to use the relevant section.

We used to receive email notifications when errors occured with our fetch-url-type cron jobs until I assume some Plesk update this year changed something and we almost didn't receive any notification after that.
After a lot of tests and searching, here's what I think the situation is :
When you create a new subscription, if you don't activate the mail service, the user is not added to the sendmail DB (in var/lib/plesk/mail/outgoing/data.db). So, if you create a cron job and set it up to receive notifications, the cron daemon will try sending the mail but will not be allowed to (as evidenced by lines in /var/log/cron and /var/log/maillog) and you will have no idea that you're not receiving notifications (which can be a big problem if those are error notifications). If you activate the mail service and then deactivate it, it adds the user to the sendmail DB and fixes the issue.

From discussions I've had with the company that manages our servers, the fact that the user is not added to the sendmail DB if mail service hasn't been activated is wanted behavior by Plesk and a security measure, which I can understand but that leaves us with a problematic situation that needs to be addressed :
- not every subscription needs mail service activated (in fact, very few of our subscriptions use Plesk for their emails)
- when you go to set up a cron job with notifications, Plesk should then check if the user is allowed to send those notification and add the user to the sendmail DB if required!

You can't let people create cron jobs with notifications without even knowing if you're going to be able to send those notifications, this is obviously not acceptable.
For the record, I've tested this on two different Plesk installations, just checked again now with a new subscription on a Plesk obsidian 18.0.47 running on CentOS 7.9

At the very least, we should have a warning on the cron page letting people know that they might have to activate then deactivate the mail service to ensure the notifications will be sent (but that would be a very bad solution, Plesk should just allow the user when a cron job is set up).

I'd really like this to be fixed as I've had to manually activate/deactivate the mail service of about 50 subscriptions to fix the issue for now but I'm sure there will come a time when we'll have to add a cron job to a new subscription and forget to do that little activation/deactivation dance and we'll end up missing important notifications.

If someone of better standing that mine could maybe validate my findings and report it officially as a bug, that would be awesome.
I'm obviously available to answer questions or run tests if needed.

Thanks,
Kind regards
 
A good starting point for this will be to submit it as a bug report here:
 
Hi Peter and thanks for your answer,

I agree, and that's what I wanted to do (as stated in my post) but I'm not allowed to since this my was my first post and you're not allowed to post in that section unless you have 5 helpful posts :
1666075485281.png
Which is why I'm asking if some kind soul with a better reputation than me could be able to confirm the issue and maybe report it?

Kind regards
 
with a better reputation than me
You can also improve your reputation and become a "kind soul" if you participate in discussions, help with your experience those who need help, and give helpful advice. That way, the threshold of 5 useful posts will be passed very quickly.
 
Hi Igor and thanks for chiming in,

Your suggestion might work but I'm not that knowledgeable about Plesk and server management, this isn't my specialty. Also, my time in here isn't really mine (it's my employer's) and as much as I appreciate the people like you and Peter who are frequently helping the community, I'm not sure I can justify spending company time browsing the Plesk forums, looking for problems easy enough for me to help with.
Sorry if I come up as someone who wants help but won't offer it (which isn't who I am if you'll believe it), I turned to the forum because I don't see another way of maybe getting this issue fixed eventually but I should not have to. We're paying for two Plesk licences, I should be able to submit a bug report or a support ticket but as our licences weren't purchased directly with Plesk and as I'm not a regular on the forums, I'm stuck with no support and no way to report the issue directly. That's not okay.

Also, we're straying further and further away from a pretty simple issue, I think, and instead are discussing the way in which the issue is being reported. I'm trying my best to help (myself and others who might be impacted without ever knowing) by reporting an issue in the best way that's made available to me by Plesk.

Kind regards
 
@devTow I have done the report for you. However, I think that the bug is a different one. If the mail service is deactivated, I think it is correct that cron should not be able to send mails either. The bug is more that when the mail service is toggled (deactivated -> activated -> deactivated) cron remains able to send notifications. From my point of view cron should not be able to use the mail service when the mail service is deactivated, so the later is the bug, not the first. See "additional comments" in Plesk cannot send cron notifications when mail service of a subscriber has never been activated
 
Hi Peter,

Thanks a lot for taking the time!
I've discussed this further (because you're bringing up a good point but that asks more questions) in the report post.

Kind regards
 
Back
Top