Re: daemon MTA-IPv4: Problem creating SMTP socket?



On Mon, 07 Jul 2008 12:53:29 -0700, trey.chastain wrote:

On Jul 7, 1:22 pm, AGT <usenetpersonger...@xxxxxxxxx> wrote:
On Mon, 07 Jul 2008 05:52:52 -0700, trey.chastain wrote:
On Jul 4, 3:59 am, Tilman Schmidt <ts-usenet0...@xxxxxxxxx> wrote:
trey.chast...@xxxxxxxxx schrieb:
I ran '/etc/init.d/sendmail stop' and received no output.
Ok.
typing netstat -an -f inet -P tcp gives me 2 processes listening on *.25
So whatever is squatting your machine's port 25 hasn't been found
by the /etc/init.d/sendmail script.
typing netstat -an | grep \.25 gives me the same 3 process as before
(no change)
The netstat command doesn't list processes, it lists network sockets.
It's not unheard of for a single process to have several sockets open.
attempting to stop sendmail multiple times doesn't seem to change
anything and I still receive no output.
That was to be expected.
running ps ax just makes it show me the usage (there is no x
option).

There is if you use the right ps. There are a few...

Hrmph. I thought I would be on the safe side with the old BSD-style
ps options, but it looks like Solaris doesn't accept those.

/usr/ucb/ps [U Cal Berkeley]



(Perhaps I should defer this case to people who actually have a
Solaris system in front of them.)
: >
ps -e (which lists information about every process, this is how I
found sendmail) shows:
PID      TTY         TIME       CMD
[...]
<b>4791       ?           0:03    sendmail</b>
Ah, there it is. I guess you inserted the "< b >" and "< / b >"
yourself.
I realize 90% of that information is probably useless but it only took
a short time to get it and if it helps solve my problem it was well
worth it.  I couldn't find any other ps commands that might be useful
in this situation. Thanks for the advice, I hope this helps.
That's quite ok. A possibly interesting ps option would be the one
to display the complete command line of the process. Your ps command
may or may not do that if you pass it the -f option. You could try
"ps -ef" next time and see what it does.
For this round, however, whe know there is a sendmail process and
this is the prime candidate in our search for the squatter of your
port 25. Try killing it with the command "kill 4791" and check with
the netstat command you already know to see whether that frees the
port. If so, problem solved, and it only remains for you to find out
how that process got started in the first place. If not, there's
something odd going on on your server and you should perhaps start
looking for unwanted guests.

Ok, I did the following (actual command lines indicated by *):
*kill 4791
checked to see if sendmail was gone with ps -ef, it was.
*netstat -an | grep \.25
gave:
   163.xxx.xx.xxx.22     163.xxx.xxx.xxx.1256   48640      0
49640        48    ESTABLISHED
attempted to restart sendmail as it appeared port 25 was now empty
*/etc/init.d/sendmail start
*ps -ef
gives 2 processes with sendmail:
     root     5545    1     0     08:37:07    ?      /usr/lib/sendmail
-bd -q15m
     root     5547    1     0     08:37:07    ?      /usr/lib/sendmail
-Ac -q15m
*netstat -an | grep \.25
gave:
   163.xxx.xx.xxx.22     163.xxx.xxx.xxx.1256   48640      0
49640        48    ESTABLISHED
   *.25   *.*  0           0  49152        0 LISTEN
   *.25   *.*  0           0  49152        0 LISTEN
   *.25              *.*                                  0
0         49152        0 LISTEN  (This was spaced out further, not
just a typo, if it matters)
a short while after this, I attempted to send an email through my
bugzilla site and the following pops up:
root sune27   /   #   July 7   08:41:53  sune27     sendmail[5561]:
[ID801593 mail.alert]    m67CfrW7005561: Losing ./qfm67CfrW7005561:
savemail panic
Probably pretty obvious but I did not receive the e-mail.  But maybe
this is a start?  I wrote these steps as I went so now I will try to
find something about this in the archives but if anyone knows the
solution, I would be glad to hear it!

Archives may be useles as you may have a totally hosed config.

In response to AGT, I get the following with your commands:
Other problems? please do this:
cat /etc/release
     Solaris 10 11/06  s10s_u3wos_10 SPARC
grep ^DZ /etc/mail/sendmail.cf
     DZ8.11.6
[if its there]
If it isnt its in /usr/lib/mail somewhere - maybe cf
    Wasn't in usr/lib/mail (assuming this is expected because it was
in /etc/mail/sendmail.cf)

Finally we know the Solaris release which is good. I think you are
2 major releases behind but as I recall sendmail is handled by
services not legacy rc scripts...

You are way behind in patches - sendmail should be at
8.13.8. Anyway, sendmail should be 2 different processes,
one on port 587 and one on port 25...

Both should be killed and then restarted. Use pgrep/pkill for that
pgrep -x -u root sendmail
pgrep -x -u smmsp sendmail

-IF- svcadm disable -st fails to stop ALL instances.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Check with ps -ef

Then run svcadm -v enable -r sendmail

Unless someone hosed your .cf files all should be well.
If not post the results of this please:

$ /usr/bin/date | /usr/sbin/sendmail -v -o LogLevel=14 `/usr/ucb/whoami`
If you cant deliver locally, remote connects may have even less hope..

Ok, so it looks like I still have some problems but the last line you
gave me, '$ /usr/bin/date | /usr/sbin/sendmail -v -o LogLevel=14 `/usr/
ucb/whoami`' looks like it may show exactly where the problem is.

I get the following:
/usr/ucb/whoami... Connecting to [127.0.0.1] via relay...
220 sune27.xxx.xxx.xxxx.xxx ESMTP Sendmail 8.13.7+Sun/8.11.6; Mon, 7
Jul 2008 15:42:57 -0400 (EDT)
EHLO sune27.xxx.xxx.xxxx.xxx
250-sune27.xxx.xxx.xxxx.gov Hello localhost [127.0.0.1], pleased to
meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-EXPN
250-VERB
250-8BITMIME
250-SIZE
250-DSN
250-ETRN
250-DELIVERBY
250-HELP
VERB
250 2.0.0 Verbose mode
MAIL From:<root@xxxxxxxxxxxxxxxxxxxxxxx> SIZE=29
250 2.1.0 <sune27.xxx.xxx.xxxx.gov>... Sender ok
RCPT To: </usr/ucb/whoami@xxxxxxxxxxxxxxxxxxxxxxx>
DATA
250 2.1.5 </usr/ucb/whoami@xxxxxxxxxxxxxxxxxxxxxxx>... Recipient ok
354 Enter mail, end with "." on a line by itself
.
050 </usr/ucb/whoami@xxxxxxxxxxxxxxxxxxxxxxx>... Connecting to
mailhost via relay...

Why is it connecting to mailhost? Is there one?

250 2.0.0 m67JgRS7012227 Message accepted for delivery
/usr/ucb/whoami... Sent (m67JgRS7012227 Message accepted for delivery)
Jul 7 15:42:59 sune27 sendmail[12227]: [ID801593 mail.alert]
m67JgRS7012227: Losing .qfm67JgRS8012227: savemail panic
Closing connection to [127.0.0.1]
QUIT
221 2.0.0 sune27.xxx.xxx.xxxx.xxx closing connection

You missed the back ticks I posted : <
This is a back tick: `
so thats `/usr/ucb/whoami`
exactly like I typed. It resolves to your login id.

What the heck shell are you using anyway??
$ exec bash
And try again

Fix that or we cant tell for sure exactly whats going on
other than mailhost probably does not exist...
So dont use it. You shouldnt see it (smart host)
for local anyway right folks?

You can bump up the LogLevel a bit past 14 as well

If we cant see from LogLevel then someone better at
using -d than me might want to chime in. Andrzej ??

.



Relevant Pages

  • Re: daemon MTA-IPv4: Problem creating SMTP socket?
    ... So whatever is squatting your machine's port 25 hasn't been found ... The netstat command doesn't list processes, ... For this round, however, whe know there is a sendmail process and ...
    (comp.mail.sendmail)
  • Re: program aliases and ISP blocks outbound port 25.
    ... Whats the output of sendmail -d0.20 ... For the aliases file, the syntax in the documentation states that aliases ... It's treating it as a user name, not a command. ... I changed ISPs to one that blocks port 25 outbound and requires submissions ...
    (comp.mail.sendmail)
  • Re: daemon MTA-IPv4: Problem creating SMTP socket?
    ... So whatever is squatting your machine's port 25 hasn't been found ... The netstat command doesn't list processes, ... For this round, however, whe know there is a sendmail process and ...
    (comp.mail.sendmail)
  • Re: daemon MTA-IPv4: Problem creating SMTP socket?
    ... So whatever is squatting your machine's port 25 hasn't been found ... The netstat command doesn't list processes, it lists network sockets. ... For this round, however, whe know there is a sendmail process and ...
    (comp.mail.sendmail)
  • Re: Emails stuck in queue error 451 4.4.0 Primary target IP addres
    ... If you had just said "Siv you forgot to include the port number in the ... Telnet command" in your first response after asking me to carry out the ... I said earlier I am not familiar with telnet, I have probably used it twice ... Connecting To smtp.surfdsl.net...Could not open connection to the host, ...
    (microsoft.public.exchange.misc)