Have a go at setting a From: header in the /tmp/mailout.$$
or changing your sending line to:

(echo From: Jared <[EMAIL PROTECTED]>;cat /tmp/mailout.$$) | mail -s subject [EMAIL 
PROTECTED]

which will work if you mail daemon (e.g. postfix) allows setting the from address, 
which you'll
have to get working anyway.

Otherwise have a go at running the script as the user you want the mail to come from.

cheers,
Woody

On Thu, Aug 28, 2003 at 02:20:35PM +0800, Adam Hewitt wrote:
> A word of advise...People are less likely to want to help when you
> appear to be demanding it of them...
> 
> Dont get me wrong, I understand that you are frustrated, possibly been
> searching mailing lists, google, IRC, etc with no luck (or maybe you
> haven't ;) and this is your last ditch effort. Thats fine, but dont beg.
> LUGs seem to be more forgiving that IRC and other places, but it still
> puts people off.
> 
> Good luck,
> 
> Adam.
> 
> On Fri, 2003-08-29 at 07:16, Jared Pritchard wrote:
> > Hi - I'm new to this group, and relatively new to linux....
> > (I work in it every day and have done for the past 8-10months or so - but
> > it has been all in VI editing HTML & PERL scripts etc. so no specific
> > linux commands besides the basics)
> > 
> > but now I have reached a point in the PERL scripts that it sends emails
> > out to a list of users... however, when they receive them, it is addressed
> > from 'nobody'. We REALLY REALLY need to change that!!!
> > 
> > I use the command 'mail'  in the form
> > mail -s subject [EMAIL PROTECTED] < /tmp/mailout.$$
> > 
> > I cannot find an option in the 'mail' man pages that allows me to specify
> > the 'from' section, and I am assuming that it is the 'user' that sends the
> > email that fills in that position. Maybe the user is guest, or nobody or
> > whatever - i don't know  :/
> > 
> > How can I change the user or specify the 'from' field in the email without
> > using a different mailing program? I need it to be admin or something -
> > 
> > If I have to change mail programs, I will opt for sendmail in the short
> > term, so what I would need the correct syntax to accomplish the same as
> > above WITH from defined as well  :)  (the man pages for sendmail weren't
> > much help in this regard)
> > 
> > Any help will be muchly appreciated!!!
> > 
> > Regards,
> > Jared Pritchard
> 
> -- 
> SLUG - Sydney Linux User's Group - http://slug.org.au/
> More Info: http://lists.slug.org.au/listinfo/slug

-- 
Woody
-- 
SLUG - Sydney Linux User's Group - http://slug.org.au/
More Info: http://lists.slug.org.au/listinfo/slug

Reply via email to