MailScanner 4.12-2 / 4.13-3 incoming failed
Craig Pratt
craig at STRONG-BOX.NET
Thu Mar 27 02:16:21 GMT 2003
OK, Julian. Using the word "impossible" is very thinly-guised bait, if
I ever saw it. ;^)
I don't have a test system that exhibits this problem. But I think I'm
getting an idea of what the process IDs enclosed in "[" and "]" refer
to. I believe these processes have an empty /proc/<pid>/cmdline file
and PS substitutes the "Name" field from /proc/<pid>/status (or maybe
/proc/<pid>/stat) for the command line - with the brackets around it.
Not sure where glibc fits into this picture, though.
Unfortunately, I think this means that the proc cmdline file won't help
- since I'm betting they're empty in this case. But here are two other
options - at least for Linux. I don't know if you can wrangle any of
this out of ps to make it more platform-neutral.
1) The /proc/<id>/cwd file will point to different directories
[craig at orange craig]$ ps -C sendmail
PID TTY TIME CMD
3219 ? 00:00:00 sendmail
3224 ? 00:00:00 sendmail
[craig at orange craig]$ sudo ls -l /proc/3219/cwd /proc/3224/cwd
lrwxrwxrwx 1 root root 0 Mar 26 18:12
/proc/3219/cwd -> /var/spool/mqueue.in
lrwxrwxrwx 1 root root 0 Mar 26 18:12
/proc/3224/cwd -> /var/spool/mqueue
2) You could use the fact that the incoming sendmail has two sockets
open and the outgoing only has one - presuming that's a safe bet:
[craig at orange craig]$ ps -ax | fgrep sendmail
3219 ? S 0:00 sendmail: accepting connections
3224 ? S 0:00 /usr/sbin/sendmail -q15m
7843 pts/0 S 0:00 fgrep sendmail
[craig at orange craig]$ sudo ls -l /proc/3219/fd /proc/3224/fd
/proc/3219/fd:
total 0
lr-x------ 1 root root 64 Mar 26 18:01 0 -> /dev/null
l-wx------ 1 root root 64 Mar 26 18:01 1 -> /dev/null
l-wx------ 1 root root 64 Mar 26 18:01 2 -> /dev/null
lrwx------ 1 root root 64 Mar 26 18:01 3 ->
socket:[335288]
lrwx------ 1 root root 64 Mar 26 18:01 4 ->
socket:[335293]
/proc/3224/fd:
total 0
lr-x------ 1 root root 64 Mar 26 18:01 0 -> /dev/null
l-wx------ 1 root root 64 Mar 26 18:01 1 -> /dev/null
l-wx------ 1 root root 64 Mar 26 18:01 2 -> /dev/null
lrwx------ 1 root root 64 Mar 26 18:01 3 ->
socket:[335300]
Craig
On Wednesday, March 26, 2003, at 02:36 PM, Julian Field wrote:
> Really helps when vendors/distributors do nice things like that :-(
> Attached are new versions of
> /etc/rc.d/init.d/MailScanner
> /usr/sbin/check_mailscanner
>
> This now makes it impossible to make it work perfectly on all versions
> of
> RedHat Linux. It can now no longer tell the difference between the
> outgoing
> sendmail process in glibc 2.2 and the incoming sendmail process in
> glibc
> 2.3 as they both produce the same output. Also the incoming and
> outgoing
> sendmail processes in glibc 2.3 produce exactly the same ps output,
> making
> it impossible to differentiate between the 2.
>
> So it's about as good as I can get it, but it will tend to be a bit
> optimistic when doing a "status".
>
> At 22:11 26/03/2003, you wrote:
>> -----BEGIN PGP SIGNED MESSAGE-----
>> Hash: SHA1
>>
>> Hello all,
>>
>> I have seen this problem with diffrent scripts and programs on my
>> system.
>> If you are all running redhat, the following has happend afaik.
>>
>> Redhat silently upgraded glibc from 2.2.X to 2.3.X while
>> incorporating the
>> latest sun rpc fix. (The reason for the upgrade iirc)
>>
>> Now some (if not most processes) show up as:
>> 773 ? S 0:00 [sendmail]
>> 782 ? S 0:00 [sendmail]
>> when doing a ps -ax or ps -eaf.
>>
>> I blame it on the glibc upgrade and had to modify a bunch of scripts.
>>
>> I don't know what the exact meaning is if a process is in between []
>> brackets. Couldn't find it that quick. I had to "repair" a lot of
>> monitoring and reporting tools and I don't have time to make ps do the
>> right thing again.
>>
>> Hope this helps!
>>
>> Stijn.
>>
>>
>>
>> On Wed, 26 Mar 2003, Bruce Rahn wrote:
>>
>> > Allow me to add a more detailed observation in addition to my first
>> posting
>> > of "seeing the same problem here".
>> >
>> > First off, this discrepancy started after the last kernel/glibc
>> updates.
>> > Everything was fine before that. I too was bitten by the sendmail
>> 'auto
>> > start' issue when I upgraded, but that one was quick and easy to
>> track
>> down.
>> >
>> > Now two more tid-bits. While it indicates failed, it indeed is
>> running
>> > after a MailScanner start up and stops after a MailScanner stop. So
>> why the
>> > error that it failed? It indeed works.
>> >
>> > Also, after the kernel/glibc update, the MailScanner-MRTG graph of
>> Copies Of
>> > Sendmail went from showing two down to showing zero. If I were
>> smarter, I'm
>> > sure this is a clue.
>> >
>> > It's not a show stopper, just leaves one with a false impression
>> that
>> things
>> > are not working when indeed they are.
>> >
>> > Regards -- Bruce
>> >
>> > Bruce Rahn
>> >
>> > brahn at woh.rr.com
>> >
>> > Wisdom has two parts:
>> > 1. having a lot to say; and
>> > 2. not saying it!
>> >
>> >
>> > -----Original Message-----
>> > From: MailScanner mailing list [mailto:MAILSCANNER at JISCMAIL.AC.UK]On
>> > Behalf Of Julian Field
>> > Sent: Wednesday, March 26, 2003 2:10 PM
>> > To: MAILSCANNER at JISCMAIL.AC.UK
>> > Subject: Re: MailScanner 4.12-2 / 4.13-3 incoming failed
>> >
>> >
>> > At 18:56 26/03/2003, you wrote:
>> > >Hi,
>> > >
>> > > I'm having this problem that when I run 'service MailScanner
>> status' the
>> > > output displays the following error:
>> > >
>> > >Checking MailScanner daemons:
>> > > MailScanner: [ OK ]
>> > > incoming sendmail: [FAILED]
>> > > outgoing sendmail: [ OK ]
>> > >
>> > > I've verified mail is working both in and out bound correctly,
>> so I
>> > > don't know why the error.
>> > >
>> > > I have RedHatV8.0, and I just upgrade today to MailScanner
>> 4.13-3. I
>> > > also had the problem with MailScanner V4.12-2. I never notice the
>> > > problem before until I upgraded the kernel and glib rpms last
>> week for
>> > > security reasons.
>> > >
>> > > Has anyone else seen this problem yet?
>> >
>> > The sendmail replacement RPM issued by RedHat Network does a
>> > service sendmail restart
>> > which re-runs sendmail :-(
>> > I stopped it doing it in future by adding intentional syntax errors
>> to
>> > /etc/sysconfig/sendmail
>> > (I added a load of text on the end explaining what I had done,
>> which of
>> > course generates load of sh syntax errors)
>> >
>> > --
>> > Julian Field
>> > www.MailScanner.info
>> > Professional Support Services at www.MailScanner.biz
>> > MailScanner thanks transtec Computers for their support
>> >
>>
>> - --
>> Met Vriendelijke groet/Yours Sincerely
>> Stijn Jonker <SJCJonker at sjc.nl>
>>
>> -----BEGIN PGP SIGNATURE-----
>> Version: GnuPG v1.0.7 (GNU/Linux)
>>
>> iD8DBQE+giWBjU9r45tKnOARAsMAAKCw6pdmfqhJ1VQz50yhsO03VKuSAQCgymzV
>> p6xUtvdCRaRdGCEFlxbNWFY=
>> =KZvN
>> -----END PGP SIGNATURE-----
>
> --
> This message checked for dangerous content by MailScanner on StrongBox.
>
>
> <MailScanner><check_mailscanner>--
> Julian Field
> www.MailScanner.info
> Professional Support Services at www.MailScanner.biz
> MailScanner thanks transtec Computers for their support
---
Craig Pratt
Strongbox Network Services Inc.
mailto:craig at strong-box.net
--
This message checked for dangerous content by MailScanner on StrongBox.
More information about the MailScanner
mailing list