Sponsored Content
Full Discussion: mail from header
Top Forums Shell Programming and Scripting mail from header Post 302286849 by ranjithpr on Thursday 12th of February 2009 05:20:44 AM
Old 02-12-2009
Following will send mail with From as myname@abc.com, To as yourname@abc.com, Subject as My Subject to the id who@abc.com

$ cat mail.txt
From : myname@abc.com
To : yourname@abc.com
Subject : My Subject

Hi,

Test mail.

Regards

My Name.

$ sendmail who@abc.com < mail.txt
 

9 More Discussions You Might Find Interesting

1. Linux

Reading the header of a tar file(posix header)

say i have these many file in a directory named exam. 1)/exam/newfolder/link.txt. 2)/exam/newfolder1/ and i create a tar say exam.tar well the problem is, when i read the tar file i dont find any metadata about the directories,as you cannot create a tar containig empty directories. on the... (2 Replies)
Discussion started by: Tanvirk
2 Replies

2. Solaris

how to forward mail in /var/mail/username to external mail

Dear All, Now I use solaris 10 and I try to forward mail from /var/mail/username to their external mail so what should I do? thank u in advance (2 Replies)
Discussion started by: unitipon
2 Replies

3. Shell Programming and Scripting

Renaming all header to specific header pattern

Input #HAC0253 EFVHIJHIJEFVTHIJOPKOPKTEFVEFVEFVOPKHIJOPKOPKHIJTTEFVEFVTEFV #BASFS12 EFVEFVHIJEFVEFVTOPKEFVOPKTHIJTTHIJOPK #ACG5115 TEFVEFVOIJEFVHIJHIJOPKOPKHIJHIJTTEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK #ECG5114 IJTOPKHIJEFVOEFVEFVOPKTTEFVEFVOPKHIJOPKOPKOPK . . Output (5 Replies)
Discussion started by: patrick87
5 Replies

4. UNIX for Advanced & Expert Users

need to configure mail setting to send mail to outlook mail server

i have sun machines having solaris 9 & 10 OS . Now i need to send mail from the machines to my outlook account . I have the ip adress of OUTLOOK mail server. Now what are the setting i need to do in solaris machines so that i can use mailx or sendmail. actually i am trying to automate the high... (2 Replies)
Discussion started by: amitranjansahu
2 Replies

5. UNIX for Dummies Questions & Answers

Merge all csv files in one folder considering only 1 header row and ignoring header of all others

Friends, I need help with the following in UNIX. Merge all csv files in one folder considering only 1 header row and ignoring header of all other files. FYI - All files are in same format and contains same headers. Thank you (4 Replies)
Discussion started by: Shiny_Roy
4 Replies

6. Shell Programming and Scripting

Add column header and row header

Hi, I have an input like this 1 2 3 4 2 3 4 5 4 5 6 7 I would like to count the no. of columns and print a header with a prefix "Col". I would also like to count the no. of rows and print as first column with each line number with a prefix "Row" So, my output would be ... (2 Replies)
Discussion started by: jacobs.smith
2 Replies

7. Shell Programming and Scripting

Manipulate all rows except header, but header should be output as well

Hello There... I have a sample input file .. number:department:amount 125:Market:125.23 126:Hardware store:434.95 127:Video store:7.45 128:Book store:14.32 129:Gasolline:16.10 I will be doing some manipulations on all the records except the header, but the header should always be... (2 Replies)
Discussion started by: juzz4fun
2 Replies

8. Shell Programming and Scripting

Find header in a text file and prepend it to all lines until another header is found

I've been struggling with this one for quite a while and cannot seem to find a solution for this find/replace scenario. Perhaps I'm getting rusty. I have a file that contains a number of metrics (exactly 3 fields per line) from a few appliances that are collected in parallel. To identify the... (3 Replies)
Discussion started by: verdepollo
3 Replies

9. UNIX for Advanced & Expert Users

Client was not authenticated to send anonymous mail during MAIL FROM (in reply to MAIL FROM comm

I am having trouble getting mail to work on a red hat server. At first I was getting this message. Diagnostic-Code: X-Postfix; delivery temporarily suspended: connect to :25: Connection refused Then added the port to my firewall. Then I temporarily turned off selinux. I then copied this file... (1 Reply)
Discussion started by: cokedude
1 Replies
BSMTP(1)					     Network backup, recovery and verification						  BSMTP(1)

NAME
bsmtp - Bacula's SMTP client (mail submission program) SYNOPSIS
bsmtp [options] <recipient> <...> DESCRIPTION
bsmtp is a simple mail user agent designed to permit more flexibility than the standard mail programs typically found on Unix systems, and to ease portability. It can even run on Windows machines. It is used by the Director daemon to send notifications and requests to the oper- ator. OPTIONS
-4 Forces bsmtp to use IPv4 addresses only. -6 Forces bsmtp to use IPv6 addresses only. -8 Encode the mail in UTF-8. -a Use any ip protocol for address resolution. -c Set the Cc: header. -d nn Set debug level to nn. -dt Print timestamp in debug output. -f Set the From: header. If not specified, bsmtp will try to use your username. -h mailhost:port Use mailhost:port as the SMTP server. (default port: 25) -s Set the Subject: header. -r Set the Reply-To:: header. -l Set the maximum number of lines to be sent. (default: unlimited) -? Show version and usage of program. USAGE
recipients is a space separated list of email addresses. The body of the email message is read from standard input. Message is ended by sending the EOF character (Ctrl-D on many systems) on the start of a new line, much like many 'mail' commands. The actual, automated behavior of bsmtp will depend on the mail-related configuration of the Director in the Messages resource of bacula- dir.conf. Interactive use of bsmtp is pertinent to manually test and ensure these configuration bits are valid. This is highly recommended. CONFIGURATION
These commands should each appear on a single line in the configuration file. Messages { Name = Standard mailcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f "(Bacula) <%r>" -s "Bacula: %t %e of %c %l" %r" operatorcommand = "/home/bacula/bin/bsmtp -h mail.domain.com -f "(Bacula) <%r>" -s "Bacula: Intervention needed for %j" %r" mail = sysadmin@site.domain.com = all, !skipped operator = sysop@site.domain.com = mount console = all, !skipped, !saved } home/bacula/bin is replaced with the path to the Bacula binary directory, and mail.domain.com is replaced with the fully qualified name of an SMTP server, which usually listen on port 25. ENVIRONMENT
If the -h option is not specified, bsmtp will use environment variable SMTPSERVER, or 'localhost' if not set. NOTES
Since bsmtp always uses a TCP connection rather than writing to a spool file, you may find that your From: address is being rejected because it does not contain a valid domain, or because your message has gotten caught in spam filtering rules. Generally, you should spec- ify a fully qualified domain name in the from field, and depending on whether your SMTP gateway is Exim or Sendmail, you may need to modify the syntax of the from part of the message. If bsmtp cannot connect to the specified mail host, it will retry to connect to localhost. BUGS
If you are getting incorrect dates (e.g. 1970) and you are running with a non-English locale, you might try setting the LANG="en_US" envi- ronment variable. AUTHOR
This manual page was written by Jose Luis Tallon <jltallon@adv-solutions.net>, revised and edited by Lucas B. Cohen <lbc@members.fsf.org>. SEE ALSO
bacula-dir(8) Kern Sibbald 3 July 2012 BSMTP(1)
All times are GMT -4. The time now is 02:34 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy