List Info

Thread: change the "From" line in crond's mails, how?




change the "From" line in crond's mails, how?
country flaguser name
Cuba
2007-04-05 08:18:25
Hello everybody

I feel a litle disoriented about this topic, I could
not find any hint about what to do to change the
"FROM" text (not the address) of emails generated
by
crond, the one run it by root 

I have several servers who send its root's emails to
one specific address (through aliases offcourse), the
problem is that I want to notice which message belong
to which server without open it 
the subject is the same in all mails an so the FROM
text (not the address ofcourse)

I change the root's "comment" field in passwd file
and
it works for several root's mails but not for the
crond ones

I feel disoriented because I could not even find the
homepage for vixie-cron project!!! does anybody knows
where to find it?

thanks
roger

__________________________________________
RedHat Certified Engineer ( RHCE )
Cisco Certified Network Associate ( CCNA )


 
____________________________________________________________
________________________
Looking for earth-friendly autos? 
Browse Top Cars by "Green Rating" at Yahoo! Autos'
Green Center.
http://autos.yah
oo.com/green_center/

--
nahant-list mailing list
nahant-listredhat.com
h
ttps://www.redhat.com/mailman/listinfo/nahant-list

Re: change the "From" line in crond's mails, how?
user name
2007-04-05 09:27:25
On 4/5/07, Roger Peņa <orkcuyahoo.com> wrote:
> Hello everybody
>
> I feel a litle disoriented about this topic, I could
> not find any hint about what to do to change the
> "FROM" text (not the address) of emails
generated by
> crond, the one run it by root 
>
> I have several servers who send its root's emails to
> one specific address (through aliases offcourse), the
> problem is that I want to notice which message belong
> to which server without open it 
> the subject is the same in all mails an so the FROM
> text (not the address ofcourse)

Depending on your mail system you might be able to use
plussed
addresses. So rather than aliasing the root mail on box
x.y.z to
boba.b.c you might be able to send it to bob+x.y.za.b.c
instead
where the +x.y.z  would be different on each system
indicating which
machine it is coming from in the From: header.

John

--
nahant-list mailing list
nahant-listredhat.com
h
ttps://www.redhat.com/mailman/listinfo/nahant-list

RE: change the "From" line in crond's mails, how?
country flaguser name
United States
2007-04-05 09:39:34
This isn't exactly what you asked.... but, you could
change the subject of each by using mail explicitly in
your crontab file, something like

1 2 3 * *  /bin/date | mailx -s'Date Output from machine
BOB' memyaddress

Or make a shell script wrapper that does all of the email
stuff
along with the tasks you want to perform, and put that shell
script
into cron.

Chris



 

-----Original Message-----
From: nahant-list-bouncesredhat.com on behalf of
inode0
Sent: Thu 4/5/2007 8:27 AM
To: Red Hat Enterprise Linux 4 (Nahant) Discussion List
Subject: Re: change the "From" line in crond's
mails, how?
 
On 4/5/07, Roger Peņa <orkcuyahoo.com> wrote:
> Hello everybody
>
> I feel a litle disoriented about this topic, I could
> not find any hint about what to do to change the
> "FROM" text (not the address) of emails
generated by
> crond, the one run it by root 
>
> I have several servers who send its root's emails to
> one specific address (through aliases offcourse), the
> problem is that I want to notice which message belong
> to which server without open it 
> the subject is the same in all mails an so the FROM
> text (not the address ofcourse)

Depending on your mail system you might be able to use
plussed
addresses. So rather than aliasing the root mail on box
x.y.z to
boba.b.c you might be able to send it to bob+x.y.za.b.c
instead
where the +x.y.z  would be different on each system
indicating which
machine it is coming from in the From: header.

John

--
nahant-list mailing list
nahant-listredhat.com
h
ttps://www.redhat.com/mailman/listinfo/nahant-list


--
nahant-list mailing list
nahant-listredhat.com
h
ttps://www.redhat.com/mailman/listinfo/nahant-list

  
Re: change the "From" line in crond's mails, how?
country flaguser name
Australia
2007-04-05 16:53:01
Roger Peņa wrote:
> Hello everybody
> 
> I feel a litle disoriented about this topic, I could
> not find any hint about what to do to change the
> "FROM" text (not the address) of emails
generated by
> crond, the one run it by root 
> 
> I have several servers who send its root's emails to
> one specific address (through aliases offcourse), the
> problem is that I want to notice which message belong
> to which server without open it 
> the subject is the same in all mails an so the FROM
> text (not the address ofcourse)

procmail can probably sort them out for you, it can filter
on both 
headers and bodies.

There's a procmail list for expert help, though the man
pages are fairly 
good.

> 
> I change the root's "comment" field in passwd
file and
> it works for several root's mails but not for the
> crond ones
> 
> I feel disoriented because I could not even find the
> homepage for vixie-cron project!!! does anybody knows
> where to find it?

Might be at isc.org - where Paul Vixie hangs out these
days.

> 
> thanks
> roger




-- 

Cheers
John

-- spambait
1aaaaaaacoco.merseine.nu  Z1aaaaaaacoco.merseine.nu

Please do not reply off-list

--
nahant-list mailing list
nahant-listredhat.com
h
ttps://www.redhat.com/mailman/listinfo/nahant-list

[1-4]

about | contact  Other archives ( Real Estate discussion Medical topics )