Re: mail confusion

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

 



On Mon, 2005-11-07 at 22:08, Jay Moore wrote:
> > > > 
> > > > That would be true if the mail were being submitted from "root".  If the
> > > > submission is from "root@xxxxxxxxxxxxxxxxxxxxx" then the bare minimum
> > > > requirement would be masquerading (without "root" as an EXPOSED_USER)
> > > > to map that to "root@xxxxxxxxxxxxxx".  Without knowing exactly how the
> > > > mail is being submitted there's no way to know whether that would work.
> > > 
> > > The mail is being submitted by 'smartd', the smartmontools daemon...
> > > according to the docs, they use 'mail' (don't know why). Since smartd
> > > runs (at least starts) as root, I guess the message *is* being submitted
> > > from root. 
> > 
> > Smartd has an option to invoke your own mail program.  If you
> > don't want to fix things in the mail transport you can
> > send the output to a script or program that adds your
> > choice of a 'From: address' before sending.
> 
> That would be fine with me... do you have any suggestions for an
> alternative mail program?

Just stick on the headers you want and feed it to "sendmail -t".

Call this mymailer and chmod +x:

#!/bin/sh
(echo From: myfromaddress@mydomain
 echo To:   mytoaddress@mydomain
 echo Subject:  Something interesting
 echo
 cat ) |sendmail -t

That should mail anything you pipe to it using the sender address
you want.  

-- 
  Les Mikesell
   lesmikesell@xxxxxxxxx



[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux