1836006 Members
4441 Online
110088 Solutions
New Discussion

Mail script

 
Mike_21
Frequent Advisor

Mail script

Trying to execute the following script:
#! /bin/sh
mailperson='SMTP:man@node.com'
echo "Test" | mail $mailperson

I am getting the following error.

Status: 5.1.3
Remote-MTA: DNS; ussmtp
Diagnostic-Code: SMTP; 553 5.1.8 ... Domain of
sender address man@node.xxx.com does not exist
Last-Attempt-Date: Wed, 12 Dec 2001 09:35:16 -0500 (EST)
5 REPLIES 5
Uday_S_Ankolekar
Honored Contributor

Re: Mail script

Hi,

The mail is addressed to a wrong domain. Try sending it to a local qualified domain or if you have an acoount in hotmail or yahoo.mail try sending it to proper e-mail id. If you've already tried it then you need to check your sendmail.

-USA..
Good Luck..
Jeff Machols
Esteemed Contributor

Re: Mail script

try to do an nslookup on node.com, if it does not resolve, you have a network issue, not a mail issue
Anthony deRito
Respected Contributor

Re: Mail script

Valuable information including verification of username and domainname may be gotten by running sendmail in verbose mode.

#sendmail -v user@somedomain.com
type your text here
.
user@somedomain.com... Connecting to mail.relay.com via esmtp...
220 mail.relay.com ESMTP Sendmail EDS Secure; Wed, 12 Dec 2001 09:43:53 -0500 (EST)
>>> EHLO host.somedomain.com
250-mail.relay.com
Hello [204.104.63.16], pleased to meet you
250-ENHANCEDSTATUSCODES
250-EXPN
250-VERB
250-8BITMIME
250-SIZE 8000000
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
>>> MAIL From: SIZE=15
250 2.1.0 ... Sender ok
>>> RCPT To:
250 2.1.5 ... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 fBCEhr700474 Message accepted for delivery
user@xxxx.xxxxx.xxxx.com... Sent (2.0.0 fBCEhr700474 Message accepted for delivery)
Closing connection to mail.relay.com .
>>> QUIT
221 2.0.0 mail.relay.com
closing connection

Hope this helps.

Tony
Kevin Wright
Honored Contributor

Re: Mail script

Sendmail and DNS work hand in hand..if you cannot dig/nslookup node.com, chances are you won't be able to send mail either. Ensure that you can resolve node.com first.
Craig Rants
Honored Contributor

Re: Mail script

Try something like this.

# nslookup -type=MX (you will get the > prompt)

> mindspring.com (you will get all the mailer for that domain)

mindspring.com preference = 5, mail exchanger = mx07.mindspring.com

>exit

# mailx user@mx07.mindspring.com

That way you are sending directly to the mailer. If that does not work, find the ip of the mailer and mail to it.

#mailx user@[10.10.10.10]

GL,
C



"In theory, there is no difference between theory and practice. But, in practice, there is. " Jan L.A. van de Snepscheut