Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

mailx does not working

Posted on 2014-11-10
4
Medium Priority
?
260 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 1000 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 1000 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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

The new Gmail Phishing Scam going around is surprising even the savviest of users with its sophisticated techniques.
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

704 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