mail confusion
Les Mikesell
lesmikesell at gmail.com
Tue Nov 8 05:51:20 UTC 2005
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 at localhost.localdomain" then the bare minimum
> > > > requirement would be masquerading (without "root" as an EXPOSED_USER)
> > > > to map that to "root at something.else". 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 at mydomain
echo To: mytoaddress at 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 at gmail.com
More information about the fedora-list
mailing list