Rake task with login and password in crontab
It concerns this wiki page : RedmineReceivingEmails
I run a cron job like :
*/30 * * * * redmineuser rake -f /path/to/redmine/appdir/Rakefile redmine:email:receive_imap RAILS_ENV="production" host=imap.foo.bar firstname.lastname@example.org password=xxx
Can you hide the password and put it in a file for example? It would be more secure, the login/password is in clear in logs.
My environment : Redmine 2.3.3, Ruby 1.9.4
Nothing to do on the redmine side, you can already do something like this with subshells, but I don't know how it will be logged :
rake redmine:email:receive_imap RAILS_ENV="production" host=imap.foo.bar email@example.com password=$(cat /etc/redmine_password)
Or you can
source /etc/redmine.env; before the command, and put in "/etc/redmine.env" something like :
export username=john export password=secret
so you can ommit all this on the command-line.