CentOS php mail issues after restart and plesk control panel issue
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
CentOS php mail issues after restart and plesk control panel issue
Please see below the ticket I raised with our server providers (who were unable to provide any level of support because we changed our SSH port and upgraded PHP, months before the issue arose!)
"
- A colleague of mine changed the password for a mysql user (a custom user, not an important system user)
- The Plesk control panel was inaccessible, simply saying that there was a "PleskFatalException"
- After ringing technical support, an engineer restarted the server and fixed the Plesk control panel, allowing us access
- The control panel and mysql were now the only things working, as the server hadn't started up numerous services on reboot such as apache
- We manually started up the apache service, so that our websites were working but FTP and SSH were still unavailable.
- As apache hadn't started on the reboot, we thought that this may have occurred with other services - we enabled FTP and SSH after having to manually alter the firewall rules and restarted the server again.
- After this reboot everything was working, including the Control Panel, FTP, SSH, SQL and Apache. However, it became apparent that the PHP mail() function was no longer sending out emails (the code always has, and does work fine).
- After some testing I have found that the mail() function is returning success, and those emails are showing up when I log in to the server using SSH and use the command 'mailq'.
- When I run 'mailq' it does however report this error:
"postqueue: warning: Mail system is down -- accessing queue directly"
- I have researched this error and apparently this is an error generated by the 'postfix' service
"
As stated above, the emails processed by the PHP mail() function appear when i type 'mailq' but i get a postqueue warning. This issue stays apparent whether i set the sendmail_path php config to /usr/sbin/sendmail or /var/qmail/bin/sendmail - we were told that the server should be using Plesk and qmail, but the fact that we are getting postfix errors means they won't help.
Lack of knowledge = lack of required details in many cases. In which case, let me know what you'd need to know in order to help/provide us with any ideas.
Running 'service postfix stop' or 'service sendmail stop' both return "failed", /var/log/messages and maillog both stay empty or have nothing relevant in them.
'service sendmail status' returns stopped or "dead but subsys locked" - deleting lock and restarting service gets same result
'service postfix status' returns "master is stopped" ???
Any light that can be shed on this matter would be incredibly helpful as none of our websites are able to send confirmation emails etc
- When I run 'mailq' it does however report this error:
"postqueue: warning: Mail system is down -- accessing queue directly"
- I have researched this error and apparently this is an error generated by the 'postfix' service
"
....
Running 'service postfix stop' or 'service sendmail stop' both return "failed", /var/log/messages and maillog both stay empty or have nothing relevant in them.
'service sendmail status' returns stopped or "dead but subsys locked" - deleting lock and restarting service gets same result
'service postfix status' returns "master is stopped" ???
It would help to restart Postfix
Code:
# service postfix restart
then you can watch if mail queue will get processed, otherwise you can
Thanks for the reply lithos, however I've tried those things and get the following.
Code:
~]# service postfix restart
Shutting down postfix: [FAILED]
Starting postfix: [ OK ]
Code:
~]# postqueue -f
postqueue: fatal: Cannot flush mail queue - mail system is down
I've tried most of the common "fixes" so far, including deleting syslocks as mentioned in the previous post, force killing processes etc etc - I guess we're just really special?
See output below. I assumed sendmail as that's PHP's default, but our provider said it should be using Plesk which uses qmail. Then when I did 'mailq' it threw an error which I was told got thrown by postfix - at this point there's so many options flying about I have no idea!
See output below. I assumed sendmail as that's PHP's default, but our provider said it should be using Plesk which uses qmail. Then when I did 'mailq' it threw an error which I was told got thrown by postfix - at this point there's so many options flying about I have no idea!
Code:
~]# alternatives --display mta
mta - status is manual.
Current `best' version is /var/qmail/bin/sendmail.
Darn, I have no idea about qmail, sorry.
From what I read here it's qmail who replaces sendmail,
so in my opinion it would need to restart sendmail instead of postfix.
Then it probably should send messages out ?.
Please, if any LQ users have any experience in Qmail, can you help out.
Thanks for getting involved and trying to help - don't worry about not knowing qmail, I'll go through those links you've posted (thanks for posting them) and hopefully I'll get it sorted through those, or another user on the forum might help...
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.