Windows7にredmineをインストールしましたが、メールの送信設定がわかりません。

3,539 views
Skip to first unread message

林 亨

unread,
Dec 14, 2015, 4:02:52 AM12/14/15
to Redmine Users (japanese)
はじめまして。林ともうします。

このたび、私の管理する部署のプロジェクト、タスク管理にredmineを導入しようと考えています。

インストールしたのはローカルマシン、windows7でredmine-3.2.0-0です。
イントラネットで使用しようと思っています。

インストール自体はでき、チケット発行やプロジェクト設定など、問題なく動いています。
ただ、チケット発行の際にメール配信をしたいところで設定のメールテスト配信を行ったところ、
躓かれる方も多いようで調べていたのですが、理解できず質問させて下さい。


・redmine version
redmine-3.2.0-0

・configuration.ymlの場所
C:\Bitnami\redmine-3.2.0-0\apps\redmine\htdocs\config

・エラーメッセージ
メール送信中にエラーが発生しました (534-5.7.14 <https://accounts.google.com/ContinueSignIn?sarp=1&scc=1&plt=AKgnsbuBC )

・configuration.ymlの内容
/*ここから===================================================================================================
# = Redmine configuration file
#
# Each environment has it's own configuration options.  If you are only
# running in production, only the production block needs to be configured.
# Environment specific configuration options override the default ones.
#
# Note that this file needs to be a valid YAML file.
# DO NOT USE TABS! Use 2 spaces instead of tabs for identation.

# default configuration options for all environments
default:
  # Outgoing emails configuration
  # See the examples below and the Rails guide for more configuration options:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      
      address: smtp.gmail.com
      port: 587
      domain: example.net
      authentication: :login
      user_name: 私のGmailアカウント@gmail.com
      password: Gmailパスワード


  # ==== Simple SMTP server at localhost
  #
  #  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      
      address: smtp.gmail.com
      port: 587
      domain: example.net
      authentication: :login
      user_name: 
      password: 

  #    delivery_method: :smtp
  #    smtp_settings:
  #      address: "localhost"
  #      port: 25
  #
  # ==== SMTP server at example.com using LOGIN authentication and checking HELO for foo.com
  #
  #  email_delivery:
default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 587
      domain: "smtp.gmail.com"
      authentication: :plain
      user_name: "user...@gmail.com"
      password: "password"

  #    delivery_method: :smtp
  #    smtp_settings:
  #      address: "example.com"
  #      port: 25
  #      authentication: :login
  #      domain: 'foo.com'
  #      user_name: 'myaccount'
  #      password: 'password'
  #
  # ==== SMTP server at example.com using PLAIN authentication
  #
  #  email_delivery:
  #    delivery_method: :smtp
  #    smtp_settings:
  #      
  #      address: smtp.gmail.com
  #      port: 587
  #      domain: example.net
  #      authentication: :login
  #      user_name: 
  #      password: 

  #    delivery_method: :smtp
  #    smtp_settings:
  #      address: "example.com"
  #      port: 25
  #      authentication: :plain
  #      domain: 'example.com'
  #      user_name: 'myaccount'
  #      password: 'password'
  #
  # ==== SMTP server at using TLS (GMail)
  # This might require some additional configuration. See the guides at:
  #
  #  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      
      address: smtp.gmail.com
      port: 587
      domain: example.net
      authentication: :login
      user_name: 
      password: 

  #    delivery_method: :smtp
  #    smtp_settings:
  #      enable_starttls_auto: true
  #      address: "smtp.gmail.com"
  #      port: 587
  #      domain: "smtp.gmail.com" # 'your.domain.com' for GoogleApps
  #      authentication: :plain
  #      user_name: "your_...@gmail.com"
  #      password: "your_password"
  #
  # ==== Sendmail command
  #
  #  email_delivery:
  #  delivery_method: :smtp
  #  smtp_settings:
  #      
  #      address: smtp.gmail.com
  #      port: 587
  #      domain: example.net
  #      authentication: :login
  #      user_name: 
  #      password: 

  #    delivery_method: :sendmail

  # Absolute path to the directory where attachments are stored.
  # The default is the 'files' directory in your Redmine instance.
  # Your Redmine instance needs to have write permission on this
  # directory.
  # Examples:
  # attachments_storage_path: /var/redmine/files
  # attachments_storage_path: D:/redmine/files
  attachments_storage_path:

  # Configuration of the autologin cookie.
  # autologin_cookie_name: the name of the cookie (default: autologin)
  # autologin_cookie_path: the cookie path (default: /)
  # autologin_cookie_secure: true sets the cookie secure flag (default: false)
  autologin_cookie_name:
  autologin_cookie_path:
  autologin_cookie_secure:

  # Configuration of SCM executable command.
  #
  # Absolute path (e.g. /usr/local/bin/hg) or command name (e.g. hg.exe, bzr.exe)
  # On Windows + CRuby, *.cmd, *.bat (e.g. hg.cmd, bzr.bat) does not work.
  #
  # On Windows + JRuby 1.6.2, path which contains spaces does not work.
  # For example, "C:\Program Files\TortoiseHg\hg.exe".
  # If you want to this feature, you need to install to the path which does not contains spaces.
  # For example, "C:\TortoiseHg\hg.exe".
  #
  # Examples:
  # scm_subversion_command: svn                                       # (default: svn)
  # scm_mercurial_command:  C:\Program Files\TortoiseHg\hg.exe        # (default: hg)
  # scm_git_command:        /usr/local/bin/git                        # (default: git)
  # scm_cvs_command:        cvs                                       # (default: cvs)
  # scm_bazaar_command:     bzr.exe                                   # (default: bzr)
  # scm_darcs_command:      darcs-1.0.9-i386-linux                    # (default: darcs)
  #
  scm_subversion_command:
  scm_mercurial_command:
  scm_git_command:
  scm_cvs_command:
  scm_bazaar_command:
  scm_darcs_command:

  # SCM paths validation.
  #
  # You can configure a regular expression for each SCM that will be used to
  # validate the path of new repositories (eg. path entered by users with the
  # "Manage repositories" permission and path returned by reposman.rb).
  # The regexp will be wrapped with \A \z, so it must match the whole path.
  # And the regexp is case sensitive.
  #
  # You can match the project identifier by using %project% in the regexp.
  #
  # You can also set a custom hint message for each SCM that will be displayed
  # on the repository form instead of the default one.
  #
  # Examples:
  # scm_subversion_path_regexp: file:///svnpath/[a-z0-9_]+
  # scm_subversion_path_info: SVN URL (eg. file:///svnpath/foo)
  #
  # scm_git_path_regexp: /gitpath/%project%(\.[a-z0-9_])?/
  #
  scm_subversion_path_regexp:
  scm_mercurial_path_regexp:
  scm_git_path_regexp:
  scm_cvs_path_regexp:
  scm_bazaar_path_regexp:
  scm_darcs_path_regexp:
  scm_filesystem_path_regexp:

  # Absolute path to the SCM commands errors (stderr) log file.
  # The default is to log in the 'log' directory of your Redmine instance.
  # Example:
  # scm_stderr_log_file: /var/log/redmine_scm_stderr.log
  scm_stderr_log_file:

  # Key used to encrypt sensitive data in the database (SCM and LDAP passwords).
  # If you don't want to enable data encryption, just leave it blank.
  # WARNING: losing/changing this key will make encrypted data unreadable.
  #
  # If you want to encrypt existing passwords in your database:
  # * set the cipher key here in your configuration file
  # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
  #
  # If you have encrypted data and want to change this key, you have to:
  # * decrypt data using 'rake db:decrypt RAILS_ENV=production' first
  # * change the cipher key here in your configuration file
  # * encrypt data using 'rake db:encrypt RAILS_ENV=production'
  database_cipher_key:

  # Set this to false to disable plugins' assets mirroring on startup.
  # You can use `rake redmine:plugins:assets` to manually mirror assets
  # to public/plugin_assets when you install/upgrade a Redmine plugin.
  #
  #mirror_plugins_assets_on_startup: false

  # Your secret key for verifying cookie session data integrity. If you
  # change this key, all old sessions will become invalid! Make sure the
  # secret is at least 30 characters and all random, no regular words or
  # you'll be exposed to dictionary attacks.
  #
  # If you have a load-balancing Redmine cluster, you have to use the
  # same secret token on each machine.
  #secret_token: 'change it to a long random string'

  # Requires users to re-enter their password for sensitive actions (editing
  # of account data, project memberships, application settings, user, group,
  # role, auth source management and project deletion). Disabled by default.
  # Timeout is set in minutes.
  #
  #sudo_mode: true
  #sudo_mode_timeout: 15

  # Absolute path (e.g. /usr/bin/convert, c:/im/convert.exe) to
  # the ImageMagick's `convert` binary. Used to generate attachment thumbnails.
  imagemagick_convert_command: 'C:\Bitnami\redmine-3.2.0-0/imagemagick/convert.exe'

  # Configuration of RMagcik font.
  #
  # Redmine uses RMagcik in order to export gantt png.
  # You don't need this setting if you don't install RMagcik.
  #
  # In CJK (Chinese, Japanese and Korean),
  # in order to show CJK characters correctly,
  # you need to set this configuration.
  #
  # Because there is no standard font across platforms in CJK,
  # you need to set a font installed in your server.
  #
  # This setting is not necessary in non CJK.
  #
  # Examples for Japanese:
  #   Windows:
  #     rmagick_font_path: C:\windows\fonts\msgothic.ttc
  #   Linux:
  #     rmagick_font_path: /usr/share/fonts/ipa-mincho/ipam.ttf
  #
  rmagick_font_path:

  # Maximum number of simultaneous AJAX uploads
  #max_concurrent_ajax_uploads: 2

  # Configure OpenIdAuthentication.store
  #
  # allowed values: :memory, :file, :memcache
  #openid_authentication_store: :memory

# specific configuration options for production environment
# that overrides the default ones
production:

# specific configuration options for development environment
# that overrides the default ones
development:
===================================================================================================ここまで*/

機能的には非常に魅力的なのでどうにかして運用したいです。
ご教授夜宜しくお願いします。

Niimi Makoto

unread,
Dec 14, 2015, 11:07:23 AM12/14/15
to redmine-...@googlegroups.com
林さん、
イントラネットでお使いと言うことですので、
メールサーバーを社内の(イントラネットにある)メールサーバーに変えて見てください。
直接gmailに繋げられないようにしている会社も多いかと思います。

2015年12月14日月曜日、林 亨<hayashi.sma...@gmail.com>さんは書きました:
はじめまして。林ともうします。

このたび、私の管理する部署のプロジェクト、タスク管理にredmineを導入しようと考えています。

インストールしたのはローカルマシン、windows7でredmine-3.2.0-0です。
イントラネットで使用しようと思っています。

インストール自体はでき、チケット発行やプロジェクト設定など、問題なく動いています。
ただ、チケット発行の際にメール配信をしたいところで設定のメールテスト配信を行ったところ、
躓かれる方も多いようで調べていたのですが、理解できず質問させて下さい。


・redmine version
redmine-3.2.0-0

・configuration.ymlの場所

--
このメールは Google グループのグループ「Redmine Users (japanese)」に登録しているユーザーに送られています。
このグループから退会し、グループからのメールの配信を停止するには redmine-users-...@googlegroups.com にメールを送信してください。
このグループに投稿するには redmine-...@googlegroups.com にメールを送信してください。
https://groups.google.com/group/redmine-users-ja からこのグループにアクセスしてください。
その他のオプションについては https://groups.google.com/d/optout にアクセスしてください。

林亨

unread,
Dec 15, 2015, 1:16:08 AM12/15/15
to redmine-...@googlegroups.com
ご回答ありがとうございます。

社内SE曰く、Gmailの制限はかけていないとのことでした。

ですので、もう一度インストールし直しています。
今度はページそのものが500エラーを返して、前より悲惨になってしまいましたが・・・。

--
このメールは Google グループのグループ「Redmine Users (japanese)」のトピックを登録しているユーザーに送られています。
このトピックの登録を解除するには https://groups.google.com/d/topic/redmine-users-ja/vZ1j7xNJjIs/unsubscribe にアクセスしてください。
このグループを退会し、グループのすべてのトピックの登録を解除するには redmine-users-...@googlegroups.com にメールを送信してください。

ひげぺんぎん

unread,
Dec 15, 2015, 9:05:14 AM12/15/15
to Redmine Users (japanese)
mail設定は、bitnamiのインストールのGUIからですよね。

config設定は、あっているように思います。

RemineをインストールしたPCから、普通のメーラーを使用し、gmainが使えるか試すことはできますか?


林 亨

unread,
Dec 15, 2015, 7:58:42 PM12/15/15
to Redmine Users (japanese)
ひげぺんぎん様


ご返答ありがとうございます。

おっしゃる通りbitnami経由のインストールのです
config設定は間違っていないということで一安心です。


Gmailは一般のメーラーから送ることができました。

前のレスで書きましたが、再インストールしたところ
今回はページそのものが500エラーを返してしまい、redm,ine自体にアクセスできなくなっております。

phpmyadmin、rootページは動作しているのでCPU使用率(常時40%くらい)が問題なのかと思っております。

この部分が解決できないと先へ進めませんね・・・。




2015年12月15日火曜日 23時05分14秒 UTC+9 ひげぺんぎん:

K

unread,
Dec 16, 2015, 11:01:55 PM12/16/15
to Redmine Users (japanese)
メールのほうですが、2点考えられます。

ひとつは、configuration.ymlで二個目以降の「delivery_method」と「smtp_setting」が設定を上書きしているので、
コメントアウトが必要かと推測されます。

もうひとつはgmailとのことですので、
「enable_starttls_auto」を設定する(追記する)必要があります。

※「enable_starttls_auto」「redmine」の2つのキーワードでGoogle検索すれば、
Redmine公式サイトで説明が書いてあるのでご参照いただければと思います。

林 亨

unread,
Dec 17, 2015, 4:16:17 AM12/17/15
to Redmine Users (japanese)
K様

ご指摘ありがとうございます。
コメントアウトに加えて、enable_starttls_auto:trueを加えました。

しかし、あと一息感はあるのですが、

SSL_connect returned=1 errno=0 state=SSLv2/v3 read server hello A: unknown protocol

というエラーが出ました・・・。

下記のサイトでは

tls: trueをコメントアウトするようにとの旨がありましたが、
コメントアウトしても消えず、という状況です。

なんとなくGmail側の設定の問題のような気もしますが、
お心当たりはありませんでしょうか。

本当にもう一息な気がして、なんとしても導入したいと思っております。




2015年12月17日木曜日 13時01分55秒 UTC+9 K:

motion

unread,
Dec 17, 2015, 7:47:32 AM12/17/15
to Redmine Users (japanese)
次の手順で設定してみてください。
  • gmailの2段階認証を有効にし、アプリパスワードを作成する。
  • configuration.ymlを開いて中身を全削し、次の内容だけ記述する。
default:
  email_delivery:
    delivery_method: :smtp
    smtp_settings:
      enable_starttls_auto: true
      address: "smtp.gmail.com"
      port: 587
      domain: "smtp.gmail.com"
      authentication: :plain
      user_name: "アドレス@gmail.com"
      password: "作成したアプリパスワード"
  • 再起動して確認
以上


2015年12月14日月曜日 18時02分52秒 UTC+9 林 亨:

林 亨

unread,
Dec 20, 2015, 9:26:02 PM12/20/15
to Redmine Users (japanese)
motion様

ご指摘の作業で動作しました!
ありがとうございます!



2015年12月17日木曜日 21時47分32秒 UTC+9 motion:
Reply all
Reply to author
Forward
0 new messages