Sendmail command options question


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Sendmail command options question
# 1  
Old 07-22-2010
Sendmail command options question

Hello,
I am trying to use sendmail with spesific usage

I am trying to tail a file and send it from an address to my personal mail

I am doing so with this command:
tail -c 60000 test | sendmail -f sender@domain.com my@mail.com

This is working great.
I am trying to add this command a subject. so I will be able to add a title to the emails in order to filter them in my mailing applications

Is it possible? I havent found anything about it using the forums
and the simple echo "Subject: bla bla" does not work on this context..

Thanks for the help!
# 2  
Old 07-22-2010
you would probably be better not to use sendmail directly, but to use a more user friendly mail utility like mailx e.g.:

Code:
#  tail /var/adm/messages  | /usr/bin/mailx -r "sender@domain.com" -s "bla bla"  my@mail.com

HTH
# 3  
Old 07-22-2010
I got an error that -r option is invaild, thats one of the reasons im using sendmail
Any suggestion?

p.s
using mailx-8.1.1-44.2.2 on CentOS 5.5

Last edited by Amit86; 07-22-2010 at 08:38 AM..
# 4  
Old 07-22-2010
MySQL

Code:
 
# tail -c 60000 test | sed 1i"Subject: bla bla" | sendmail -f sender@domain.com my@mail.com

# 5  
Old 07-22-2010
Thank you very much, this is working perfectly.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Running set options from the command line and bash command

I'm reading about debugging aids in bash and have come across the set command. It says in my little book that an addition to typing set you can also use them "on the command line when running a script..." and it lists this in a small table: set -o option Command Line... (5 Replies)
Discussion started by: Straitsfan
5 Replies

2. UNIX for Dummies Questions & Answers

Question about Sendmail Options

I am using Sendmail 8.13.1 My sendmail issues 'EHLO aaa.mydomain.com' to another MTA during sending mails. aaa.mydomain.com is hostname of my server. I want to set another domain( bbb.mydomain.com ) in this hello messgae. I tried to change this in sendmail configuration and failed. O... (1 Reply)
Discussion started by: hcliff
1 Replies

3. Shell Programming and Scripting

how to? launch command with string of command line options

my description from another thread... here's my code: #!/bin/bash IFS=$'\n' function OutputName() { input=$1 echo $input input=`echo "$input" | sed -e 's/.//'` input=`echo "$input".avi` output_name=$input } if ]; then echo... (5 Replies)
Discussion started by: TinCanFury
5 Replies

4. Solaris

sendmail question

Hello all, On my solaris 9 I have this process running smmsp 29138 1 0 Apr 17 ? 0:00 /usr/lib/sendmail -Ac -q15m root 29137 1 0 Apr 17 ? 0:00 /usr/lib/sendmail -q15m if i use the command /usr/bin/mconnect connecting to host localhost (127.0.0.1), port... (0 Replies)
Discussion started by: Hugues
0 Replies

5. Solaris

Sendmail Question

Yes Folks, Quick question. Is it possible to send multiple attachments with sendmail and if so how? Thinking here in terms of sending multiple .pdf files as attachments. I can do it with one but how do I do it for multiples. Slainte, (1 Reply)
Discussion started by: KenLynch
1 Replies

6. Solaris

Sendmail Question

Hi Guys, Quick question re sendmail and mail queues. If the sendmail deamon is stopped i.e. set up to execute and stop at certain intervals from crontab, and the sendmail command is invoked the mail is queued in the clientmqueue directory. Then the next time sendmail is executed the mails... (2 Replies)
Discussion started by: KenLynch
2 Replies

7. UNIX for Dummies Questions & Answers

Sendmail question

Hello to all, I configured sendmail on a solaris 9 system the same as another server that the one I configured will replace. I transferred all the required files from the original system to the new one as well ar the /var/mail directory. The sendmail daemon is running however when I try to... (4 Replies)
Discussion started by: GLJ@USC
4 Replies

8. UNIX for Dummies Questions & Answers

Sendmail question

I apologize for asking what I'm sure is a basic question, but I have an automated script that will send a file using sendmail to a list of e-mail accounts. When one or more of those e-mail accounts is bad, it bounces the message back to the account that is executing the script. How can I... (2 Replies)
Discussion started by: Jake513
2 Replies

9. UNIX for Advanced & Expert Users

Sendmail question

How would I configure sendmail so that the INTERN group can only send email locally to xyz.com, while the EXTERN group can send email anywhere. Thanks for your help! (5 Replies)
Discussion started by: Malbeuf
5 Replies

10. UNIX for Dummies Questions & Answers

Sendmail question

I'm using sendmail to send a attachment which works good. I send the To Cc Subject Attachment. Question is does anyone know how to put a voting botton in the script when sending the email I want the Approve;Reject button. (2 Replies)
Discussion started by: Dan Savarino
2 Replies
Login or Register to Ask a Question