Koozali.org: home of the SME Server

qmail ... more problems after antivirus_install.sh

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« on: April 24, 2007, 03:22:18 PM »
Hi

I´m using SME6.01. with SEVERAL addons and because saw alert messages about being a old version I decided to upgrade using that script of Jesper.

Now I have several problems... and basically e-mail is not working.
I need some help even to start to understando HOW BAD is my problem... but here what I know:

[root@panda root]# /var/qmail/bin/qmail-qread |grep local |wc -l
    32


[root@panda root]# /var/qmail/bin/qmail-qstat
messages in queue: 205
messages in queue but not yet preprocessed: 0

I changed permissions here:
[root@panda root]# ls -al /var/qmail/bin/qmail-queue
-rwsrwxr-x    1 qmaild   qmail       12968 Apr 21  2003 /var/qmail/bin/qmail-queue

and here:
[root@panda root]# ls -la /etc/freshclam.conf
-rwx------    1 root     root         1594 Apr 23 11:32 /etc/freshclam.conf


[root@panda root]# rpm -qi qmail
Name        : qmail                        Relocations: (not relocateable)
Version     : 1.03                              Vendor: (none)
Release     : 08                            Build Date: Mon 21 Apr 2003 12:50:49 PM BRT
Install date: Tue 15 Nov 2005 07:02:06 AM BRST      Build Host: sardine.nssg.mitel.com
Group       : Networking/Daemons            Source RPM: qmail-1.03-08.src.rpm
Size        : 820230                           License: Daniel J. Bernstein
Packager    : e-smith developers <bugs@e-smith.com>
URL         : http://cr.yp.to/qmail.html
Summary     : A modern, fast, secure replacement for sendmail
Description :


[root@panda root]# rpm -qa|grep qmail
qmail-1.03-08
e-smith-qmailanalog-1.10.0-01
qmailanalog-0.70-03
qmail-qfilter-1.5-1
qmail-bsmtp-0.1-1
e-smith-qmail-1.8.0-01



ANY help is welcome. There are 50 users w/o e-mail!
Now even send on webmail appears to do not work!

I can be found on MSN  jader31 #AT# terra #DOT# com #DOT# br

Thanks

Jáder
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #1 on: April 24, 2007, 03:28:50 PM »
In a working envorinment I have :

Code: [Select]

-rws--x--x    1 qmailq   qmail       12968 Apr 21  2003 /var/qmail/bin/qmail-queue


maybe it will help when you apply :

chmod uga=+rxwt /tmp

and restart the httpd-admin and httpd-e-smith services.

Harro

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #2 on: April 24, 2007, 04:38:40 PM »
Confucius

I also had that permissions.
I saw a "chmod 4711 qmail-queue" on somewhere.

I just could understand why will happen when that strange (at least to me) chmod is run. Could you explain it to me ? Thanks

I also cannot understand why I should restart http-admin and httpd-e-smith services (to me both are for http... not for qmail).
They should help with webmail problem, but not with this qmail error:

[root@panda root]# tail /var/log/qmail/current |tai64nlocal
2007-04-24 11:37:51.589632500 warning: trouble injecting bounce message, will try later
2007-04-24 11:37:51.590498500 warning: trouble injecting bounce message, will try later
2007-04-24 11:37:51.591349500 warning: trouble injecting bounce message, will try later


BTW: my webmail error is:
"There was an error sending your message: unable to send data"
on compose message window when I press SEND.
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #3 on: April 24, 2007, 04:44:23 PM »
1 of the last updates from Jesper (knuddi) managed to disrupt the effective rights on the /tmp directory. This results in a lot of trouble.

Amavis-ng, httpd-admin and prob. qmail and a few more rely on the /tmp directory. Since the /tmp directory became un-approachable due to the changed rights it's causing a system wide problem.

Maybe the best you can do now is :

change the rights on the /tmp directory as mentioned before and restart the server. See what that brings you.

Your log files will inform you further about any kind of trouble. Would like to know how far this will get you.

Harro

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #4 on: April 24, 2007, 05:01:43 PM »
Hi Confucius

I did the chmod on /tmp and restarted:
qmail
smtpfront-qmail
httpd-admin
httpd-e-smith

but still getting same errors:

#tail -f /var/log/qmail/current |tai64nlocal
2007-04-24 12:00:09.765405500 warning: trouble injecting bounce message, will try later

and same error on webmail too.

