LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 07-18-2008, 06:16 PM   #1
RAH104
Member
 
Registered: Jun 2008
Posts: 33

Rep: Reputation: 15
Question Server Email


Hello,

I would like to receive a regular email containing results of the following commands:

locate *file*
nano *file*

Is this possible?

Thanks.
 
Old 07-18-2008, 07:44 PM   #2
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Just piped the output to mail:

Code:
locate *file* | mail -s "Your subject.." user@example.com
Nano is an editor - what does it mean to email an edit session?
 
Old 07-18-2008, 08:20 PM   #3
RAH104
Member
 
Registered: Jun 2008
Posts: 33

Original Poster
Rep: Reputation: 15
That worked however the following isn't sending an email:

cat /home/freeunlimitedweb.com/runtime_layeredpanel/var/log/httpd/access_log.users | mail -s "Access Log" email@email.com
 
Old 07-18-2008, 08:45 PM   #4
Mr. C.
Senior Member
 
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 61
Now it is time to look at your maillog in /var/log/maillog. Look for transactions at the time you sent the message.

You don't need to use cat - many programs read STDIN:

Code:
mail -s "Access Log" email@email.com /home/freeunlimitedweb.com/.../access_log.users

Last edited by Mr. C.; 07-18-2008 at 08:48 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Web email server from private email server guy_ripper Linux - Server 2 01-17-2008 07:58 AM
Migrating from Lotus Domino Email Server 6.5 to Linux email Server sailu_mvn Linux - Software 0 08-23-2006 12:04 AM
What email program can work with email header on pop3 server TruongAn Linux - Software 0 01-13-2005 12:48 PM
How do I configure postfix master to forward all email to an email server ? hello321_1999 Linux - Software 1 11-18-2004 05:43 AM
Problem receiving email from email server sharon Linux - Newbie 3 07-11-2003 04:57 AM


All times are GMT -5. The time now is 10:42 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration