trouble using mailx command


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting trouble using mailx command
# 1  
Old 04-02-2002
Data trouble using mailx command

Hi. I have been trying to send mail using the mailx command. I also tryed to use the mail command.

The thing is that when I try to send the email, i receive automatically to my mailbox a DAEMON response sayng that the mailhost is unknown...

The syntax I am using is this:

$mailx -s "this is a test" myaddress@mydomain.com < /home/myhome/filetosend

the file "filetosend" is the file that i want to send as the body of the msg.

and what i get is this:

To: ldrojasm
MIME-Version: 1.0
Subject: Returned mail: Host unknown (Name server: mailhost.mydomain.com: host not found)
Auto-Submitted: auto-generated (failure)

The original message was received at Tue, 2 Apr 2002 17:24:56 -0600 (CST)
from ldrojasm@localhost

----- The following addresses had permanent fatal errors -----
myaddress@mydomain.com

----- Transcript of session follows -----
550 myaddress@mydomain.com... Host unknown (Name server: mailhost.mydomain.com: host not found)

thanx
# 2  
Old 04-02-2002
Try a few things.

I assume that sendmail is running, but check anyway.

Try to mail with to a known address.
Try to ping myaddress.com to see if it is reachable.
Ping other systems or try to email to another outside box.

Also, has your mailx worked before to this address? at all to any address?

What type of UNIX is this? hardware?


Hope this helps.


Smilie
# 3  
Old 04-03-2002
Try using 'mail' or /usr/lib/sendmail.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

awk trouble inside another command

I tried running this. dsh -w server1 'lsof /audit | awk '{ print $2 }'' It did not like above so I tried to escape the single parenthesis at the end. dsh -w server1 'lsof /audit | awk '{ print $2 }\'' It then hung so I changed up the parenthesis to this. This worked. dsh -w server1... (6 Replies)
Discussion started by: cokedude
6 Replies

2. Shell Programming and Scripting

Trouble using awk command

Hi, I have 2 .txt pads containing data. I need a script which reads content of one .txt file, performs some operations and calculates a number which is stored in a variable. Now , all the content of another .txt pad should be appended to first .txt pad at pre calculated nth line number. ... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

3. Shell Programming and Scripting

Trouble with variable and command assignment

I have a section of a script where I want to check a log file for a certain oracle error and if there is only one error (and it is ORA-39152) then I want to email that script is complete. Otherwise email failure and log. Somehow with this while the log only has one error and it is ORA-39152, I... (5 Replies)
Discussion started by: cougartrace
5 Replies

4. Shell Programming and Scripting

Trouble with awk command

Hi, I need to read a string with ; separated using loop one filed by one field and perform some operation. Can you please check and let me know how to print command parameterised. key=phani;ravi;kiran number_of_keys=`echo $key|awk '{print NF}' FS=';'` for (( i = 1; i <= $number_of_keys;... (4 Replies)
Discussion started by: Ravindra Swan
4 Replies

5. Shell Programming and Scripting

Command pipeline trouble

Hello, I am attempting to ssh to a server and run a set of commands on a remote set of servers. I am getting the following error below, I am thinking quotes may be the problem. This command works on the local machine in bash. Not when I ssh to a remote server. Basically the command should... (3 Replies)
Discussion started by: jaysunn
3 Replies

6. Shell Programming and Scripting

trouble executing a command in csh

Hi All!! I am having trouble in executing the following command into a c-shell script. mv "$file" "$(head -1 "$file")" The funny thing is that the same command works perfectly from the command line, but when incorporated into a "foreach loop" of a c-shell script, it shows an error -... (1 Reply)
Discussion started by: chen.xiao.po
1 Replies

7. UNIX for Dummies Questions & Answers

Trouble with the Source command..

Hi everyone, I've been writing a script as an assignment which essentially does the exact same thing as the tree -d function (bash shell btw), except next to every directory name it gives a number which you can input into the same command in order to change the current working directory to the... (1 Reply)
Discussion started by: petey22uk
1 Replies

8. Shell Programming and Scripting

Mailx: How to send a attachment using mailx command

Hi All, Can anyone please provide the command for sending an mail with attachment using mailx command. Thanks in Advance :) Regards, Siram. (3 Replies)
Discussion started by: Sriram.Vedula53
3 Replies

9. UNIX for Dummies Questions & Answers

Trouble with flex command in makefile

Hey all, im trying to create a makefile in unix. cpp2html is a program created from the files cpp2html.o and lex.yy.o. cpp2html.o is created from compiling cpp2html.c and lex.yy.o is created from another created file lex.yy.c. and lex.yy.c is created from a command "flex cppscanner.l" and here is... (1 Reply)
Discussion started by: iwatk003
1 Replies

10. AIX

Trouble formatting egrep command with AWK

Hi, I'm new to scripting and AIX. I'm running the following: lspv | awk '{ print "lspv",$1" | egrep 'PP\|PHYSICAL'; lspv -l",$1 }' Which creates this command: lspv hdisk0 | egrep PP|PHYSICAL; lspv -l hdisk0 lspv hdisk1 | egrep PP|PHYSICAL; lspv -l hdisk1 Troube is, I need the... (2 Replies)
Discussion started by: cruiser
2 Replies
Login or Register to Ask a Question