LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Really simple cron to send an email every week to confirm mail is working (https://www.linuxquestions.org/questions/linux-newbie-8/really-simple-cron-to-send-an-email-every-week-to-confirm-mail-is-working-931703/)

stardotstar 02-28-2012 03:51 AM

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

Cedrik 02-28-2012 04:34 AM

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

stardotstar 03-01-2012 05:40 PM

Thank you so much I will test and confirm result are as expected - I think this is perfect! Thank you.

stardotstar 03-01-2012 07:55 PM

Perfect; thank you so much.


All times are GMT -5. The time now is 09:26 PM.