Project

General

Profile

Problem when sending mails: An error occurred while sending mail (getaddrinfo: Name or service not known)

Added by dareal ruxkor over 14 years ago

Hi everybody,

I am trying for several days to get redmine's mail sending to work on my debian machine, but failed so far. All except for mail sending is working perfectly.

To test the mail delivery, I am using the "Send a test E-Mail" functionality in Administration->Settings->E-Mail Notifications.

I am using the newest 0.9-stable, and just finished updating all ruby libraries through "gem update".

Things i tried/checked:
  • The redmine user has read access to the /etc/host* files and to /etc/resolv.conf. (Nevertheless, to test if user permissions were the problem, i started redmine as root user with webrick)
  • tried several "ruby web engines" (currently using thin, but also tried webrick)
  • tried to switch to :smtp, setting all necessary settings such as location, domain, port etc.
  • tried to use :sendmail (I'd like to use the :sendmail setting)
  • checked if I sendmail actually works echo blablabla | /usr/sbin/sendmail my_email_adress@domain.com (it works)
  • added the following setting to config/environments/production.rb
    config.action_mailer.sendmail_settings = {
      :location => '/usr/sbin/sendmail',
      :arguments => '-i -t'
    }
    

Could somebody give me directions? Thanks!


Replies (3)

RE: Problem when sending mails: An error occurred while sending mail (getaddrinfo: Name or service not known) - Added by dareal ruxkor over 14 years ago

Bad me:

I copied the email.yml.example, naming it email.yml. Then i uncommented the :sendmail part without noticing, that not the whole document is commented. At the end several settings are actually uncommented, overwriting my own settings.

RE: Problem when sending mails: An error occurred while sending mail (getaddrinfo: Name or service not known) - Added by Ishino San over 13 years ago

haha, thanks for pointing out your error, I made the same mistake and didn't realize till I read this :)

greets

Ishino

RE: Problem when sending mails: An error occurred while sending mail (getaddrinfo: Name or service not known) - Added by Brian Taylor over 13 years ago

Ah! That was my problem too! Thanks for asking this "dumb" question so that I could discover my own error.

    (1-3/3)