1

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.

nicoX
  • 1,142
  • 3
  • 13
  • 25
  • 1
    You need to set up a cron job: http://askubuntu.com/questions/2368/how-do-i-set-up-a-cron-job – labarna Oct 22 '13 at 13:11

1 Answers1

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
  • 27,506
  • 12
  • 74
  • 77