Missing some inbound email headers
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2014 08:29 AM
Hi Folks,
We are working on inbound email processing and we need to parse some information from the inbound email headers. I have discovered that some of the email headers that I need are not present. Specifically, I am looking for the "Received:" headers. Typically, there will be one of these headers for each server that the message passed though on it's way to it's destination.
Received: from uni00mi.unity.ncsu.edu (uni00mi.unity.ncsu.edu. [152.1.2.224])
by mx.google.com with ESMTP id w138si1625903ykb.37.2014.10.28.08.05.24
for <servicenow-postmaster@ncsu.edu>;
Tue, 28 Oct 2014 08:05:24 -0700 (PDT)
Received: from psmtp.com (na3sys009amx244.postini.com [74.125.149.8])
by uni00mi.unity.ncsu.edu (8.14.4/8.14.4/Nv6.2010.0805) with ESMTP id s9SF5M3e022661
for <servicenow-postmaster@ncsu.edu>; Tue, 28 Oct 2014 11:05:23 -0400 (EDT)
Received: from na3sys009aog101.obsmtp.com ([74.125.149.67]) (using TLSv1) by na3sys009amx244.postini.com ([74.125.148.10]) with SMTP;
Tue, 28 Oct 2014 15:05:23 GMT
Received: from uni01mo.unity.ncsu.edu ([152.1.225.228]) (using TLSv1) by na3sys009aob101.postini.com ([74.125.148.12]) with SMTP
ID DSNKVE+wstUsJ6w8aUsHJljxsRRfMfcCvRrL@postini.com; Tue, 28 Oct 2014 08:05:23 PDT
Received: from ars00srv.unity.ncsu.edu (ars00srv.unity.ncsu.edu [152.1.227.134])
by uni01mo.unity.ncsu.edu (8.14.4/8.14.4/Nv6.2010.0805) with ESMTP id s9SF5LeE013964
for <servicenow-postmaster@ncsu.edu>; Tue, 28 Oct 2014 11:05:21 -0400 (EDT)
Received: from uni01mi.unity.ncsu.edu (uni01mi.unity.ncsu.edu [152.1.225.224])
by ars00srv.unity.ncsu.edu (8.14.4+Sun/8.14.4/Nv6.2010.0805) with ESMTP id s9SF5L8u015289
for <test@help.ncsu.edu>; Tue, 28 Oct 2014 11:05:21 -0400 (EDT)
Received: from psmtp.com (na3sys009amx217.postini.com [74.125.149.57])
by uni01mi.unity.ncsu.edu (8.14.4/8.14.4/Nv6.2010.0805) with ESMTP id s9SF5KFQ011929
for <test@help.ncsu.edu>; Tue, 28 Oct 2014 11:05:21 -0400 (EDT)
Unfortunately, the header I need (specifically, the one in bold) is not included in the headers by the time my script gets them.
Is there any way to control which headers from the original inbound message make it into the headers that are accessible from within a script? I am using the Postmaster app to do this processing.
Thanks for any insights.
Larry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2014 10:01 AM
Well, that certainly explains why you are not getting them in the email.headers variable. You may want to talk to your email team to see if this is correct (determine the real email routing between your host and your SNC instance), and if there should be more than one received machine in there, you may need to work with ServiceNow to determine where the missing Received lines are ending up.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 02:33 AM
Hi Larry
not really needed to look at the headers too much, except for the In Reply.
Most of our emails only have a single Received entry as our instance reads off the same o365 instance and probably 95% of our emails are internal.
However, looking at an email from one of our partners, and I can see the headers all look good and multiple Received entries are there
(we are on Calgary incase there are differences between versions)
Return-Path:<xxxxxx@yyyyyy.net>
DomainKey-Status:non-participant from=xxxxxx@yyyyyy.net;
domainkeys=fail
Received-SPF:Pass client-ip=173.203.187.69; envelope-from=xxxxxx@yyyyyy.net; helo=smtp69.iad3a.emailsrvr.com; identity=mailfrom
Received:from smtp69.iad3a.emailsrvr.com ([222.222.222.222]) by aaaa.bb.cc ([111.111.111.111] running VPOP3) with ESMTP for <service-now@aaaa.bb.cc>; Mon, 27 Oct 2014 15:50:51 -0000
Received:from localhost (localhost.localdomain [127.0.0.1]) by
smtp9.relay.iad3a.emailsrvr.com (SMTP Server) with ESMTP id
24E3F380890 for <service-now@aaaa.bb.cc>; Mon, 27 Oct 2014 11:50:46
-0400 (EDT)
X-Virus-Scanned:OK
Received:from app33.wa-webapps.iad3a (relay-webapps.rsapps.net
[333.333.333.333]) by smtp9.relay.iad3a.emailsrvr.com (SMTP Server)
with ESMTP id 0E74A3808B8 for <service-now@aaaa.bb.cc>; Mon, 27 Oct
2014 11:50:46 -0400 (EDT)
X-Sender-Id:xxxxxx@yyyyyy.net
Received:from app33.wa-webapps.iad3a (relay-webapps.rsapps.net
[333.333.333.333]) by 0.0.0.0:25 (trex/5.3.2); Mon, 27 Oct 2014
15:50:46 GMT
Received:from yyyyyy.net (localhost.localdomain [127.0.0.1]) by
app33.wa-webapps.iad3a (Postfix) with ESMTP id F1A2080056 for
<service-now@aaaa.bb.cc>; Mon, 27 Oct 2014 11:50:45 -0400 (EDT)
Received:by webmail.emailsrvr.com (Authenticated sender:
xxxxxx@yyyyyy.net, from: xxxxxx@yyyyyy.net) with HTTP;
Mon, 27 Oct 2014 11:50:45 -0400 (EDT)
Date:Mon, 27 Oct 2014 11:50:45 -0400 (EDT)
Subject:=?utf-8?Q?Notification=3A_Order_5-_Upgrade_=2F_Port_Your_Device_=28Replac?=
=?utf-8?Q?ement=3AStolen=29?=
From:xxxxxx@yyyyyy.net
MIME-Version:1.0
Content-Type:text/plain;charset=UTF-8
Content-Transfer-Encoding:quoted-printable
Importance:Normal
X-Priority:3 (Normal)
X-Type:plain
In-Reply-To:<1414424712.849132322@webmail.gsgtelco.com>
References:<1414424628.483520686@webmail.gsgtelco.com>
<1414424712.849132322@webmail.gsgtelco.com>
X-Auth-ID:xxxxxx@yyyyyy.net
Message-ID:<1414425045.987818486@webmail.gsgtelco.com>
X-Mailer:webmail7.0
X-VPOP3-ORIGRCPT:service-now@aaaa.bb.cc
X-VPOP3-RCPTTYPE:D
X-VPOP3-WL:NotFound 'xxxxxx@yyyyyy.net';
X-VPOP3-SpamBayes:0
X-VPOP3-Spam:20 - BadRelays(10.0) ShortMessage(10.0)
X-VPOP3-Spam2:added bayes ham
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 05:06 AM
Hi Julian,
We are on Eureka, not sure if that matters. We collect the incoming email in a Gmail account and our ServiceNow system POPs the email from there. When I look at an inbound message from within the Gmail account, I see all of the expected headers as shown above. However, when the same message arrives in ServiceNow, the "Received: " headers are all gone. So it certainly appears as though ServiceNow is stripping the headers out on the way in.
Thanks.
Larry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-29-2014 05:32 AM
I have collected off another external server and they are there.
I will look and see if I can hook into a test gmail later.
are you connecting via POP or IMAP (not that I think that should make any difference)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2015 02:36 PM
Hi Larry,
We've seen the same behaviour you are reporting. It looks like you get one header per header string (so one Received:, but the rest are stripped). Got a bug report into HI about it -- it was assigned PRB608293 . Still waiting for a fix, though.