Oh My Gosh, I am at my wit's end here trying to figure this out.
GOAL: Configure Discourse (running in a subdomain) for email using Mandrill. Ideally, only Discourse email would go through Mandrill, and the other subdomains would continue to use sendmail.
I'll tell you outright that I have tried so many things that my files are probably a bit wonky.
QUESTION: I have added the relevant (I think) bits of my config files, can anyone help me sort this out?
CentOS 6 + Plesk (1and1 Dynamic Cloud Server)
Apache + Passenger
Discourse installed at: forum.example.com
discourse.conf
# hostname running the forum
hostname = "forum.example.com"
# address of smtp server used to send emails
smtp_address = "smtp.mandrillapp.com"
# port of smtp server used to send emails
smtp_port = 25
# domain passed to smtp server
smtp_domain = "forum.example.com"
# username for smtp server
smtp_user_name = "Mandrill User Name"
# password for smtp server
smtp_password = "Mandrill API Key"
# enable TLS encryption for smtp connections
smtp_enable_start_tls = true
environments/production.rb
config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = {
:address => "smtp.mandrillapp.com",
:port => 587,
:domain => 'forum.example.com',
:user_name => 'Mandrill User Name',
:password => 'Mandrill API Key',
:authentication => 'plain',
:enable_starttls_auto => true }
/etc/postfix/main.cf (based largely on Mandrill's setup instructions)
smtpd_tls_cert_file = /etc/postfix/postfix_default.pem
smtpd_tls_key_file = $smtpd_tls_cert_file
smtpd_tls_security_level = may
smtpd_timeout = 3600s
smtpd_proxy_timeout = 3600s
disable_vrfy_command = yes
mynetworks = 127.0.0.0/8 [::1]/128 198.71.51.193/32
smtpd_sender_restrictions = check_sender_access hash:/var/spool/postfix/plesk/blacklists, permit_sasl_authenticated, check_client_access pcre:/var/spool/postfix/plesk/non_auth.re
smtpd_client_restrictions = permit_mynetworks
smtp_send_xforward_command = yes
smtpd_authorized_xforward_hosts = 127.0.0.0/8 [::1]/128
smtpd_recipient_restrictions = permit_mynetworks, check_client_access pcre:/var/spool/postfix/plesk/no_relay.re, permit_sasl_authenticated, reject_unauth_destination
virtual_mailbox_base = /var/qmail/mailnames
virtual_uid_maps = static:110
virtual_gid_maps = static:31
smtpd_milters = inet:localhost:12768
non_smtpd_milters = inet:localhost:12768
sender_dependent_default_transport_maps = hash:/var/spool/postfix/plesk/sdd_transport_maps
virtual_transport = plesk_virtual
plesk_virtual_destination_recipient_limit = 1
mailman_destination_recipient_limit = 1
myhostname = uxxxxxxx.onlinehome-server.com
smtpd_sasl_auth_enable = yes
# tell Postfix where the credentials are stored
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
# use STARTTLS for encryption
smtp_use_tls = yes
# relayhost = [smtp.mandrillapp.com]
relayhost =
sender_dependent_relayhost_maps = hash:/etc/postfix/relayhost_maps