LinuxQuestions.org
Help answer threads with 0 replies.
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 02-28-2012, 04:51 AM   #1
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Rep: Reputation: 30
Really simple cron to send an email every week to confirm mail is working


Hi all, I wonder if anyone can suggest a simple cron entry I can run weekly to let me know that email is working from a host I have that has had some domain mx and resolution issues.

I would like say an email to a particular email account using the localhost relay saying "mail is up and running" and that is it.

Can anyone suggest a best approach?
Will
 
Old 02-28-2012, 05:34 AM   #2
Cedrik
Senior Member
 
Registered: Jul 2004
Distribution: Slackware
Posts: 2,140

Rep: Reputation: 242Reputation: 242Reputation: 242
Something like this ?
Code:
*  *  *  *  0  /usr/bin/mail -s "mail testing" "user_to_test@host" < /home/user/message_file.txt
Will send mail every sunday (0) to user_to_test@host, subject is mail testing and content of message is in /home/user/message_file.txt

Last edited by Cedrik; 02-28-2012 at 05:36 AM.
 
Old 03-01-2012, 06:40 PM   #3
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
Thank you so much I will test and confirm result are as expected - I think this is perfect! Thank you.
 
Old 03-01-2012, 08:55 PM   #4
stardotstar
Member
 
Registered: Nov 2002
Location: /au/qld/bne/4157
Distribution: Gentoo mactel-linux
Posts: 238

Original Poster
Rep: Reputation: 30
Perfect; thank you so much.
 
  


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
cron job running but not getting the email that should send linuxandtsm Linux - Newbie 14 07-19-2011 06:41 PM
Mail Server with : Postfix,dovecot. (Can send email, but can't receive email from internet mail) cparapat Linux - Server 1 08-16-2010 01:57 AM
using cron to send files via email aditaa Linux - Server 5 04-21-2009 05:03 AM
how to make cron not send email? bbeers Slackware 7 11-11-2005 11:31 AM
Cron job , send email mikeshn Linux - General 1 09-21-2003 10:02 AM


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