azurediaspora

Configure SMTP for outbound emails

To allow the Diaspora pod to send mails, you have to modify /opt/bitnami/apps/diaspora/htdocs/config/diaspora.yml:

## Setup E-Mail
mail: ## Section
  ## First you need to enable it ;)
  enable: true

  ## Sender address used in mail send by Diaspora
  sender_address: 'your@email.com'

  ## This selects which mailer should be used. Take 'smtp' for a smtp
  ## connection, 'sendmail' to use the sendmail binary or
  ## 'messagebus' to use the messagebus service.
  method: 'smtp'

  ## Ignore if method isn't 'smtp'
  smtp: ## Section
    ## Host and port of the smtp server handling outgoing mail.
    ## This should match the common name of the certificate
    ## the SMTP server sends. If he sends one.
    host: 'smtp.example.org'
    port: your_smtp_port

    ## Authentication required to send mail. Use one of 'plain',
    ## 'login' or 'cram_md5'. Use 'none' if server does not support
    ## authentication
    authentication: 'plain'

    ## Credentials to log in to the SMTP server - may be necessary if
    ## authentication is not 'none'
    username: 'smtp_username'
    password: 'smtp_password'

    ## Automatically enable TLS? Ignored if authentication is set to none
    #starttls_auto: true

    ## The domain for the HELO command if needed
    #domain: 'smtp.example.org'

    ## OpenSSL verify mode used when connecting to a
    ## SMTP server with TLS. Set this to none if you have
    ## a self signed certificate. Possible values:
    ## 'none', 'peer', 'client_once', 'fail_if_no_peer_cert'
    #openssl_verify_mode: 'none'

After editing the configuration file, restart the Diaspora service:

$ sudo /opt/bitnami/ctlscript.sh restart diaspora_sidekiq

Here is an example using Gmail’s SMTP servers. Replace USERNAME and PASSWORD with your Gmail account username and password respectively.

mail:
  enable: true
  sender_address: 'USERNAME@gmail.com'
method: 'smtp'
  smtp:
    host: 'smtp.gmail.com'
    port: 587
    authentication: 'plain'
    username: 'USERNAME@gmail.com'
    password: 'PASSWORD'
    starttls_auto: true
    domain: 'smtp.gmail.com'
    openssl_verify_mode: 'none'

You may want to configure a default Pod administrator, to do it, you can uncomment and modify:

## Settings relevant to administrators
admins: ## Section
  ## Set the admin account.
  ## This doesn't make the user an admin but is used when a generic
  ## admin contact is neeeded, much like the postmaster role in mail
  ## systems. Set only the username, NOT the full ID.
  account: "podmaster"

  ## E-Mail address users can contact the administrator
  podmin_email: 'podmin@example.org'

To configure the application to use other third-party SMTP services for outgoing email, such as SendGrid, refer to the FAQ.

NOTE: If you are using Gmail as the outbound email server and have experienced issues trying to send emails correctly, check the Gmail SMTP troubleshooting page to learn the causes of these issues and how to solve them.

Last modification January 18, 2019