Help - Search - Members - Calendar
Full Version: Queue not retrying
The Planet Forums > Control Panels > Plesk
Synozeer
The mail queue on my server doesn't appear to be working correctly. Emails that weren't sent successfully the first time end up in the sendmail queue and never get retried again. I have email in my queue from 15 days ago (the last time I emptied my queue manually). The emails in the queue are legitimate emails sent from my site.

Any help would be appreciated.

Thanks,

Adam
Synozeer
Bump...

Anyone know the answer or have any ideas?

-Adam
NightHawk
QUOTE
Originally posted by Synozeer
Bump...

Anyone know the answer or have any ideas?

-Adam


Try qrepair


##############qmail repair
cd /tmp
wget http://www.qcc.sk.ca/~charlesc/software/qu...ir-0.8.4.tar.gz
tar xzf queue-repair-0.8.4.tar.gz
mv queue-repair-0.8.4 queue-repair
cd queue-repair
pico -w queue_repair.py
#change the default_basepath from /var/qmail to /usr/local/psa/qmail
#so that it looks like:
default_basepath = '/usr/local/psa/qmail'
#then to run it in repair mode
./queue_repair.py -r


not sure what all you have done to your queue to get it in that shape.....but this will hopefully sort it out.
Synozeer
Is that fix only for qmail? My server appears to be using sendmail to deal with the queue.

As a matter of fact, I seem to have two queues, one for qmail and one for sendmail. It's the sendmail queue that doesn't look like it's getting rid of old emails.

Adam
NightHawk
QUOTE
Originally posted by Synozeer
Is that fix only for qmail? My server appears to be using sendmail to deal with the queue.

As a matter of fact, I seem to have two queues, one for qmail and one for sendmail. It's the sendmail queue that doesn't look like it's getting rid of old emails.

Adam


yes, that is only for qmail...as plesk runs qmail. Sorry, but I don't have any magic fixes for sendmail.

Please reply with what type of server you have (ie: ensim or plain redhat) and I will be glad to move this thread over to a section of this forum where someone will be able to help you.
Synozeer
Hmmmm, I have a Plesk and it's running both sendmail and qmail. Maybe that's the problem? Why would it be using sendmail, and how can I force it to use qmail? I have Redhat 7.1.

Here's a clip out of /var/log/maillog:

QUOTE
Feb  4 16:41:25 plesk sendmail[6446]: h14LfPL06446: from=apache, size=651, class=0, nrcpts=1, msgid=<200302042141.h14LfPL06446@plesk.insanepictures.com>, relay=apache@localhost
Feb  4 16:41:25 plesk sendmail[6444]: h14LfPc06444: from=apache, size=177, class=0, nrcpts=1, msgid=<200302042141.h14LfPc06444@plesk.insanepictures.com>, relay=apache@localhost


You can see it's definitely using sendmail here.

Adam
NightHawk
QUOTE
Originally posted by Synozeer
Hmmmm, I have a Plesk and it's running both sendmail and qmail. Maybe that's the problem? Why would it be using sendmail, and how can I force it to use qmail? I have Redhat 7.1.

Here's a clip out of /var/log/maillog:



You can see it's definitely using sendmail here.

Adam


ok..then you have a few problems....

start with rpm -qa | grep sendmail ...to see if sendmail is really there....

if it is..you need to remove it... **warning** this may break your ability to send/recieve email**/warning**

then you need to get the plesk qmail running again....

hopefully you can do this the easy way...but reinstalling the last plesk patch.. (5.0.4..unless you are running 2.5.5).

Now, you are wondering...how did I get sendmail running on my server???
my best guess...without logging in..woudl be ..you run up2date or something similiar...and let it update sendmail, but since sendmail didn't really exist..it installed it.

Hope that helps cool.gif
Synozeer
First, thanks for the help you're giving me. icon_smile.gif

Okay, here's the nitty gritty. I'm on Plesk 2.5.

rpm -qa | grep sendmail results in:

sendmail-cf-8.11.6-2.7.1
sendmail-8.11.6-2.7.1

I did/do use up2date, so that's probably how it got on my server.

Plesk qmail is running alongside sendmail. It's just that some scripts are using sendmail, while the server itself is using qmail. Will uninstalling sendmail automatically cause my script to start using qmail? I can't really risk uninstalling sendmail if my mail is going to go down for any period of time.

If I stick with sendmail, will flushing the sendmail queue every x hours via sendmail -q be a wise move?

Thanks,

Adam
NightHawk
QUOTE
Originally posted by Synozeer
First, thanks for the help you're giving me. icon_smile.gif

Okay, here's the nitty gritty. I'm on Plesk 2.5.

rpm -qa | grep sendmail results in:

sendmail-cf-8.11.6-2.7.1
sendmail-8.11.6-2.7.1

I did/do use up2date, so that's probably how it got on my server.

Plesk qmail is running alongside sendmail. It's just that some scripts are using sendmail, while the server itself is using qmail. Will uninstalling sendmail automatically cause my script to start using qmail? I can't really risk uninstalling sendmail if my mail is going to go down for any period of time.

If I stick with sendmail, will flushing the sendmail queue every x hours via sendmail -q be a wise move?

Thanks,

Adam


ok..here is the dirty ugly quickest fix that "should" work.

**Disclaimer** I am not responsible if this breaks anything..but is has worked in the past on my first plesk server..when I made this same mistake**/Disclaimer**

######
su -
rpm -e --nodeps sendmail
rpm -e --nodeps sendmail-cf
##then you have to put the symlinks back in..so that qmail can accept mail sent to sendmail###
cd /usr/sbin
rm -f sendmail
ln -s /usr/local/psa/qmail/bin/sendmail /usr/sbin/sendmail

###
that should do it..if it doesn't...try running the qrepair script I gave you above...

