Operating System - HP-UX
1820696 Members
2865 Online
109627 Solutions
New Discussion юеВ

mailx hang when someone try to send an email

 
SOLVED
Go to solution
hpuxhelp
Regular Advisor

mailx hang when someone try to send an email

someone tried to send an email however, it hang....is there a process that i should be looking at ? and how will i fix the problem??
thank you...and it is urgent
14 REPLIES 14
John Poff
Honored Contributor

Re: mailx hang when someone try to send an email

Hi,

I would take a look at your /var/adm/syslog/mail.log file. It might give you a clue about what is happening. If you are relaying your mail from your Unix box to some other mail server, the mail.log might tell you what the problem is.

JP
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

Dec 18 16:10:02 sjkdch03 sendmail[13095]: QAA13081: to=fnsw, ctladdr=root (0/3),
delay=00:00:00, xdelay=00:00:00, mailer=local, stat=Sent
Dec 18 18:00:07 sjkdch03 sendmail[16238]: SAA16238: from=root, size=474, class=0
, pri=30474, nrcpts=1, msgid=<200212182300.SAA16238@sjkdch03.cna.com>, relay=roo
t@localhost
Dec 18 18:00:08 sjkdch03 sendmail[16289]: SAA16238: to=fnsw, ctladdr=root (0/3),
delay=00:00:01, xdelay=00:00:00, mailer=local, stat=Sent
---
i took a look at the mail log, but unable to understand what it said...or where the problem might lie...could you plese help me to analyus this...i haven't use this featur
Paul Sperry
Honored Contributor
Solution

Re: mailx hang when someone try to send an email

try
ps -ef | grep sendmail

should get something like:

root 25217 1 0.0 Dec 17 ?? 7:31.44 sendmail: accepting connects

then

kill -9 ###### (in my case ####is 25217

then run

sendmail ???bi
sendmail ???bd
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

how do you send a email testing the function of mailx???
Michael Tully
Honored Contributor

Re: mailx hang when someone try to send an email

Once the sendmail process has been restarted. Here is a simple test using a text file.

# cat myfile | mailx -s "testmail" username@mydomain.com
Anyone for a Mutiny ?
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

i restarted the mail process by doing
sendmail -bi and sendmail -bd?
and it is still doesn[t work?? did i do soemthing wrong?
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

i followed your advice
by doing the following
ps -ef | grep sendmail
kill -9 the process
sendmail -bi
sendmail -bd
cat myfile | mailx -s "ld"
user@mydomai

i still didn't see any mail in my mail folder
Michael Tully
Honored Contributor

Re: mailx hang when someone try to send an email


sendmail -bi (check the aliases file)
sendmail -bd (starts the sendmail background process)

You might like to try it this way.
# /sbin/init.d/sendmail stop
# /sbin/init.d/sendmail start
# mailq (check to see what is in the mail queue to be sent)
If there is nothing, try sending the test message again.
# cat myfile | mailx -s "testmail" username@mydomain.com
Anyone for a Mutiny ?
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

i tried everything that you have suggested, but i am still unavailable to receive any mail by suing mailx ? Was there any special characater that i should include in the myfile ???
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

There seems to be a problem of sending mail using mailx to the external address such as
name@domain.
however, if i tried to use within the users i could do that...how do i fix it so i can send it out to people??/
Steven E. Protter
Exalted Contributor

Re: mailx hang when someone try to send an email

after following the above isntructions do the following:

1) check nsswitch.conf on your box. If you don't have DNS first, you will have a hard time getting mail on and off the box, even if sendmail is running

2) Try mailq after attempted send. It shows what is queued and not able to get off your box.

Note that the nsswitch.conf change will break openspool badly and cause Omniback problems with certain versions.

Also if you use a smtp relay to get mail off your network, to Exchange or the net, there are mail latency problems with Symantec's gateway server v 2.5 If its not on the latest patch, certain Unix email will not get off the box.

Steve

Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
hpuxhelp
Regular Advisor

Re: mailx hang when someone try to send an email

oh...the problem is solved...
they didn't end their file with a period.
Thanks for helping me
W.C. Epperson
Trusted Contributor

Re: mailx hang when someone try to send an email

It's not clear what problem we're trying to solve--is it a) that mailx "hangs", or b) that we can't or don't know how to read the message? The initial posting looks like "a", but the rest looks like "b".

First, for mailx to send a message, sendmail does not have to be running: mailx will fire up an instance of sendmail to handle the message. Second, the log entries show that sendmail delivered the message. If this is not a tricked up configuration in some fashion, the "mailer=local" should mean that the message was delivered to the local mbox formatted inbox for the user in /var/mail. So that would be /var/mail/fnsw for the log examples. The mbox can be read using a Mail User Agent like elm when logged in as fnsw. Alternatively, root could read it via "elm -f /var/mail/fnsw".
"I have great faith in fools; self-confidence, my friends call it." --Poe
W.C. Epperson
Trusted Contributor

Re: mailx hang when someone try to send an email

I'm confused. An SMTP "DATA" transmission is terminated with a "." on a line by itself, so you'd need one if you were hand-rolling an SMTP transaction via an MTA like sendmail. In my experience, an MUA like mailx happily accepts end-of-file. What sort of mailx command was being used?
"I have great faith in fools; self-confidence, my friends call it." --Poe