Project

General

Profile

using redmine and gmail

Added by Matt Freitag about 12 years ago

I'm on redmine 1.4.4 trying to get it to send email notifications out to people using a gmail account I've set up.

An error occurred while sending mail (501 Syntax: HELO hostname )

and don't know where to go. I've tried to follow http://www.redmine.org/boards/2/topics/789, http://www.redmine.org/boards/2/topics/5404, http://www.redmine.org/boards/2/topics/6641, http://www.redmineblog.com/articles/setup-redmine-to-send-email-using-gmail and http://www.redmine.org/projects/redmine/wiki/EmailConfiguration but it's no use. But it's probably just me being stupid.

Postfix log entry:
Sep 16 23:20:51 redmine postfix/smtpd[4163]: connect from localhost[127.0.0.1]
Sep 16 23:20:51 redmine postfix/smtpd[4163]: lost connection after HELO from localhost[127.0.0.1]
Sep 16 23:20:51 redmine postfix/smtpd[4163]: disconnect from localhost[127.0.0.1]

postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_size_limit = 0
mydestination = localdomain, localhost, localhost.localdomain, localhost
myhostname = www.huskygames.com
mynetworks = 127.0.0.0/8
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes

my configuration.yml
production:
delivery_method: :sendmail
smtp_settings:
tls: true
address: "localhost"
port: '587'
domain: "smtp.gmail.com"
authentication: :plain
user_name: "[removed]@huskygames.com"
password: "[removed]"

I really hope I missed something small. Let me know if you need something else from me.


Replies (2)

RE: using redmine and gmail - Added by Klark Kent about 12 years ago

Looks like you are mixing using your localhost's postfix and gmail. If you'd like to use gmail, you're configuration should look like this:

production:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      tls: true
      enable_starttls_auto: true
      address: "smtp.gmail.com" 
      port: 587
      domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
      authentication: :plain
      user_name: "[removed]@gmail.com" # or "username@huskygames.com" if using Googleapps
      password: "[removed]" 

RE: using redmine and gmail - Added by Matt Freitag about 12 years ago

So I took that and put it in my configuration.yml file in place of the generic, default stuff (reinstalled after breaking it so badly it wouldn't start again). Same error. I have no idea what's happening here.

My Redmine log:
@Processing AdminController#test_email (for [removed] at 2012-09-19 19:43:56) [GET]
Parameters: {"controller"=>"admin", "action"=>"test_email"}
Sending email notification to: [removed]
Redirected to http://huskygames.com:3000/settings/edit?tab=notifications
Completed in 13ms (DB: 0) | 302 Found [http://huskygames.com/admin/test_email]

Processing SettingsController#edit (for [removed] at 2012-09-19 19:43:56) [GET]
Parameters: {"controller"=>"settings", "action"=>"edit", "tab"=>"notifications"}
Rendering template within layouts/admin
Rendering settings/edit
Completed in 115ms (View: 111, DB: 1) | 200 OK [http://huskygames.com/settings/edit?tab=notifications]@

Postfix log:
Sep 19 19:46:58 redmine postfix/smtpd[4113]: connect from localhost[127.0.0.1]
Sep 19 19:46:58 redmine postfix/smtpd[4113]: lost connection after HELO from localhost[127.0.0.1]
Sep 19 19:46:58 redmine postfix/smtpd[4113]: disconnect from localhost[127.0.0.1]

So (to see what happens) I tried to do one of the dumbest things someone new to Postfix can probably do: write my own main.cf from scratch. I saved the default one as main.cf.bak. Here's the one I came up with:

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
mydomain = huskygames.com
myorigin = $mydomain

What's happening and how can it get fixed?

    (1-2/2)