Solved

mailx does not working

Posted on 2014-11-10
4
232 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
  • 2
4 Comments
 
LVL 19

Accepted Solution

by:
Redimido 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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Resolve Outlook connectivity issues after moving mailbox to new Exchange 2016 server
Easy CSR creation in Exchange 2007,2010 and 2013
In this video we show how to create a Shared Mailbox in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >> Sha…
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.:

743 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now