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

Luxo Nadappan
Tera Guru

Hi peter,

 

We have similar requirement to have multiple SMTP server. We are trying to do in Domain separated environment. Were you able to get any workaround for this ?

 

Thanks

Luxo

Our customer was also looking for  separate SMTP(We have asked them to whitelist spf record for Servicenow ) .Also while checking with HI ,there is no plan to have multiple SMTP Server functionality in their  future pipeline.  Hence I have  created an Idea and  hope  some time soon ,we will get the functionality. 

Thanks

Luxo

Tom Sienkiewicz
Mega Sage

Hi, yeah there are only two solutions here really as far as I am aware:

1) Use your own SMTP server for outbound emails, where you can do additional logic to e.g. use multiple mailboxes or email addresses. But this would be a potential nightmare to manage and is not far from solution 2:

2) Have a configuration where you spoof the "From" and "Reply-To" attributes (this can be done OOB on notification or entire platform level but you can customize this with a BR on sys_email). The problem here as people have mentioned is that SPF filters will pick it up and in most of the cases, the emails will end up in limbo.

Funnily, I have tested this with multiple banks and some banks did allow the emails to go through. Shame. But I would not rely on this 😉 So effectively each domain that you spoof needs to whitelist ServiceNow's SPF records (Very unlikely) or email IP ranges (a lot of bickering but generally I've managed to convince clients to do that).

This is what we used for an MSP solution involving Domain Separation.There were dedicated mailboxes per domain that we spoofed. It works as long as clients are willing to whitelist. Unfortunately SN does not support DMARC or DKIM at the moment either which makes it a gamble.

Hope that helps if anyone is still looking for info.

Hi there,

I tried spoofing and the email is going out with the changed 'from' address from ServiceNow. But the problem with this case is we do not get the bounced back emails in case the email is wrong back in ServiceNow. Is there a work around where we can change the from address and still get a bounce back ingested in ServiceNow?

Thanks

 

Hi, for any responses to emails I think there are 2 options generally:

1. set the Reply-To header of the outbound email to be pointing directly at the ServiceNow instance email address (but then Users will see that when they go to reply to the email - this might or might not be an issue, depending on the requirements).

2. set the Reply-To header for an existing custom mailbox and set up a redirect of all (or selected) emails from that mailbox back to ServiceNow. Important that it is not a forward, but a redirect, not changing the original email headers.

I mostly opted for option 2 with my clients (usually they would set up e.g. mailbox XYZ@company.com and that email was used both to spoof the FROM atribute and to set the Reply-To), as this gives a nice control over which emails should be redirected back to the instance etc.