Notification with different "From" address

Tedman Eng teng at dataway.com
Thu Aug 26 10:51:54 CEST 2004


You can also hard-code the from: field in your sendmail config so that all
mail looks like it comes "From" your chosen address.  I'm no sendmail expert
(not even a novice), but I played around with all the convoluted raw
sendmail rewrite rules until I found something that did the trick.  This may
not be the most proper way, but it works for me.


I changed the nagios user's full name (in /etc/passwd) to whatever I want
displayed in "From:"

Then use the following to change the originating (and thus reply-to) email
address:

/etc/mail/sendmail.cf
#
#  envelope sender rewriting
#
SEnvFromSMTP=11
R$+                     $: $>PseudoToReal $1            sender/recipient
common
R$* :; <@>              $@                              list:; special case
R$*                     $: $>MasqSMTP $1                qualify unqual'ed
names
#
R$+@$*                  yourname at yourcompany.com
#
R$+                     $: $>MasqEnv $1                 do masquerading
#R$+ < @ $=w . >                $: $>Canonify2 $1 < @ ${ms} >   change to
mail s
erver

-----Original Message-----
From: Andreas Ericsson [mailto:ae at op5.se]
Sent: Wednesday, August 25, 2004 1:16 AM
To: nagios-users at lists.sourceforge.net
Subject: Re: [Nagios-users] Notification with different "From" address


Darren.Lichty at alltel.com wrote:
> I had this same issue.
> Ended up using the PERL Net::SMTP module to send the email.  This way you
> can specify all the headers for the notification.
> 

This can also be accomplished with the sendmail program, so any script 
language should be able to do it without having to install more 
perl-stuff than necessary.


> -Darren
> 

-- 
Andreas Ericsson                   andreas.ericsson at op5.se
OP5 AB                             www.op5.se
Lead Developer


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting
any issue. 
::: Messages without supporting info will risk being sent to /dev/null


-------------------------------------------------------
SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media
100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33
Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift.
http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list