Re: [CentOS] Emailing from Command Line

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Thu, 2006-07-13 at 18:37 -0700, Mark Schoonover wrote:
> Thanks for reading,
> 
> 	I need certain shell scripts to email me after they are done
> running. I've installed ssmtp to forward to my internal SMTP server. I have
> a working ssmtp config on a Gentoo system that works just fine, but on
> CentOS it's not working. Here's a bounce message:
> 
> Date: Thu, 13 Jul 2006 13:33:22 -0700
> From: Mail Delivery Subsystem <MAILER-DAEMON@xxxxxxxxxxxxxxxx>
> To: <root@xxxxxxxxxxxxxxxx>
> Subject: Returned mail: see transcript for details
> Auto-Submitted: auto-generated (failure)
> 
> [-- Attachment #1 --]
> [-- Type: text/plain, Encoding: 7bit, Size: 0.3K --]
> 
> The original message was received at Thu, 13 Jul 2006 13:33:22 -0700
> from backups.amgt.com [127.0.0.1]
> 
>    ----- The following addresses had permanent fatal errors -----
> <admins@xxxxxxxx>
> 
>    ----- Transcript of session follows -----
> 550 5.1.2 <admins@xxxxxxxx>... Host unknown (Name server: amgt.com: no data
> +known)
> 
> [-- Attachment #2 --]
> [-- Type: message/delivery-status, Encoding: 7bit, Size: 0.3K --]
> -N +- 2/3: Mail Delivery Subsys   Returned mail: see transcript for de --
> (11%)
> 
> DNS does work, and I have an MX record to my internal SMTP server, even
> though the ssmtp doesn't use DNS/MX records to forward email. I've also
> tried turning sendmail on/off as well. Where else should I look?? A typical
> command I'm using to email from the shell is this: mail -s "Test de Backups"
> foo@xxxxxxx < /dev/null ...
> 
> Any help, most appreciated!

I know very little about this, but in my little niche, I found I had to
update sendmail.cf to not be restricted to localhost.

In /etc/sendmail, I updated sendmail.mc:

# pwd
/etc/mail
# diff sendmail.mc.bak sendmail.mc
105c105
< DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
---
> dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
#

Then ran

    make -C /etc/mail

as shown in the .mc and .cf files.

This allowed intranet mail to work here.

> 
> Thanks!
> 
> Mark Schoonover
> <snip sig stuff>

HTH
-- 
Bill

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux