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

Re: Sender in mail -s command

On Thu, 2005-07-21 at 10:03 +0200, Andreas Wahlert wrote:
> Paul Howarth wrote:
> > On Thu, 2005-07-21 at 09:35 +0200, Andreas Wahlert wrote:
> > 
> >>i have script which sends e-mail to me. How can i specify a complete 
> >>sender address like "boom work de"?? i see in my mailclient only senders
> >>such "nagios localhost localdomain". On my host ist FC3 installed "out 
> >>of the box"
> > 
> > 
> > Do you want *all* mail originating from scripts on this machine to have
> > a "work.de" address, or just mail originating from nagios?
> > 
> > Does this mail need to be sent over the Internet? If so, you will need a
> > valid envelope sender domain instead of localhost.localdomain. What type
> > of Internet connection do you have (dialup, always-on, static/dynamic?).
> > 
> > The configuration is best done in sendmail, which will then work for all
> > programs, not just "mail".
> > 
> > Paul.
> It's only a host for Monitoring. There runs "Fujitsu ServerView" and 
> "nagios" That means "work.de" is enough for all. The script send only 
> notifications mail to my internal mailserver.
> Where can i do this configuration in sendmail??

# yum install sendmail-cf

Edit /etc/mail/sendmail.mc and change:

dnl MASQUERADE_AS(`mydomain.com')dnl



If you want to be able to rewrite "nagios" as "boom", you should also

FEATURE(`genericstable',`hash -T<TMPF> /etc/mail/genericstable')dnl

just below the existing line:

FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl

Then create a file /etc/mail/genericstable containing the line:

nagios		boom work de

Then run "make -C /etc/mail; service sendmail reload"

I think that should do what you want.

Paul Howarth <paul city-fan org>

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