Mailx sending but not receiving


 
Thread Tools Search this Thread
Operating Systems Solaris Mailx sending but not receiving
# 1  
Old 02-25-2015
Mailx sending but not receiving

Hi,

I need help with mailx. When I run the below mailx command, it works fine because the exit code is fine, and the message is sent to /usr/mail/<id>

Code:
echo "This is a test message" | mailx -s "Test" <my email address>

My question is, how do I get it to reach my email address (on outlook and not on /usr/mail)?

Thanks.

Last edited by Don Cragun; 02-25-2015 at 08:09 PM.. Reason: Add CODE tags.
# 2  
Old 02-25-2015
If you wanted someone else to send email to your outlook account, what e-mail address would you tell them to use? Presumably, it would be something like id@server.domain. Use that same address as the email address you give to mailx.
# 3  
Old 02-26-2015
I hate mail problems they are not so easy to handle can spend up to days trying to fix mail issues. Most times related to dns or host resolution issues in /etc/hosts file or /etc/nsswitch.conf

from that server where you run the command is it allowed to send email to go out to internet?

do command
nslookup google.com

if cannot check /etc/resolv.conf if there are nameservers there check in /etc/nsswitch.conf if there is an entry
hosts: files dns



if you are only allow relay from this server to another server

1) what is your sendmail.cf DS pointing to? example DSsomemail means it's relaying to somemail server

try to telnet to the mail server at smtp port 25 send email from it see if you can receive.

root# telnet somemail 25
Trying somemail...
Connected to somemail.
Escape character is '^]'.
220 somemail ESMTP Postfix
mail from: darthvader
250 2.1.0 Ok
rcpt to: someone@gmail.com
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
test
test
.
250 2.0.0 Ok: queued as 16FA7160BA3
quit
221 2.0.0 Bye
Connection to somemail closed by foreign host.


if you can telnet and send email and receive it means it's could be some relaying configuration issues. If you cannot means there's also some other issue network dns firewall

I hate mail issues.
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Need help sending attachment via mailx

Hello, I am new to the Unix thing, and I am having trouble sending attachments via shell client putty through mailx. The command I use is $ mailx -s "Subject" user@blah.com < attachment.txt but everytime I do that it would say Cannot open attachment.txt I have the file save to my computer... (5 Replies)
Discussion started by: mrobin20
5 Replies

2. Shell Programming and Scripting

Receiving NDR with mailx

We use mailx (HP-UX) sending emails to list of external parties. When their email address is wrong or mailbox is full, how can I receive Non-Delivery Report (NDR) in a specific internal emailbox being monitored? Please help. Thanks (0 Replies)
Discussion started by: winwin
0 Replies

3. Programming

Sending and Receiving data between Client, HTTP Proxy, and Remote Server

I am having problems receiving data from a remote server. It seems that I can send an HTTP request to any host such as http://www.google.com, but I can't get a reply. I'm sending the host a HTTP 1.0 request that is formatted as such: GET / HTTP/1.0 Host: http://www.google.com Connection:... (0 Replies)
Discussion started by: shubham92
0 Replies

4. Shell Programming and Scripting

sending variable value via mailx

Hi all, I need to send a variable value in the script through mailx. Please find the script below but its not working. agents.sh: agents=`grep "Tot Agents " snapshot.dbm` if (( $? == 0 )); then mailx abc@gmail.com $agents fi (3 Replies)
Discussion started by: db2cap
3 Replies

5. AIX

Mailx Not sending

How can I check to see how/why my mailx program is not sending? /var has enough room. -Thanks ---------- Post updated at 08:48 AM ---------- Previous update was at 08:35 AM ---------- I tested the mailx to send with this command: echo "This is going to be body of the mail" |mailx... (1 Reply)
Discussion started by: tfort73
1 Replies

6. Shell Programming and Scripting

Sending attachement using mailx

Hi I tried reading docs from this forum and googled it...but i couldnt get the answer for attaching a document in mail. I need it to be the actual attachement not adding the content of the file to the body of the mail.. i used uuencode ...to encode the file but it is coming as a junk... (4 Replies)
Discussion started by: aemunathan
4 Replies

7. Shell Programming and Scripting

sending mail through mailx

while trying to send a mail, though the output file doesn't contain any exclamatory mark(!), i am getting that in the mail with an extra line. please help me out from this ASAP. (3 Replies)
Discussion started by: pvamsikr
3 Replies

8. UNIX for Dummies Questions & Answers

sending email from mailx

hi can i know how to use mailx to send email to my lotus email account? i wan to send a file in a directory as an attachment and then email to lotus. can show me the command line to do it? thanks a lot (1 Reply)
Discussion started by: legato
1 Replies
Login or Register to Ask a Question