Using Gmail as a Crowd Mail Server

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This page describes using Gmail for an outgoing mail server. It requires importing Gmail's SSL certificate.

Configuring GMail for Outgoing Mail (SMTP)

  1. Download OpenSSL:
    Linuxhttp://www.openssl.org/
    Windowshttp://gnuwin32.sourceforge.net/packages/openssl.htm
  2. Import the SSL certificate from Gmail:
    Windows: Double-click the openssl file from the directory that gets installed. Run:

     s_client \-connect smtp.gmail.com:465 
    

    Linux: Run:

    openssl s_client \-connect smtp.gmail.com:465 
    
  3. From the output, you want only the alphanumeric string between the lines which say 'BEGIN CERTIFICATE' and 'END CERTIFICATE' (inclusive). Copy the results into a file called gmail.cert using your favorite text editor.           
  4. Exit the openssl prompt, and return to your Java installation's bin directory. Import the cert into your keystore:

    tip/resting Created with Sketch.

    From Sun´s Documentation on Keytool:
    A keystore is created whenever you use a -genkey, -import, or -identitydb command to add data to a keystore that doesn't yet exist. More specifically, if you specify, in the -keystore option, a keystore that doesn't yet exist, that keystore will be created. If you don't specify a -keystore option, the default keystore is a file named .keystore in your home directory. If that file does not yet exist, it will be created."

    Windows:

     keytool \-import \-alias smtp.gmail.com \-keystore $JAVA_HOME/jre/lib/security/cacerts \-file C:\path\to\gmail.cert 

    Linux:

     sudo keytool \-import \-alias smtp.gmail.com \-keystore $JAVA_HOME/jre/lib/security/cacerts \-file /path/to/gmail.cert 
    tip/resting Created with Sketch.

    The default keystore password is 'changeit'.

  5. Configure the JNDI Resource as described on Configuring your Mail Server


If you receive an error using the port 465 please give it a try using the port 587.

To avoid spamming some network providers are not allowing standard ports to send mail.

最終更新日 2018 年 11 月 12 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.