GX Technology : Testing Email - Round Trip to any environment

You can now send emails from your local machine to a specific environment using Thunderbird connected to the dev05mail01.sandbox.clubpenguin.net server.

Setup

Requirements:
Mozilla Thunderbird

Account setup:

ServerUsernamePassword
dev05mail01.sandbox.clubpenguin.comtest_user1Disney1?
dev05mail01.sandbox.clubpenguin.comtest_user2Disney1?
dev05mail01.sandbox.clubpenguin.comtest_user3Disney1?
dev05mail01.sandbox.clubpenguin.comtest_user4Disney1?
dev05mail01.sandbox.clubpenguin.comtest_user5Disney1?

Operations

Currently only the support queue is functional for all languages.

Send any email to "support" at any of the following domains to create a new ticket via the Mail Server API

  • dev05web01.online.disney.com
  • dev16web01.sandbox.clubpenguin.com
  • ms03web01.sandbox.clubpenguin.com
  • qa09web01.sandbox.clubpenguin.com

Since DEV05 and DEV16 share the same database, you will be able to find the newly created tickets with either URL, and the same symbiosis exists for MS03 and QA09.

When responding to a ticket with a specific environment the email subject line will be prepended with the environment that sent the response, i.e. "{DEV05} RE: Club Penguin Support test Ticket: [18159250-81688]"

Responding to the response from Thunderbird will result in the email being directed back to the same environment.

Technical Specs

dev05mail01.sandbox.clubpenguin.com is configurate with Postfix thinking it is the final destination for the following domains: (see /etc/postfix/main.cf and search for "mydestination")

  • dev05mail01.sandbox.clubpenguin.com
  • dev05web01.online.disney.com
  • dev16web01.sandbox.clubpenguin.com
  • ms03web01.sandbox.clubpenguin.com
  • qa09web01.sandbox.clubpenguin.com

test_user# and support* accounts are local user accounts on the mailserver and postfix will bounce any emails for anyone else.

Postfix is configured to use procmail for delivery if configured, all of the test_user# accounts do not contain a .procmailrc file so anything going to this account will be deposited into the Maildir hierarchy which is then accessible via dovecot.

For the support* accounts, they contain the following .procmailrc file:

#Preliminaries
SHELL=/bin/bash
MAILDIR=${HOME}/Maildir
LOGFILE=${HOME}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "
VERBOSE=yes
LOGABSTRACT=all
CURLCFGPATH=/etc/penguin/curl

# The Mail Server API depends on the 'Delivered-To' header value, normalize it
:0fw
| sed -e 's/^Delivered-To:.*$/Delivered-To: support@clubpenguin.com/'

# Each server uses a global lock file so that we can't overload the API

# Post the email to DEV05
:0w:/tmp/.procmail.dev05.lock
* ^To: .*support@dev05web01\.online\.disney\.com.*
| /usr/bin/curl --config "${CURLCFGPATH}/dev05.curl.config"

# Post the email to DEV16
:0w:/tmp/.procmail.dev16.lock
* ^To: .*support@dev16web01\.sandbox\.clubpenguin\.com.*
| /usr/bin/curl --config "${CURLCFGPATH}/dev16.curl.config"

# Post the email to MS03
:0w:/tmp/.procmail.ms03.lock
* ^To: .*support@ms03web01\.sandbox\.clubpenguin\.com.*
| /usr/bin/curl --config "${CURLCFGPATH}/ms03.curl.config"

# Post the email to QA09
:0w:/tmp/.procmail.qa09.lock
* ^To: .*support@qa09web01\.sandbox\.clubpenguin\.com.*
| /usr/bin/curl --config "${CURLCFGPATH}/qa09.curl.config"

# Accept all the rest to the default mailbox
:0:
${DEFAULT}

The curl configuration files contain the following:

silent
fail
header = "Content-Type: message/rfc822"
header = "Accept: application/json"
request = "PUT"
data-binary = "@-"
url = "http://dev05api01.sandbox.clubpenguin.com:8080/cstools/ticket/v1/queue"
basic
user = "client_id:client_secret"