LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
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 02-10-2006, 03:41 AM   #1
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Rep: Reputation: 30
automated mail a given file


Hi,
I need a little hint for the mail command (line).
I want to automatic send a daily generated logfile via mail to given recipients.

so far I tried:
Code:
mail -a /var/log/file.log -s "subject" recipient@domain.tld
But I still need to "end" the message with <Ctrl-D>. Are there any arguments to ignore this interaction? canīt find something till now....
or must I set up something in the mail.rc? what?

or other ideas?

thx guys!
 
Old 02-10-2006, 04:04 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,163
Blog Entries: 1

Rep: Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032Reputation: 2032
You can use this syntax:
Code:
mail  -s "subject" recipient@domain.tld < /var/log/file.log
 
Old 02-10-2006, 04:15 AM   #3
overlord73
Member
 
Registered: Apr 2004
Location: ..where no life dwells..
Posts: 541

Original Poster
Rep: Reputation: 30
:-)

thx bathory, long live the vikings ;-)
 
  


Reply



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
Individual user's mail file in /var/spool/mail Swakoo Linux - General 1 09-07-2005 06:33 AM
Automated mail ioanv Linux - Software 4 03-29-2005 02:47 AM
Exists a mail-client for Fedora, that can read local mail file without deleting? mxn Linux - Software 1 07-10-2004 12:53 PM
Automated E-Mail cleansing. Thrifty Linux - Software 0 02-20-2004 12:17 PM
Using the 'mail' command to mail a file Crashed_Again Linux - Software 2 08-08-2003 05:19 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:40 AM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration