LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 03-01-2006, 01:32 AM   #1
munirfa
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Rep: Reputation: 0
How to modify the "Subject" in Sendmail


Hi,

In my setup , I am frwording messages from Tivoli Monitoring to Send mail.
then send mail forward this messages to Lotus Domino server.

Everything is working fine and I am receiving the messages in lotus notes .

I want to modify the "Subject" information coming from sendmail.

I want to add first line of the messagse in "Subject".

can anybody help me in this ?



Thanks in Advance

Munir
 
Old 03-01-2006, 06:45 AM   #2
trickykid
Guru
 
Registered: Jan 2001
Posts: 24,133

Rep: Reputation: 199Reputation: 199
If your using the mail command, which most do, just tag on the -s option in it..

$ mail -s 'My Subject' user@blah.com
 
Old 03-01-2006, 06:49 AM   #3
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
If you're using sendmail directly (ie via the -t and possibly also -i option), try adding the
line
Subject: your_subject

at the beginning of your mail body. It should add the Subject header.
 
Old 03-03-2006, 11:23 PM   #4
munirfa
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Modifying subject in send mail

Thanks for the replay.

In my setup Tivoli is generating messages automatically and this message is sent to Sendmail .

Then sendmail forwarding this messages to lotus domino.

The message coming from Tivoli to Sendmail contains Subject and message body.

I want to put some line from message body to subject in email before forwarding to Lotus Donimo.

Details are as follows -------


Subject : Low_IdleCPUUsage

Message Body :

HOSTNAME: munir

ENDPOINT: munir

ENDPOINT CLASS: Endpoint

RESOURCE MODEL: DMXCpu

PROFILE: prf-AIXSrv@xyz

EVENT_SEVERITY: WARNING
Low_IdleCPUUsage_percidlecpu=4.367394745349884
Low_IdleCPUUsage_name=Total
Low_IdleCPUUsage_event_key=name=Total;
Low_IdleCPUUsage_eventid=1141437451793
Low_IdleCPUUsage_severity=WARNING
Low_IdleCPUUsage_alreadysent=false

----------------------------------------------------------------------------------


In above I want to add few lines from message body to SUBJECT.


Regards,

Munir





Quote:
Originally Posted by trickykid
If your using the mail command, which most do, just tag on the -s option in it..

$ mail -s 'My Subject' user@blah.com
 
Old 03-06-2006, 02:03 AM   #5
timmeke
Senior Member
 
Registered: Nov 2005
Location: Belgium
Distribution: Red Hat, Fedora
Posts: 1,515

Rep: Reputation: 61
Munir, in your case, sendmail is strictly acting as an MTA (mail transport agent). So, it's just "transporting" the mails that Tivoli generates.

You could write some sendmail rules to change the subject automatically. But this isn't so trivial to do.

The simplest way would be to change the subject that Tivoli generates. But I'm not familiar with Tivoli, so I can't help you with that.
 
Old 03-06-2006, 11:57 PM   #6
munirfa
LQ Newbie
 
Registered: Feb 2006
Posts: 3

Original Poster
Rep: Reputation: 0
Thanks,

I will try to do from Tivoli side.


Regards,

Munir
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to modify "start" menu in FC3-KDE desktop? quixote9 Fedora 2 05-30-2005 12:03 AM
How to change the subject line of Thread with "Solved" ? anindyanuri LQ Suggestions & Feedback 6 05-09-2005 12:57 PM
Sendmail settings. Will sendmail always answer "helo". (and tracing blocked port 25) Bjorkli Linux - Networking 5 05-24-2004 03:13 AM
Can I somehow change the subject "headline"? wictro LQ Suggestions & Feedback 4 02-09-2004 07:54 AM
How to modify dial options ( From "pulse" to "tone" ) nykey Linux - Newbie 3 11-24-2003 01:39 PM


All times are GMT -5. The time now is 03:10 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration