Delete incoming emails everyday using a Cron
Hi everyone,
I have forwarded mails to my Gmail account but I don't want any emails to be retained on the server. And I can't delete the mail account and just use the forwarder because I need the SMTP info to reply from Gmail.
Is it possible to delete all incoming emails from a particular mail account everyday, using a cron job? Does anyone know how I can achieve this?
Or is there a better way to go about this?
Much thanks!
-
Howdy, You've got 2 options I can think of in this insomnia: 1. Make the output of the crontab go away. Add the > /dev/null to the end of the command and it should shut its trap. An example: * * * * * /usr/local/sbin/mycommand.sh > /dev/null
2. Remove the mail address it's pointing to. Delete or set a dev/null account for the MAILTO= line in the crontab. Thanks!0 -
Thanks 0
Please sign in to leave a comment.
Comments
2 comments