How to have multiple SMTP servers in ServiceNow? (Workaround)

peterraeves
Mega Guru
I know the straightforward answer is "You cannot. You can have multiple POP/IMAP accounts, but only a single SMTP account". Though, what is the workaround, since the customers really requires it.
 
 
The approach I have been thinking is to create Java code that uses libraries to build MimeMessages and transport them to the customer's mail server. Then to deploy this code on the Mid Server. Events could then fill up the ECC Queue to trigger this Java code running on the MID Server.
 
Though, before I start with this implementation, I was wondering if there was a better approach? Or if someone has already done something similar, since I cannot imagine our customer is the first to have such a requirement?
15 REPLIES 15

Thanks for the reply, the Reply-To field only gets a response from the recipient when the email was delivered in first place and then they reply back to that email.

In our case, if we change the from address and email is wrong, we don't seem to get back the failed email notification in ServiceNow email logs. I think the failed email goes back to the from address and this only works if we use the default email for ServiceNow instance.

Still thinking of a way to get those failed emails back in ServiceNow if we change the from email.

This is how it looks like in ServiceNow logs if we send it from ServiceNow default email to an invalid email:

find_real_file.png

Well I've never tried spoofing a non-existent mailbox TBH. The way I set it up usually is that there is a dedicated mailbox created in the client's domain. Then the client adds ServiceNow SPF records/IPs to whitelist to allow spoofing of that mailbox.

Then this mailbox is set in both the FROM and Reply-To headers. A redirect is set up on that mailbox to route any incoming emails back to ServiceNow.

I'm pretty sure that way my clients were getting all sorts of out-of-office or mailred-daemon replies back to ServiceNow.

Thanks, this is working with a personal mail, but mailred-daemon is not getting back on a corporate mailbox. Do we need to contact ServiceNow for SPF records/IPs to be whitelisted to allow spoofing of that mailbox?

You will find this information in your HI Account. But generally, for SPF records:

a.spf.service-now.com - Canada​

c.spf.service-now.com – US & Europe​

d.spf.service-now.com – other data centers​

The alternative is to whitelist individual IPs (note those can change without a warning though, SPF is more "general" thus stable but some companies have issues with this kind of whitelisting).

To get the IPs either go to HI or run the nslookup command for the specific SPF, e.g.

nslookup c.spf.service-now.com.

This will give you several different IPs, you have to whitelist them all.

For anyone who might come upon this thread in the future, I had a similar requirement where mail had to be sent from two different domains that did not share the same smtp server.  I ended up using solution #1 above by setting up Amazon SES.  This is, of course, a paid service, however mail is delivered cleanly and without spoofing or any shenanigans.