Solved

mailx does not working

Posted on 2014-11-10
4
248 Views
Last Modified: 2014-11-12
Hi
    i use mailx to send email from my linux, from today, it does not working, below is my shell command.

#!/bin/sh
mailx -s "Keer Server Monitor Report" -a /usr/local/nagios/var/nagios.log beardog1113@sina.com

    i also get the error log in my linux, seems my email has been rejected since it is junk email. my question is: how can i set the sender email address in mailx ? now, my email address is "root@localhost.localdomain", i would like change it to "cnserveradmin@keerok.com", then i will add SPF reocrd in my domain name "keerok.com", i think this will fix the junk email issue is that right?
    any other idea please let me know and thank you.
 

Final-Recipient: rfc822; beardog1113@hotmail.com
Original-Recipient: rfc822;beardog1113@hotmail.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; mx2.hotmail.com
Diagnostic-Code: smtp; 550 OU-002 (COL004-MC4F47) Unfortunately, messages from
    124.207.249.190 weren't sent. Please contact your Internet service provider
    since part of their network is on our block list. You can also refer your
    provider to http://mail.live.com/mail/troubleshooting.aspx#errors.
0
Comment
Question by:beardog1113
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Gabriel Orozco earned 250 total points
ID: 40435296
basically you opened the pandora box.

there are a lot of steps to get hotmail accept your email (And still my mailbox is full of spam there... restrictions seems to be an issue for normal users not for spammers)

my recommendation if you have root, is to reconfigure your smtp to be a smarthost and forward email to a gmail account or other forwarder service, if you want to continue using hotmail addresses,

or go with a different tool that can connect with user/password on remote servers to deliver your email.

The best one I can recommend you is sendEmail:
http://caspian.dotconf.net/menu/Software/SendEmail/

here some instructions:
http://blog.ahughes.org/?p=751

also you can try ssmtp (have used sendEmail successfuly, but there are more options like this one!)
http://tecadmin.net/send-email-smtp-server-linux-command-line-ssmtp/

hope this helps
Gabriel
0
 
LVL 21

Assisted Solution

by:Mazdajai
Mazdajai earned 250 total points
ID: 40436498
Have you try the -r option?
#!/bin/sh
mailx -r cnserveradmin@keerok.com -s "Keer Server Monitor Report" -a /usr/local/nagios/var/nagios.log beardog1113@sina.com
0
 

Author Comment

by:beardog1113
ID: 40436658
thank you and let try
0
 

Author Comment

by:beardog1113
ID: 40436826
it is working after i change the email address to @keerok.com, but the email still in my junk email box, anyway, i can receive it.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
RHEL6 + dockers - No route to host 7 102
sed/awk/tail: how to read 3'de last line 4 66
Block spoofing emails 3 38
DB2 9.7 Grant Execute SP 4 60
Granting full access permission allows users to access mailboxes present in their database. By giving full access permission one can open and read the content of any mailbox but cannot send emails from that mailbox.
Join Greg Farro and Ethan Banks from Packet Pushers (http://packetpushers.net/podcast/podcasts/pq-show-93-smart-network-monitoring-paessler-sponsored/) and Greg Ross from Paessler (https://www.paessler.com/prtg) for a discussion about smart network …
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
In this Micro Video tutorial you will learn the basics about Database Availability Groups and How to configure one using a live Exchange Server Environment. The video tutorial explains the basics of the Exchange server Database Availability grou…

734 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question