Mailx message not delivering externally


 
Thread Tools Search this Thread
Operating Systems Solaris Mailx message not delivering externally
# 1  
Old 12-15-2014
Mailx message not delivering externally

I have recently all of a sudden stopped receiving my cronjob messages that were being sent with the mailx command. I have not made any changes and it is affecting all my servers at this site only (all running Solaris 10). At my other site I am running a mixture of Solaris 10 and Ubuntu 14, and they can send mailx messages via cronjob with no problems. The only difference I can see is they are different domains. They all send directly from the server the cronjob ran from (we don't have a mail server or relay at either site, it is hosted by google). I can send a mailx message to other local servers, I am only having problems sending them to external e-mail addresses.

When I send a test message manually with the -v option I get the following:

Code:
 mailx -v test.email@address.com 
Subject: test
this is a test message
EOT
es1 37) test.email@address.com... Connecting to [127.0.0.1] via relay...
220 es1.md.usgrdc.com ESMTP Sendmail 8.13.7+Sun/8.13.7; Mon, 15 Dec 2014 14:03:14 -0500 (EST)
>>> EHLO es1.md.usgrdc.com
250-es1.md.usgrdc.com 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:<adam@es1.md.usgrdc.com> SIZE=92
250 2.1.0 <adam@es1.md.usgrdc.com>... Sender ok
>>> RCPT To:<test.email@address.com>
>>> DATA
250 2.1.5 <test.email@address.com>... Recipient ok
354 Enter mail, end with "." on a line by itself
>>> .
050 <test.email@address.com>... Connecting to aspmx.l.google.com. via esmtp...
050 220 mx.google.com ESMTP b8si1342258qak.99 - gsmtp
050 >>> EHLO es1.md.usgrdc.com
050 250-mx.google.com at your service, [<my external IP>]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-STARTTLS
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-CHUNKING
050 250 SMTPUTF8
050 >>> STARTTLS
050 <test.email@address.com>... Connecting to alt1.aspmx.l.google.com. via esmtp...
050 <test.email@address.com>... Closing connection to aspmx.l.google.com.
050 220 mx.google.com ESMTP 97si11643820qgf.42 - gsmtp
050 >>> EHLO es1.md.usgrdc.com
050 250-mx.google.com at your service, [<my external IP>]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-STARTTLS
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-CHUNKING
050 250 SMTPUTF8
050 >>> STARTTLS
050 <test.email@address.com>... Connecting to aspmx2.googlemail.com. via esmtp...
050 <test.email@address.com>... Closing connection to alt1.aspmx.l.google.com.
050 220 mx.google.com ESMTP k106si70584qgd.34 - gsmtp
050 >>> EHLO es1.md.usgrdc.com
050 250-mx.google.com at your service, [<my external IP>]
050 250-SIZE 35882577
050 250-8BITMIME
050 250-STARTTLS
050 250-ENHANCEDSTATUSCODES
050 250-PIPELINING
050 250-CHUNKING
050 250 SMTPUTF8
050 >>> STARTTLS
050 <test.email@address.com>... Deferred: Connection reset by aspmx2.googlemail.com.
250 2.0.0 sBFJ3EHU006348 Message accepted for delivery
test.email@address.com... Sent (sBFJ3EHU006348 Message accepted for delivery)
Closing connection to [127.0.0.1]
>>> QUIT
221 2.0.0 es1.md.usgrdc.com closing connection

I have changed my e-mail address to "test.email@address.com," that is not the address I was trying to send to, I also changed my actual external IP to "<my external IP>" for this post. es1.md.usgrdc.com is one of my servers and internal domain.

This is obviously my problem:
Code:
050 <test.email@address.com>... Connecting to alt1.aspmx.l.google.com. via esmtp...
050 <test.email@address.com>... Closing connection to aspmx.l.google.com.

I just do not know why it is closing the connection to all the .google.com servers.

When I sniff my firewall for port 25 I see the traffic going back and forth, the only device after my firewall is the ISP router.

Code:
tcpdump -npi exp0 port 25
tcpdump: listening on exp0


