Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Signature in sendmail???

Status
Not open for further replies.

blueeyedme

Technical User
Nov 27, 2002
39
0
0
NL
Hello,

I have like 40 scripts that generates emails to users in our company. The thing is that i want to ask every seperate user who recieves a typical email if he/she still wants to receive this email.
I was thinking if it was possible to add some sort of a signature in sendmail. In this way i dont have to manually edit all those scripts to add a line to the email.

Any help is welcome.

Regards,

BlueEyedMe
 
umm, sendmail wasn't exactly made for that ...

you could however queue sendmail (without a timeout) and then sed the df files in the queue to put the footer on the bottom ...

but to be perfectly honest the best place to put them is in your scripts.
 
You could temporarily replace your mailx binary (or whatever you use) with a shell script which tacks the message on the end of the email and then passes it all to a copy of the original binary.

Annihilannic.
 
only trouble with scripts of that nature is when you have to deal with emails with attachments ...
 
That shouldn't be a problem because the attachments should already have been MIME or UUencoded, so they would just be plain text.

I've just experimented and it doesn't seem to be a problem if you have message text before, between or after the attachments.

Perhaps excluding email software from a certain large company!

A sample script could be something like:

[tt]#!/bin/ksh

(
while read INPUT
do
echo "$INPUT"
done
echo
echo "--"
echo "If you're tired of seeing this email every day, email"
echo "BlueEyedMe who will save you the tedium."
) | /usr/bin/mailx.orig "$@"[/tt]

Annihilannic.
 
that works for you? even with MIME?

interesting ... i thought that the footer wouldn't be viewed in the client, but you learn a new thing every day :)
 
I didn't try with MIME. Is there usually a standard MIME encoding utility installed with Unix? I'm using Solaris.

Annihilannic.
 
look at mpack ... it came with sfw cd ...

if not i can get you a copy easily :)
 
Thanks.

Google told me to go here: ftp://ftp.andrew.cmu.edu/pub/mpack/

As usual, I obeyed.

Annihilannic.
 
in the sendmail forum someone gave a good couple of places to get scripts to work with this:

thread14-586221

do remember to give him a star if it helps you :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top