Error in redmine mail recive
Added by Antero Neto almost 16 years ago
Hi, I’m having trouble with the rdm-mailhandler. My MTA is the Exim4 running on Debian Etch.
Ruby1.8 - Rails v2.1.2
When I send an email to redmine alias I got the following menssage:
A message that you sent could not be delivered to one or more of its recipients. This is a permanent error. The following address(es) failed:
pipe to |/opt/redmine-0.8/extra/mail_handler/rdm-mailhandler.rb --url http://redmine... --key XXXXXXXX
generated by redmine@...
local delivery failed
The following text was generated during the delivery attempt:
------ pipe to |/opt/redmine-0.8/extra/mail_handler/rdm-mailhandler.rb --url http://redmine... --key XXXXXXXX
generated by redmine@.... ------
/usr/local/lib/site_ruby/1.8/rubygems.rb:723:in `initialize': No such file or directory - (Errno::ENOENT)
from /usr/local/lib/site_ruby/1.8/rubygems.rb:723:in `new'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:723:in `set_paths'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:719:in `each'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:719:in `set_paths'
from /usr/local/lib/site_ruby/1.8/rubygems.rb:526:in `path'
from /usr/lib/ruby/1.8/rdoc/ri/ri_paths.rb:47
from /usr/lib/ruby/1.8/rdoc/ri/ri_options.rb:6:in `require'
from /usr/lib/ruby/1.8/rdoc/ri/ri_options.rb:6
from /usr/lib/ruby/1.8/rdoc/usage.rb:72:in `require'
from /usr/lib/ruby/1.8/rdoc/usage.rb:72
from /opt/redmine-0.8/extra/mail_handler/rdm-mailhandler.rb:49:in `require'
from /opt/redmine-0.8/extra/mail_handler/rdm-mailhandler.rb:49
Replies (4)
RE: Error in redmine mail recive - Added by George Crawford almost 16 years ago
I have exactly the same issue.
I'm a ruby/rails novice, but how does the rdm-mailhandler.rb script know where to find the rest of the redmine source code? Does it get it from the URL? If so, do I need to the URL as specified in the RoR configuration: http://server.com:12001, or the URL rewrite I'm using: http://tracker.server.com ?
Thanks
RE: Error in redmine mail recive - Added by Nicolas LEROY almost 16 years ago
One more, exactly te same!
Added a "pipe_transport" directive to my exim config, set up right permissions on the rb script, and then this error.
RE: Error in redmine mail recive - Added by Nicolas LEROY almost 16 years ago
According to what I can see on Ruby forums, there should the missing file name :
/usr/local/lib/site_ruby/1.8/rubygems.rb:723:in `initialize': No such file or directory - HERE (Errno::ENOENT)
In our case the error message seems indicating that Ruby is trying to load something from an empty value !?
RE: Error in redmine mail recive (workaround) - Added by Максим Туркин over 15 years ago
Exactly the same!
I think the script rdm-mailhandler.rb tries to create temporary file in user's home directory. He does not do so, possibly because of the Exim and its pipes. When I ran script from console, it works fine.
To work around this problem, I did such things:
- tuned Exim's pipe, adding a user, group and use_shell settings
user = <mailer user> group = <mailer group> use_shell
- for start the script I used construction
/usr/local/bin/ruby /path/to/rdm-mailhandler.rb --params
- disabled checking your home directory (forgive me for this) written in line 723 file /usr/local/lib/ruby/site_ruby/1.8/rubygems.rb this:
Was:
next if Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid
Now:
next if 1 != 0 # Etc.getpwuid.uid != File::Stat.new(Gem.user_home).uid
After that it works as expected.