LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-29-2009, 12:32 PM   #1
nootkan
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Rep: Reputation: 0
Emailing files from the root to an email address


I was wondering what the command was to send a file that I saved in my /tmp/ directory to an email address as an attachment. I tried using this:
Quote:
mail -s "rkhunter debug" -a /tmp/rkhunter-debug.GZqGg25243 address@myemail.com
I recieved this response and I'm not sure which option is the right one to use as none of the recommended ones worked either.
Quote:
mail: invalid option -- a
Usage: mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr ...
[-- sendmail-options ...]
mail [-iInNv] -f [name]
mail [-iInNv] [-u user]
Thanks in advance.
 
Old 10-29-2009, 12:56 PM   #2
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try
Code:
mail address@myemail.com -s "rkhunter debug" < /tmp/rkhunter-debug.GZqGg25243
 
Old 10-29-2009, 01:07 PM   #3
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
Replace "mail" with "mutt" in your command and it should work. That's because some mail implementations do not have the -a option.
If you don't have mutt you can easily install it.

Regards
 
Old 10-29-2009, 02:14 PM   #4
nootkan
LQ Newbie
 
Registered: Oct 2008
Posts: 11

Original Poster
Rep: Reputation: 0
Thanks repo, that worked for me. I looked at installing Mutt as an option also.
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Urgent! Change destination email address in monit and sendmail configuration files jenniekingsland Linux - Newbie 7 11-28-2018 11:57 AM
Emailing files from the root to an email address nootkan Linux - Newbie 1 10-29-2009 01:00 PM
change root / other users email address walidaly Linux - Software 3 03-20-2007 07:32 PM
address book and emailing bobotoes Linux - Software 0 03-24-2005 04:22 PM
Send root mail to email address GUIPenguin Linux - General 1 03-01-2005 07:16 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:56 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