SparkPost/gosparkpost

workaround for servername/cert mismatches

yargevad opened this issue · 2 comments

provide a way for testing tools (fblgen, oobgen) to manually specify the servername for tls connections

Example cert issue when talking to SparkPost EU

2018/04/11 20:24:09 Got domain [email-eu.thetucks.com] from Return-Path
2018/04/11 20:24:09 Got MX [smtp.eu.sparkpostmail.com.] for [email-eu.thetucks.com]
2018/04/11 20:24:09 Sending OOB from [<test@email-eu.thetucks.com>] to [msprvs1=17639-QZ5WTD9=bounces-37@email-eu.thetucks.com] via [smtp.eu.sparkpostmail.com.:smtp]...
2018/04/11 20:24:09 x509: certificate is valid for *.sparkpostmail.com, sparkpostmail.com, not smtp.eu.sparkpostmail.com.

$ fblgen --file mail-eu.txt --verbose --send
2018/04/11 20:24:15 Got domain [email-eu.thetucks.com] from Return-Path
2018/04/11 20:24:15 Got MX [smtp.eu.sparkpostmail.com.] for [email-eu.thetucks.com]
2018/04/11 20:24:15 Sending FBL from [fakespark+36014955978770181028@clicky-sink.trymsys.net] to [fbl@email-eu.thetucks.com] via [smtp.eu.sparkpostmail.com.:smtp]...
2018/04/11 20:24:15 x509: certificate is valid for *.sparkpostmail.com, sparkpostmail.com, not smtp.eu.sparkpostmail.com.```

Working on this here