Hope that helps
cool.gif
Synozeer
Okay, I found out how to switch it to qmail. Ends up any problem using the mail() command from php was set to use sendmail. I just went into php.ini, changed it to qmail, and voila, the server is now using qmail to send ALL mails.

Once I make sure everything is working as is and is stable, I'll go and remove sendmail from the server.

BTW, I'm using /usr/local/psa/qmail/bin/qmail-inject, not /usr/local/psa/qmail/bin/sendmail. Is there any difference between the two?

Thanks,

Adam
NightHawk
QUOTE
Originally posted by Synozeer
Okay, I found out how to switch it to qmail. Ends up any problem using the mail() command from php was set to use sendmail. I just went into php.ini, changed it to qmail, and voila, the server is now using qmail to send ALL mails.

Once I make sure everything is working as is and is stable, I'll go and remove sendmail from the server.

BTW, I'm using /usr/local/psa/qmail/bin/qmail-inject, not /usr/local/psa/qmail/bin/sendmail. Is there any difference between the two?

Thanks,

Adam


There is no need to change the php.ini if you reconfigure things back to plesk standards. That is the purpose of the symlink. It makes it to where any calls to /usr/sbin/sendmail get passed to qmail properly.
Synozeer
Uh oh.. trouble.

I did what you said and changed back php.ini back, but now qmail isn't working anymore. No mail is getting through.

My last messages in maillog are:

QUOTE
Feb  4 17:30:37 plesk qmail: 1044397837.174227 alert: cannot start: qmail-send is already running
Feb  4 17:32:17 plesk qmail: 1044397937.183662 alert: cannot start: qmail-send is already running


Ran repair again too, but nothing.

Suggestions?
NightHawk
QUOTE
Originally posted by Synozeer
Uh oh.. trouble.

I did what you said and changed back php.ini back, but now qmail isn't working anymore. No mail is getting through.

My last messages in maillog are:



Ran repair again too, but nothing.

Suggestions?


looks like qmail is running...

I woudl suggest you kill qmail...check ps aux ..make sure it is stopped ..kill any remaining proccess...and restart it..if you have done everything else I listed above...barring any other unforseen options...then everything should work..it did on my first plesk box... (before I learned not to let autorpm update the sendmail).
Synozeer
Tried... now my maillog looks like this:

QUOTE
Feb  4 17:50:04 plesk qmail: 1044399004.439825 warning: unable to open todo/4203078
Feb  4 17:50:04 plesk qmail: 1044399004.440573 warning: unable to open todo/4203079
Feb  4 17:50:04 plesk qmail: 1044399004.441314 warning: unable to open todo/4203080
Feb  4 17:50:04 plesk qmail: 1044399004.442061 warning: unable to open todo/4203081
Feb  4 17:50:04 plesk qmail: 1044399004.442801 warning: unable to open todo/4203082
Feb  4 17:50:04 plesk qmail: 1044399004.443546 warning: unable to open todo/4203083
Feb  4 17:50:04 plesk qmail: 1044399004.444438 warning: unable to open todo/4203084
Feb  4 17:50:04 plesk qmail: 1044399004.445278 warning: unable to open todo/4203085
Feb  4 17:50:04 plesk qmail: 1044399004.446113 warning: unable to open todo/4203086
Feb  4 17:50:04 plesk qmail: 1044399004.450486 delivery 294: failure: Sorry._Although_I'm_listed_as_a_best-preference_MX_or_A_for_that_host,/it_isn't_in_my_control/locals_file,_so_I_don't_treat_it_as_local._(#5.4.6)/
Feb  4 17:50:04 plesk qmail: 1044399004.458464 status: local 0/10 remote 2/20
Feb  4 17:50:04 plesk qmail: 1044399004.459850 triple bounce: discarding bounce/4202880
Feb  4 17:50:04 plesk qmail: 1044399004.460631 end msg 4202880


Ideas?

Thanks,

Adam
NightHawk
my 2 best suggestions.....

1) stop qmail and then re-run qrepair

or

2) reinstall the 2.5.5 patch...after stopping qmail...the plesk patch will normally sort out qmail issues.
Synozeer
After a few restarts, it's working and sending out emails, but the logs are still full of the "warning: unable to open todo" error messages. I also realized I have Plesk 2.0, not 2.5, so I can't use the update patch.

Also, when I ran the queue-repair program, it said it could not find the big-todo, which is probably what's causing the error messages I'm getting.

Do you think reinstalling qmail is my best bet here?

Adam
NightHawk
QUOTE
Originally posted by Synozeer
After a few restarts, it's working and sending out emails, but the logs are still full of the "warning: unable to open todo" error messages. I also realized I have Plesk 2.0, not 2.5, so I can't use the update patch.

Also, when I ran the queue-repair program, it said it could not find the big-todo, which is probably what's causing the error messages I'm getting.

Do you think reinstalling qmail is my best bet here?

Adam


upgrade to 2.5.5 ...it's free..and will fix your qmail problem...as you will be deinstalling plesk..and putting it back...which means brand spanking new qmail...problem solved cool.gif
Synozeer
Know where to get the installation files? I don't see it on the Plesk website. Also, is it easy to upgrade? Since I'm not as "server savy" as I'd like, if it's not pretty straightforward I'll probably screw it up.

Adam
NightHawk
QUOTE
Originally posted by Synozeer
Know where to get the installation files? I don't see it on the Plesk website. Also, is it easy to upgrade? Since I'm not as "server savy" as I'd like, if it's not pretty straightforward I'll probably screw it up.

Adam


If you goto http://forum.plesk.com you can find a step by step how-to to follow...and the files should be available in the download section of the plesk website ...if not...use the anonftp.
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2009 Invision Power Services, Inc.