16:20:45.715499 10.1.3.2.55548 > 74.125.22.27.25: S 2061072540:2061072540(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 14520621 0> (DF)
16:20:45.728301 74.125.22.27.25 > 10.1.3.2.55548: S 2170873922:2170873922(0) ack 2061072541 win 42540 <mss 1430,nop,nop,timestamp 2118147341 14520621,nop,wscale 7>
16:20:45.728329 10.1.3.2.55548 > 74.125.22.27.25: . ack 1 win 17160 <nop,nop,timestamp 14520621 2118147341> (DF)
16:20:45.741760 74.125.22.27.25 > 10.1.3.2.55548: P 1:54(53) ack 1 win 333 <nop,nop,timestamp 2118147354 14520621>
16:20:45.742167 10.1.3.2.55548 > 74.125.22.27.25: P 1:25(24) ack 54 win 17160 <nop,nop,timestamp 14520621 2118147354> (DF)
16:20:45.754901 74.125.22.27.25 > 10.1.3.2.55548: . ack 25 win 333 <nop,nop,timestamp 2118147367 14520621>
16:20:45.766330 74.125.22.27.25 > 10.1.3.2.55548: P 54:222(168) ack 25 win 333 <nop,nop,timestamp 2118147379 14520621>
16:20:45.768117 10.1.3.2.55548 > 74.125.22.27.25: F 25:25(0) ack 222 win 17160 <nop,nop,timestamp 14520621 2118147379> (DF)
16:20:45.769470 10.1.3.2.55549 > 64.233.186.27.25: S 2061164667:2061164667(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 14520621 0> (DF)
16:20:45.781278 74.125.22.27.25 > 10.1.3.2.55548: F 222:222(0) ack 26 win 333 <nop,nop,timestamp 2118147394 14520621>
16:20:45.781298 10.1.3.2.55548 > 74.125.22.27.25: . ack 223 win 17160 <nop,nop,timestamp 14520621 2118147394> (DF)
16:20:45.892998 64.233.186.27.25 > 10.1.3.2.55549: S 1068554356:1068554356(0) ack 2061164668 win 42540 <mss 1430,nop,nop,timestamp 2122455153 14520621,nop,wscale 7>
16:20:45.893020 10.1.3.2.55549 > 64.233.186.27.25: . ack 1 win 17160 <nop,nop,timestamp 14520621 2122455153> (DF)
16:20:46.351142 64.233.186.27.25 > 10.1.3.2.55549: P 1:53(52) ack 1 win 333 <nop,nop,timestamp 2122455612 14520621>
16:20:46.351480 10.1.3.2.55549 > 64.233.186.27.25: P 1:25(24) ack 53 win 17160 <nop,nop,timestamp 14520622 2122455612> (DF)
16:20:46.475119 64.233.186.27.25 > 10.1.3.2.55549: . ack 25 win 333 <nop,nop,timestamp 2122455735 14520622>
16:20:46.654254 64.233.186.27.25 > 10.1.3.2.55549: P 53:221(168) ack 25 win 333 <nop,nop,timestamp 2122455915 14520622>
16:20:46.655007 10.1.3.2.55549 > 64.233.186.27.25: F 25:25(0) ack 221 win 17160 <nop,nop,timestamp 14520623 2122455915> (DF)
16:20:46.656366 10.1.3.2.55550 > 64.233.186.27.25: S 2061653855:2061653855(0) win 16384 <mss 1460,nop,wscale 0,nop,nop,timestamp 14520623 0> (DF)
16:20:46.789459 64.233.186.27.25 > 10.1.3.2.55550: S 3468420545:3468420545(0) ack 2061653856 win 42540 <mss 1430,nop,nop,timestamp 2125453095 14520623,nop,wscale 7>
16:20:46.789478 10.1.3.2.55550 > 64.233.186.27.25: . ack 1 win 17160 <nop,nop,timestamp 14520623 2125453095> (DF)
16:20:46.819033 64.233.186.27.25 > 10.1.3.2.55549: . ack 26 win 333 <nop,nop,timestamp 2122456079 14520623>
16:20:46.944353 64.233.186.27.25 > 10.1.3.2.55549: F 221:221(0) ack 26 win 333 <nop,nop,timestamp 2122456205 14520623>
16:20:46.944374 10.1.3.2.55549 > 64.233.186.27.25: . ack 222 win 17160 <nop,nop,timestamp 14520624 2122456205> (DF)
16:20:47.271106 64.233.186.27.25 > 10.1.3.2.55550: P 1:54(53) ack 1 win 333 <nop,nop,timestamp 2125453577 14520623>
16:20:47.271561 10.1.3.2.55550 > 64.233.186.27.25: P 1:25(24) ack 54 win 17160 <nop,nop,timestamp 14520624 2125453577> (DF)
16:20:47.404206 64.233.186.27.25 > 10.1.3.2.55550: . ack 25 win 333 <nop,nop,timestamp 2125453710 14520624>
16:20:47.580796 64.233.186.27.25 > 10.1.3.2.55550: P 54:222(168) ack 25 win 333 <nop,nop,timestamp 2125453887 14520624>
16:20:47.581449 10.1.3.2.55550 > 64.233.186.27.25: F 25:25(0) ack 222 win 17160 <nop,nop,timestamp 14520625 2125453887> (DF)
16:20:47.754376 64.233.186.27.25 > 10.1.3.2.55550: . ack 26 win 333 <nop,nop,timestamp 2125454060 14520625>
16:20:47.887736 64.233.186.27.25 > 10.1.3.2.55550: F 222:222(0) ack 26 win 333 <nop,nop,timestamp 2125454194 14520625>
16:20:47.887751 10.1.3.2.55550 > 64.233.186.27.25: . ack 223 win 17160 <nop,nop,timestamp 14520625 2125454194> (DF)

I don't think it is being blocked by my ISP as I can telnet to the mail server it is trying to contact.

Code:
telnet aspmx.l.google.com 25
Trying 64.233.171.27...
Connected to aspmx.l.google.com.
Escape character is '^]'.
220 mx.google.com ESMTP t4si11715407qcq.0 - gsmtp


Anybody have any ideas on what could be causing my messages to not be delivered suddenly?
# 2  
Old 12-15-2014
Do you have a google gmail account? Then you have to connect via http to google and send your email. I think that this is possible with lynx or wget. I do not know for sure. Otherwise, you have to start sendmail on your own server and turn your box into a mail server.

-- assuming I understand what you are trying to do. google's mail servers require logon credentials. Otherwise you could spoof them as the source of your email. Or spam.
# 3  
Old 12-15-2014
Thanks for the reply jim mcnamara. Maybe my question wasn't worded correctly. The server was sending me messages to my gmail account until a few weeks ago, then it stopped. When I used to receive the message the e-mail in the from address would be "root@es1.md.usgrdc.com", which es1 is the name of my server. Now when I attempt to send an e-mail from the server I receive the messages from my original post.

I have seen some tutorials on setting up mailx to use googles mail servers, but I would like to avoid doing that at it requires a lot of re-configuration on a server that used to be able to send mail without it.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Mailx with attachment and message body

i have to attach the 'body in the email' along with attachment below code is throwing errors, how can i do it ? here body file contains message, it should display in email, please help i am using HP-UX (cat body ;) (uuencode attch1 attch1 ;) | mailx -m -s "testing" "abc@gmail.com" ... (4 Replies)
Discussion started by: only4satish
4 Replies

2. Shell Programming and Scripting

urgent: Not able to send the html formatted message from mailx

<html> <body style=background-color:AliceBlue> <p>Hi,<pre>please check the connectivity status of the server. <pre> And find the server log file for more details. </p> <h1><font size="4">SERVER <font color="red">111.111.11.1</font> IS NOT AVAILABLE IN ONLINE</font></h1> <font color="red"... (5 Replies)
Discussion started by: jothi basu
5 Replies

3. UNIX for Dummies Questions & Answers

Message success/faliure delivery notification - mailx

Guys, Is it possible to get a delivery status message like success/faliure notification after sending a mail using mailx. -v option can be used to get the message failure notification if any.. is there any option to get the message success notification? (0 Replies)
Discussion started by: manoharg
0 Replies

4. UNIX for Dummies Questions & Answers

Mailx empty body message

Hi, Is there a way to suppress this message? Null message body; hope that's ok My email string is: mailx -s "This is my subject" myemail@domain.com < /dev/null It's just an annoyance to me that I would like see go away. (3 Replies)
Discussion started by: bbbngowc
3 Replies

5. Shell Programming and Scripting

How to receive message in 2 lines using mailx command

Hi, I have a file with 2 records in two lines. While mailing these two records using mailx command, those two records coming in a single line. I have used the following command to send those records via mail. cat filename | mailx -s "subject" mailaddress I want the two records in... (3 Replies)
Discussion started by: siri_886
3 Replies

6. Shell Programming and Scripting

Problem while sending message and attachment with mailx

Hi All, I am trying to send a mail with an attachment and message. Following command I am using. (cat <messagefile> ; uuencode <attachmentfile> <attachmentfile>)|mailx -s"Subject" dave@email.com In the received mail, message body is appearing fine. But attachment is not coming. Rather... (2 Replies)
Discussion started by: nihar.dutta
2 Replies

7. Shell Programming and Scripting

mailx: concatenating strings for message body (KSH)

Hi all, Think this is a pretty simple problem, but I've been thinking about it for a few days. Let's say that I'm going to have to output the contents of a file as the body of a mailx message. I'll probably do this: cat <filename> | mailx <extra commands> However, how do I go about doing... (1 Reply)
Discussion started by: rockysfr
1 Replies

8. Solaris

distribution list won't expand in mailx message

Hi, I have a distribution list called /nisserver/sysadmin/user-alias-files/all_users. The contents of the file have the userid/usernames of the techs in my company. These userid/usernames in the file do not have the @abc.com appended to them. After I type the newaliases command the results... (4 Replies)
Discussion started by: antalexi
4 Replies

9. UNIX for Dummies Questions & Answers

mailx error message : mailx: NUL changed to @

If I use the "Mail" link instead of the "mail" link to ../mailx I get this error. Mail so-n-so @whatever.com mailx: NUL changed to @ Unknown command: "postmaster" The email still goes through but i get the error. If I use "mail" it goes thru without the error. Any ideas?? (2 Replies)
Discussion started by: BG_JrAdmin
2 Replies

10. UNIX for Advanced & Expert Users

email attachment, with a message using mailx

Hi, I am trying to include a message along with an attachment with an email using mailx on AIX. uuencode Test.dat Test.dat| mailx -s 'Testing' mymail@yahoo.com < MESGFILE This only gives me the contents of MESGFILE as my message. If I remove the < FILE I recieve the attachment. What... (4 Replies)
Discussion started by: edog
4 Replies
Login or Register to Ask a Question