Here is a ps gaux|grep qmail:
[root@panda root]# ps gaux|grep qmail
root       498  0.0  0.0  1280  264 ?        S    08:13   0:00 supervise qmail
qmaill     521  0.0  0.0  1292  264 ?        S    08:14   0:00 /usr/local/bin/mu
qmaill     528  0.0  0.0  1292  264 ?        S    08:14   0:00 /usr/local/bin/mu
qmaill     534  0.0  0.0  1296  228 ?        S    08:14   0:00 /usr/local/bin/mu
qmailq    9471  0.4  8.8 50088 44960 ?       S    09:27   0:45 clamd
qmailq   19973  0.0  8.8 50088 44960 ?       S    11:27   0:00 clamd
qmails   23009  0.0  0.0  1344  376 ?        S    11:56   0:00 qmail-send
root     23011  0.0  0.0  1296  276 ?        S    11:56   0:00 qmail-lspawn  /Ma
qmailr   23012  0.0  0.0  1296  284 ?        S    11:56   0:00 qmail-rspawn
qmailq   23013  0.0  0.0  1288  304 ?        S    11:56   0:00 qmail-clean
qmaild   23095  0.0  0.0  1348  468 ?        S    11:56   0:00 /usr/local/bin/tc
root     23754  0.0  0.1  1676  576 pts/0    R    12:03   0:00 grep qmail

On SME panel of Antivirus I have several messages not delivered with this error:
    Error: Cannot connect to /var/lib/clamav/clamd.sock.

But it´s there:
[root@panda root]# ls -la /var/lib/clamav/clamd.sock
srwxrwxrwx    1 qmailq   qmail           0 Apr 24 09:28 /var/lib/clamav/clamd.sock


Could we double check step by step qmail / amavis / smtpfront  to be sure each pass is ok before move next one ?

Thanks by your time AND patience! ;)

Jáder
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #5 on: April 24, 2007, 05:13:43 PM »
See if there is anything usefull in this thread.

http://forums.contribs.org/index.php?topic=12831.0

Quote

On SME panel of Antivirus I have several messages not delivered with this error:
Error: Cannot connect to /var/lib/clamav/clamd.sock.


service clamd restart

Also related to /tmp I think. The sock maybe be there as a file but doesn't mean it's used, can be that clamd tripped and had no option to remove the sock.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #6 on: April 24, 2007, 06:50:53 PM »
Hi

I have no /tmp problem, see:

[root@panda root]# ls -lad /tmp/
drwxrwxrwt    4 root     root         4096 Apr 24 13:44 /tmp/
[root@panda root]#


And have restarted all services I remembered:

service qmail restart;service smtpfront-qmail restart;service clamd restart;service httpd-e-smith ; restart httpd-admin restart

Still no luck

Why my clients cannot send messages to server anymore?
They are keeping on outbox and getting a error from server.

I have disabled SpamFilter and Antivirus on sme panel... no luck! :(

I´m getting desperate... the problem now appears to be just on qmail.
Can I reinstall it or verify it... step by step?
What logs should I search first for errors ?
On

[root@panda root]# tail -f /var/log/qmail/current |tai64nlocal
2007-04-24 13:48:05.309142500 warning: trouble injecting bounce message, will try later

How debug this ?

Could this to be a smtpfront-qmail problem? (I don´t think so!)


Thanks

Jáder
...

Offline besterl

  • ***
  • 78
  • +0/-0
How I solved it
« Reply #7 on: April 24, 2007, 07:32:13 PM »
I had the same problem

Solved it as follows

Log in as root
chmod 1777 /tmp
service clamd restart

If the service still does not start

Download the Knuddi script again
Run it again
sh antivirus_install.sh

After installation

run chmod 1777 /tmp

service clamd restart

Reboot

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #8 on: April 24, 2007, 07:56:09 PM »
Hi besterl

I have problem to reboot my server (work time here now).

I have chmd 1777 /tmp and restarted almost everything I could remember:
qmail
smtpfront-qmail
httpd-e-smith
httpd-admin
clamd

And appear to do not solve my problem.
I´ll have to wait more 3 hours to reboot server.

Just as an info, most of time it fails to stop qmail...
[root@panda queue]# service qmail restart
Stopping qmail:                                            [ FAILED ]
Starting qmail:                                            [   OK   ]

[root@panda queue]# service qmail status
/service/qmail: up (pid 3470) 2669 seconds, normally down, want down


some time later, I found qmail stopped for a while...
and obviously, restart it. It appears to be very busy so do not restart.
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #9 on: April 24, 2007, 08:12:23 PM »
what can you find in the logfiles related to this sudden stop of qmail ?

/var/log/qmail/current & /var/log/messages

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #10 on: April 24, 2007, 08:48:21 PM »
Now (as yesterday) I have /var/log/qmail/current showing this:

deferral: Sorry,_message_has_wrong_owner._

yesterday I have same problem and was solving it by:

Code: [Select]
for i in /var/qmail/queue/mess/*; do chown qmailq:qmail $i/*;done
killall -ALRM qmail-send


I did this today... no go!

BTW... to stop the previous problem (4.3.0 on qmail-inject) I do a DUMMY thing... chmod -R 777 /var/qmail/queue/.
I know this is now right... but I´m tired of permissions problems!

Now qmail accept message from clients (including webmail)... but let them on queue! ARGH!

Code: [Select]
[root@panda queue]# /var/qmail/bin/qmail-qstat
messages in queue: 251
messages in queue but not yet preprocessed: 0
[root@panda queue]#


Jáder
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #11 on: April 24, 2007, 09:02:48 PM »
I'm not gonne try to even understand what you have done. It seems you did more then we can see in your messages here.

I suggest that you do reboot the server. Check all logfiles related to current problems and maybe we have an option to turn you server back to normal again. From what I see now is that you know very well how to find your way but we still need to guess about a lot of things.

Harro

PS: I know you have to wait for a silent moment to reboot.

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #12 on: April 24, 2007, 09:29:43 PM »
Hi

I have done several attempts... to fix the problems.

I just would like to understand why I´m getting permissions problems when I have 777 all /var/qmail/queue directory and used for to change owner of mails to qmailq!!!

Can I remove and reinstall something (qmail, smtpfront-qmail) ?
How should I do this ?

Thanks

Jáder
...

Offline Confucius

  • ****
  • 235
  • +0/-0
qmail ... more problems after antivirus_install.sh
« Reply #13 on: April 24, 2007, 09:50:19 PM »
let's 1st verify the qmail directory

ls -la /var/qmail/

Code: [Select]

drwxr-x---   11 qmailq   qmail        4096 Apr 21  2003 queue


ls -la /var/qmail/queue

Code: [Select]

drwxr-x---   11 qmailq   qmail        4096 Apr 21  2003 .
drwxr-xr-x   15 root     qmail        4096 Mar 30  2006 ..
drwx------    2 qmails   qmail        4096 Sep 24  2006 bounce
drwx------   25 qmails   qmail        4096 Apr 21  2003 info
drwx------    2 qmailq   qmail        4096 Apr 24 21:35 intd
drwx------   25 qmails   qmail        4096 Apr 21  2003 local
drwxr-x---    2 qmailq   qmail        4096 Dec 12  2003 lock
drwxr-x---   25 qmailq   qmail        4096 Apr 21  2003 mess
drwx------    2 qmailq   qmail        4096 Apr 24 21:35 pid
drwx------   25 qmails   qmail        4096 Apr 21  2003 remote
drwxr-x---    2 qmailq   qmail        4096 Apr 24 21:35 todo


I can see that the bounce, local & remote directory are not owned by qmailq ... when you did a chmod -R qmailq I can imagine that this could create a problem. When you do have these set wrong come back on it so it makes sense to go 1 level deeper.

Harro

Offline Jáder

  • *
  • 1,099
  • +0/-0
    • LinuxFacil
qmail ... more problems after antivirus_install.sh
« Reply #14 on: April 24, 2007, 10:06:46 PM »
They appears to have right owner, see:

Code: [Select]
[root@panda tmp]# ls -lad /var/qmail/queue/
drwxrwxrwx   11 qmailq   qmail        4096 Apr 24 14:46 /var/qmail/queue/



Code: [Select]
[root@panda tmp]# ls -la /var/qmail/queue/
total 44
drwxrwxrwx   11 qmailq   qmail        4096 Apr 24 14:46 .
drwxr-xr-x   14 root     qmail        4096 Nov 15  2005 ..
drwxrwxrwx    2 qmails   qmail        4096 Apr 24 16:34 bounce
drwxrwxrwx   25 qmails   qmail        4096 Nov 15  2005 info
drwxrwxrwx    2 qmailq   qmail        4096 Apr 24 17:05 intd
drwxrwxrwx   25 qmails   qmail        4096 Nov 15  2005 local
drwxrwxrwx    2 qmailq   qmail        4096 Nov 15  2005 lock
drwxrwxrwx   25 qmailq   qmail        4096 Nov 15  2005 mess
drwxrwxrwx    2 qmailq   qmail        4096 Apr 24 17:05 pid
drwxrwxrwx   25 qmails   qmail        4096 Nov 15  2005 remote
drwxrwxrwx    2 qmailq   qmail        4096 Apr 24 17:05 todo
...