mailx notify example

Andy Deckowitz andydeck at deckowitz.com
Mon Jul 23 14:49:12 EDT 2007


Andrew Kirch wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> I'm trying to cook up a mailx method to send a custom e-mail message on
> a failure/return from failure that's a bit easier to read on a
> cellphone's small display.  Has anyone used mailx before for this
> purpose, and if so do you have an example?
>
> Andrew D Kirch - AllThingsIT
> Office: 317-755-0200
> GPG: 735D020C
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.7 (MingW32)
>
> iD8DBQFGgWu7kAlCbnNtAgwRAsHBAJ41XJynpv2bpB+FblX5uft3nPXU2gCgyZbk
> OQsKdpAH1CojF1ctDhUZtYI=
> =9A8z
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> http://argus.tcp4me.com/
> Arguslist at tcp4me.com
> http://www.tcp4me.com/mailman/listinfo/arguslist
>   
I don't use mailx but mail for something similar to this - I'm 
overriding mail and creating a new method pager as follows.  The 
difference is %M - whether or not the message body is appended.

Method "mail" {
        command:        /usr/sbin/sendmail -t
        send:           To: %R\nFrom: %F\nSubject: Argus%E %o is %S\n\n%M\n
        }

Method "pager" {
        command:        /usr/sbin/sendmail -t
        send:           To: %R\nFrom: %F\nSubject: Argus:%E %o is %S\n
        }

I then have notify directives as follows.

Group "something" {
       mail_from:       something at mysite.com
       notify:            
mail:primary.administrator at example.com,secondary.administrator at example.com
       notifyalso:      pager:urgent.messages at pager.example.com
       etc.
}

Sorry for the slow response, I don't check this folder very often :)


More information about the Arguslist mailing list