Encolamiento en sendmail

Hola gente


Resulta que estamos trasteando con un redhat por aquí en la que estoy investigando un poco un montón de correos encolados con sendmail. Las direcciones y tal me las he inventado ya que no son nuestras ;-)

#ls /var/spool/clientmqueue | wc -l
980


#tail -f /var/log/maillog
Apr 1 09:32:21 darkstar sendmail[32728]: k317WL0a032728: from=, size=873, class=0, nrcpts=1, msgid=<200604010732.k317WL7s032726@http://www.bender.com>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=darkstar.bender.es [127.0.0.1]
Apr 1 09:32:21 darkstar sendmail[32726]: k317WL7s032726: to=yo@bender.com, ctladdr=yo@bender.com (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30597, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k317WL0a032728 Message accepted for delivery)
Apr 1 09:32:21 darkstar sendmail[32731]: dangerous permissions=40777 on queue directory /var/spool/clientmqueue/
Apr 1 09:32:21 darkstar sendmail[32731]: k317WLcE032731: Authentication-Warning: http://www.bender.com: apache set sender to yo@bender.com using -f
Apr 1 09:32:21 darkstar sendmail[32725]: k317WL0a032723: to=, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=58410, relay=correo.bender.es. [IP], dsn=2.0.0, stat=Sent (Ok.)
Apr 1 09:32:21 darkstar sendmail[32731]: k317WLcE032731: from=yo@bender.com, size=594, class=0, nrcpts=1, msgid=<200604010732.k317WLcE032731@http://www.bender.com>, bodytype=8BITMIME, relay=apache@localhost
Apr 1 09:32:21 darkstar sendmail[32733]: k317WL0a032733: from=, size=870, class=0, nrcpts=1, msgid=<200604010732.k317WLcE032731@http://www.bender.com>, bodytype=8BITMIME, proto=ESMTP, daemon=MTA, relay=darkstar.bender.es [127.0.0.1]
Apr 1 09:32:21 darkstar sendmail[32731]: k317WLcE032731: to=pepito@terra.es, ctladdr=yo@bender.com (48/48), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30594, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (k317WL0a032733 Message accepted for delivery)
Apr 1 09:32:21 darkstar sendmail[32730]: k317WL0a032728: to=, delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30873, relay=correo.bender.es. [IP], dsn=2.0.0, stat=Sent (Ok.)
Apr 1 09:32:22 darkstar sendmail[32735]: k317WL0a032733: to=, delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30870, relay=correo.bender.es. [IP], dsn=2.0.0, stat=Sent (Ok.)
Apr 1 09:46:48 darkstar sendmail[4641]: k317JPOK011264: bogus queue file, uid=48, gid=51, mode=100660
Apr 1 09:46:48 darkstar sendmail[4641]: k317JPOK011264: Losing ./qfk317JPOK011264: bogus file uid/gid in mqueue
Apr 1 09:46:48 darkstar sendmail[4641]: k317SXnK024378: bogus queue file, uid=48, gid=51, mode=100660
Apr 1 09:46:48 darkstar sendmail[4641]: k317SXnK024378: Losing ./qfk317SXnK024378: bogus file uid/gid in mqueue
Apr 1 09:46:48 darkstar sendmail[4641]: k317NmCQ017476: bogus queue file, uid=48, gid=51, mode=100660
Apr 1 09:46:48 darkstar sendmail[4641]: k317NmCQ017476: Losing ./qfk317NmCQ017476: bogus file uid/gid in mqueue
Apr 1 09:46:48 darkstar sendmail[4641]: k317MAH9015172: bogus queue file, uid=48, gid=51, mode=100660
Apr 1 09:46:48 darkstar sendmail[4641]: k317MAH9015172: Losing ./qfk317MAH9015172: bogus file uid/gid in mqueue
....



Veo lo de dangerous permissions, no sé si está relacionado:
#ls -l /var/spool
drwxrwxrwx 2 smmsp smmsp 180224 abr 1 09:46 clientmqueue


Parece que están todos puestos (yo no he sido xD). En principio no sé si esto puede ser un problema para que se encolen. Diría que no pero por si acaso...
Lo de bogus file uid/gid igual está relacionado con ello. Los archivos dentro de ese directorio están a:

#ls -l /var/spool/clientmqueue/ls -l *fk317JPOK011264
-rw-rw---- 1 apache smmsp 27888 abr 1 09:20 dfk317JPOK011264
-rw-rw---- 1 apache smmsp 798 abr 1 09:20 Qfk317JPOK011264


No aparece qfk317JPOK011264, el primero que dice Losing... en el log que he pegao. Los permisos de los archivos encolados vienen dados en
/etc/mail/submit.cf en QueueFileMode 660, equivalente a -rw-rw----

Procesos:
------------

#ps -fea

root 2195 1 0 Mar31 ? 00:00:06 sendmail: accepting connections
smmsp 2204 1 0 Mar31 ? 00:00:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
...
apache 12355 32055 0 10:13 ? 00:00:01 /opt/apache/bin/httpd -k start -DSSL
apache 18366 32055 0 10:31 ? 00:00:00 /opt/apache/bin/httpd -k start -DSSL
apache 18867 32055 0 10:33 ? 00:00:04 [httpd ]
apache 19995 32055 0 10:36 ? 00:00:03 /opt/apache/bin/httpd -k start -DSSL
apache 21929 32055 0 10:44 ? 00:00:00 /opt/apache/bin/httpd -k start -DSSL
...



Había un zombie de apache pero parece que no está ahora.

Sobre strace, ¿cómo puedo lanzarlo? He cogido el proceso de las colas y he hecho:
#strace -p 2204
Process 2204 attached - interrupt to quit
--- SIGSTOP (Stopped (signal)) @ 0 (0) ---
--- SIGSTOP (Stopped (signal)) @ 0 (0) ---
--- SIGALRM (Alarm clock) @ 0 (0) ---
alarm(0) = 0
time(NULL) = 1143881514
getpid() = 2204
time(NULL) = 1143881514
getpid() = 2204
alarm(0) = 0
time(NULL) = 1143881514
sigreturn() = ? (mask now [])
rt_sigaction(SIGTERM, {0x80993e0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, {0x80993e0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, 8) = 0
rt_sigaction(SIGHUP, {0x80994a0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, {0x80994a0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, 8) = 0
time([1143881514]) = 1143881514
open("/proc/loadavg", O_RDONLY) = 4
fstat64(4, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
read(4, "0.38 0.49 0.63 2/201 23948\n", 4096) = 27
close(4) = 0
rt_sigprocmask(SIG_BLOCK, [CHLD], [], 8) = 0
rt_sigaction(SIGCHLD, {0x805f480, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, {0x805f480, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, 8) = 0
clone(child_stack=0, flags=CLONE_CHILD_CLEARTID|CLONE_CHILD_SETTID|SIGCHLD, child_tidptr=0xb714e0c8) = 23949
rt_sigprocmask(SIG_BLOCK, [ALRM], [CHLD], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [ALRM CHLD], 8) = 0
rt_sigprocmask(SIG_UNBLOCK, [CHLD], [CHLD], 8) = 0
time([1143881514]) = 1143881514
rt_sigprocmask(SIG_BLOCK, [ALRM], [], 8) = 0
time(NULL) = 1143881514
getpid() = 2204
rt_sigaction(SIGALRM, {0x80d7bc0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, {0x80d7bc0, [], SA_RESTORER|SA_RESTART, 0xb7238c08}, 8) = 0
alarm(3600) = 0
rt_sigprocmask(SIG_UNBLOCK, [ALRM], [ALRM], 8) = 0
pause() = ? ERESTARTNOHAND (To be restarted)
--- SIGCHLD (Child exited) @ 0 (0) ---
waitpid(-1, [WIFEXITED(s) && WEXITSTATUS(s) == 0], WNOHANG) = 23949
waitpid(-1, 0xbfff9c94, WNOHANG) = -1 ECHILD (No child processes)
sigreturn() = ? (mask now [])
pause(


No sé si se puede sacar algo, ya que ni idea de esto [+risas]


Por último, puedo mandarme un correo desde esa máquina usando sendmail y parece que llega al momento. A ver si alguien me echa un cable (a pesar del pedazo de chapa ;-) )

Un saludo y muchas gracias de antemano
[beer]
0 respuestas