- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- For Rita Workman (sendmail)
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2001 11:39 PM
04-29-2001 11:39 PM
Rita wrote:
Here's a thread that addresses a 'workaround' for sendmail to send a subject line:
http://us-support.external.hp.com/cki/bin/doc.pl/sid=b551b0eb0d495b49d7/screen=ckiDisplayDocument?docId=200000054887756
Now for another option. Have you thought of trying elm, which does have a -s "subject option". Elm uses the sendmail transport. Just a thought,
/rcw
Hi Rita,
For those of us without a US login clicking on the above link is a pain in the glorious maximus because now my browser continually tries to connect to the US site, instead of Europe, and it takes me 10 minutes of continually repointing back to the European site before my browser remembers to stay there. Instead of the above link can you please include the actual document here (in your reply).
Many thanks,
Stefan
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2001 11:50 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-29-2001 11:59 PM
04-29-2001 11:59 PM
Re: For Rita Workman (sendmail)
Your not Rita but thanks for the document. I wanted this document included in a reply (not as an attachment) so that in future someone can search the forums and find it easily, so ive included it below.
Cheers,
Stefan
Command-line mailing with subject, body text and attachments
DocId: KBAN00000679 Updated: 20010420
DOCUMENT
PROBLEM:
Customer wants to be able to create a script to email a binary file to a
distribution list, with a subject line so recipients can readily identify it,
and body text explaining what the attachment is and what to do with it. To do
that, they need a method of creating and sending such a message.
RESOLUTION:
The method involves assembling a message from two separate parts, consisting of
a header which contains the body text and of a uuencoded attachment, then
sending it using the "-t" sendmail flag, which causes sendmail to scan the
message body for such things as addresses and the subject.
The first part of the message is a header, which looks like this:
To:
Cc:
Bcc:
Subject:
Then beginning on this line, you write the body text you want to include.
As you can see, the customer could easily put together a template header file
with variables in key positions, so a script to create and send the messages
could just grab the template and substitute the necessary values for the
variables. It's not necessary to include bcc or cc lines if they're not going
to be used.
Creating the message, then, is a matter of appropriately modifying a copy of
the header, and writing it to a temporary file. Then uuencode the attachment
file and ">>" redirect it to the same temporary file. Now send the contents of
that temporary file to sendmail, using the "-t" flag.
For example, let's say you have a report that you always send to the same
people, always using the same body text and subject line. For that you could
create a fixed header file, called "header" in this example. To distribute the
report:
# cp header > /var/tmp/mailtemp
# uuencode /path/datafile datafile >> /var/tmp/mailtemp
# cat /var/tmp/mailtemp | sendmail -t
# rm /var/tmp/mailtemp
That's all. Because of the "-t" flag, sendmail will read the header for
addressing and subject information. Uuencoded files with a ".csv" suffix sent
in testing arrived at an Outlook client as attachments which called up Excel
just as they should, while the body text part of the header file arrived as
body text.
Aliases were mentioned above in the description of the header. This is part of
sendmail, and works whether you're sending mail using sendmail alone, or with
ELM or mail or mailx or any client using sendmail as a transport vehicle.
In /etc/mail there's a file called "aliases," and in it you can define both
individual aliases and mailing lists. The basic format can be seen by just
looking at the file or consulting the man page for aliases(5). To define a
list, you start the line with the alias for the list, then after a ":"
delimiter, list the addressees (full address or alias) separated by commas.
It's okay to add a space after the comma for clarity. All addresses have to be
on the same line as the alias for the list; a new line is taken as the end of
the list. Sendmail doesn't usually use the aliases file itself, though, but
rather "aliases.db," so after you're done editing the aliases file you have to
issue the command "newaliases" to re-read the aliases file and re-write the
aliases.db file.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2001 04:01 AM
04-30-2001 04:01 AM
Re: For Rita Workman (sendmail)
I did not realize the complication...
I shall endeavor to cut and past the answers in the future. Not only to address your problem, but also for those times when it's an HP doc and the other person doesn't have access to that.
Thank you for pointing this out to me (and hopefully anyone else reading this...)
Regards,
Rita
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-30-2001 04:26 AM
04-30-2001 04:26 AM
Re: For Rita Workman (sendmail)
Thanks Rita,
Cheers,
Stefan