Project

General

Profile

CentOS Cron Email fetching

Added by Paweł Pielat over 10 years ago

Hello,

I'm using CentOS 6.5 and Redmine 2.3.4. I have problems with fetching emails from pop3. I tried many possibilities, but nothing is working.

Actually I have script get_mail.sh in /srv/redmine (it's also path to redmine):
--------------------------------------------------------------------------------
#!/bin/bash

export PATH=$PATH:/usr/local/rvm/gems/ruby-2.0.0-p353/bin:/usr/local/rvm/gems/ruby-2.0.0-p353/gems/

export RUBYLIB=/usr/local/rvm/rubies/ruby-2.0.0-p353/lib

export GEM_HOME=/usr/local/rvm/gems/ruby-2.0.0-p353/gems

cd /srv/redmine

RAILS_ENV="asynchrone"

rake f /srv/redmine/ redmine:email:receive_pop3 host=[myhost] username=[username] password=[password] ssl=1 project=zgloszenia-email tracker=zadanie allow_override=tracker,priority
-------------------------------------------------------------------------------

In addition in /etc/crontab there is:
-----------------------------
*/1 * * * * * root /srv/redmine/get_mail.sh (I want it to work every minute)
-----------------------------

In /var/log/cron there is still error: bad command;

Could you be so kind and help me?