LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices



Reply
 
Search this Thread
Old 06-27-2012, 11:57 AM   #1
AhMatt
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Rep: Reputation: Disabled
Exclamation 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
 
Old 06-27-2012, 12:56 PM   #2
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by AhMatt View Post
.....

- 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
Code:
# postqueue -f
from postfix queue command

You can enable posftix at startup with:
Code:
# chkconfig --levels 235 postfix
Some postfix troubleshooters:
- Centos howto
- debugging
- CentOS configure Postfix

good luck
 
Old 06-27-2012, 01:01 PM   #3
AhMatt
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
No luck

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?
 
Old 06-27-2012, 03:27 PM   #4
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
what does your system show about default mta agent
Code:
# alternatives --display mta
If it's Sendmail, then all above was for nothing.
 
Old 06-28-2012, 06:27 AM   #5
AhMatt
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
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.
 link currently points to /usr/sbin/sendmail.postfix
/usr/sbin/sendmail.sendmail - priority 90
 slave mta-pam: /etc/pam.d/smtp.sendmail
 slave mta-mailq: /usr/bin/mailq.sendmail
 slave mta-newaliases: /usr/bin/newaliases.sendmail
 slave mta-rmail: /usr/bin/rmail.sendmail
 slave mta-sendmail: /usr/lib/sendmail.sendmail
 slave mta-mailqman: /usr/share/man/man1/mailq.sendmail.1.gz
 slave mta-newaliasesman: /usr/share/man/man1/newaliases.sendmail.1.gz
 slave mta-aliasesman: /usr/share/man/man5/aliases.sendmail.5.gz
 slave mta-sendmailman: /usr/share/man/man8/sendmail.sendmail.8.gz
/var/qmail/bin/sendmail - priority 100
 slave mta-pam: (null)
 slave mta-mailq: (null)
 slave mta-newaliases: (null)
 slave mta-rmail: (null)
 slave mta-sendmail: (null)
 slave mta-mailqman: (null)
 slave mta-newaliasesman: (null)
 slave mta-aliasesman: (null)
 slave mta-sendmailman: (null)
/usr/sbin/sendmail.postfix - priority 30
 slave mta-pam: /etc/pam.d/smtp.postfix
 slave mta-mailq: /usr/bin/mailq.postfix
 slave mta-newaliases: /usr/bin/newaliases.postfix
 slave mta-rmail: /usr/bin/rmail.postfix
 slave mta-sendmail: /usr/lib/sendmail.postfix
 slave mta-mailqman: /usr/share/man/man1/mailq.postfix.1.gz
 slave mta-newaliasesman: /usr/share/man/man1/newaliases.postfix.1.gz
 slave mta-aliasesman: /usr/share/man/man5/aliases.postfix.5.gz
 slave mta-sendmailman: /usr/share/man/man1/sendmail.postfix.1.gz
Current `best' version is /var/qmail/bin/sendmail.
 
Old 06-28-2012, 08:18 AM   #6
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
Quote:
Originally Posted by AhMatt View Post
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.

Last edited by lithos; 06-28-2012 at 08:26 AM.
 
Old 06-28-2012, 08:51 AM   #7
lithos
Senior Member
 
Registered: Jan 2010
Location: SI : 45.9531, 15.4894
Distribution: CentOS, OpenNA/Trustix, testing desktop openSuse 12.1 /Cinnamon/KDE4.8
Posts: 1,144

Rep: Reputation: 217Reputation: 217Reputation: 217
This might be interesting for Plesk panel.

good luck
 
Old 06-28-2012, 09:04 AM   #8
AhMatt
LQ Newbie
 
Registered: Apr 2012
Posts: 6

Original Poster
Rep: Reputation: Disabled
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...
 
  


Reply

Tags
centos, php, qmail, sendmail


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Slow SSH Login --> CentOS 5.0 --> VMware Server --> Plesk Control Panel 8.4.0 bskrakes Linux - General 11 12-17-2013 11:10 AM
need help torrent flux installation on fedora 8 with plesk control panel bogwato Linux - Software 0 07-15-2009 11:49 AM
Which is the best Open Source Control Panel [Want good alternatives for WHM/Plesk] vikram_cvk Linux - Software 1 04-19-2009 10:58 AM
[SOLVED] Time Sync Issues - Clock Drift Way Off - CentOS 5.2, VMware 1.0.8, Plesk CP 8.6.0 bskrakes Linux - Server 13 03-02-2009 02:38 PM
plesk control panel question murshed Linux - General 1 12-04-2002 12:13 PM


All times are GMT -5. The time now is 04:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration