Server stops accepting emails

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Server stops accepting emails

Unread post by phoenixisp »

Greetings,

Regarding my previous post I have a new problem. I re-installed everything (project-gamers, spamassassin, ClamAV, qmail) and everything works - for a while. The server will stop receiving emails after running for anywhere from 15 minuts to 30 minutes after a reboot. And rebooting is the only way to be able to accept emails. I have tried restarting spamassassin, clamd and the network and no joy.

Another oddity is that I have to manually start qmail with 'qmail-start' after each reboot. Any ideas?

TIA,

Sonny
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

What do you mean exactly with "stops accepting emails"? Are errors being logged in the mail log? If so, which errors? If not, what else is logged in the mail log when a message is coming in?

How is the qmail service being managed? I believe that on Gamera servers you need to use svc to manage the daemons, e.g. svc-start qmail, svc-start smtpd.
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

Hi prupert, thanks for the response.

I run top and see spamd, clamd, perl5.8.8 running as needed and then they stop appearing. When I check the qmail-queue.log it just stops, no errors. When I check the log for /var/log/qmail/current I do see an error a few times but I believe it is benign. It says delivery 348: deferral: Unable_to_chdir_to_maildir._(#4.2.1)/

then

status qmail-todo exiting asap
status exiting

I have also seen (using top) qmail-todo using 98$ processor and it appears to be stuck.

/var/log/messages shows nothing.

Thanks again,

Sonny
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

then they stop appearing
What does 'ps faux' tell you?
/var/log/messages shows nothing.
What does /var/log/maillog tell you?
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

I can't paste because it has too many characters. I am attempting to attach.
Attachments
ps faux.tar.gz
(2.82 KiB) Downloaded 595 times
Sonny
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

How much of the maillog file do you need?
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

I was only telling you to run 'ps faux' to check whether or not the processes were running. 'top' only displays the top activity that fits in your screen, it is not a reliable tool to check if a process is running.

I don't "need" any of your log files. I am just giving you a tip to at least check the maillog for errors. ;-)
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

I'm sorry, guess I didn't understand. I have not used ps faux in the past so I have some checking to do, but the maillog looks fine to me. Any ideas of what COULD be causing this behavior?
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

phoenixisp wrote:I'm sorry, guess I didn't understand. I have not used ps faux in the past so I have some checking to do, but the maillog looks fine to me. Any ideas of what COULD be causing this behavior?
Without any specific information, log messages or errors I don't even know what the problem is exactly.

You are saying that incoming messages are not processed, but that the logs looks fine to you? So you do see an incoming connection being logged? And you do see the message being processed? Have you checked the mail queue (check out the great qmhandle tool, it's in the Atomic yum repository)?

Have you checked that qmail-scanner is configured properly? Is it working -> should log lines in /var/log/maillog? Are the daemons up and running? (service spamassassin status; service clamd status; svc-status qmail; svc-status smtpd)

You say you have installed Project Gamera, so I presume you have set up this box exclusively for Gamera, right? To be clear, you are not hosting mail boxes via a control panel on this server? See the hard to miss "README FIRST!" message at http://www.atomicorp.com/wiki/index.php/Project_Gamera
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

You are correct in that this server is a Project Gamera server only. No sites or control panel.

The logs look fine, until the stop - then the maillog stops as well.

I would think that it's configured correctly since it is scanning for spam, even deleting spam with the proper points assigned. Virus scanner is working, there are messages in the quaratine folder.

While the service is not receiving

#service spamassassin status
spamd (pid 3366) is running...

#service clamd status
clamd (pid 3343) is running...

#svc-status qmail
qmail: up (pid 4988) 787 seconds
qmail/log: up (pid 13554) 0 seconds

#svc-status smtpd
smtpd: up (pid 2035) 944 seconds
smtpd/log: up (pid)13764 0 seconds

Any ideas? Thanks so much for your time and effort.

Sonny
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

phoenixisp wrote:The logs look fine, until the stop - then the maillog stops as well.
Have you tried testing an SMTP connection and sending a test mail over telnet? Check the response code of the SMTP session and the log files for other messages.
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

I may have found something. When the server is not acting correctly, and I run #svc-restart qmail I get an error:

Stopping qmail: ...........svc-stop: fatal error: failed to stop 'qmail" - however, if I run#svc-start qmail it says it's starting. But you cannot restart. However, when the server is acting right the command works.

Doing the same command #svc-restart smtpd works fine.
Sonny
prupert
Forum Regular
Forum Regular
Posts: 573
Joined: Tue Aug 01, 2006 2:45 pm
Location: Netherlands

Re: Server stops accepting emails

Unread post by prupert »

If qmail is down, you cannot stop, you can only start. Thus, restarting a stopped daemon will yield an error. This is expected behavior.
Lemonbit Internet Dedicated Server Management
phoenixisp
Forum User
Forum User
Posts: 76
Joined: Wed Feb 16, 2005 11:30 am

Re: Server stops accepting emails

Unread post by phoenixisp »

Might it be possible that qmail is being knocked down due to a bad queue? I tailed qmail-send and see entries referring to not being able to open local and remote files - will try again later
Sonny
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: Server stops accepting emails

Unread post by scott »

So when its down try running /service/smtpd/run to see if it reports a memory error. If it does, you need to increase

readdefault ulimitdata ulimitdata 80000000

to something higher
Post Reply