I need to send continuous mails, say one every minute, for testing purposes from a server running postfix.
With the mail command I can manually do it, although there is no specific option to trigger it to auto send mails.
Asked
Active
Viewed 749 times
1 Answers
1
I think the best way to do this is via a cron job. Type crontab -e in a terminal (you have to be root).
And add a line with the following content:
* * * * * /bin/echo "content" | /usr/bin/mail -s "subject" email@provider.tld
And save the file. It will send every minute a mail. After that restart the cron daemon:
service cron restart
See cron for how to set other time scheduling.
chaos
- 28,186