Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 272
  • Last Modified:

mailx does not working

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
beardog1113
Asked:
beardog1113
  • 2
2 Solutions
 
Gabriel OrozcoSolution ArchitectCommented:
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
 
MazdajaiCommented:
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
 
beardog1113Author Commented:
thank you and let try
0
 
beardog1113Author Commented:
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

Technology Partners: 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!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now