Solved

mailx does not working

Posted on 2014-11-10
4
237 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:
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Why VNC doesn't work in Redhat? 11 39
Call Shell Script from Perl Script 6 76
Fixing Non-Standard characters in text 8 91
How to setup MSN email in Zimbra 6 44
New-MailboxSearch Powershell Command and step by step approach to Search and Extract Emails form Exchange 2013 Journaling server.
This process describes the steps required to Import and Export data from and to .pst files using Exchange 2010. We can use these steps to export data from a user to a .pst file, import data back to the same or a different user, or even import data t…
In this video we show how to create a Contact 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 >> Contact ta…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

912 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

20 Experts available now in Live!

Get 1:1 Help Now