Lutuh
New Pleskian
Hi all,
this question is about the Mail Handlers feature in Plesk 12.5 for Linux (https://docs.plesk.com/en-US/12.5/extensions-guide/mail-handlers.71844/). I'm using Postfix.
For an incoming email, I would like to get the sender IP address that can be found in the "Received" header, e.g.
Received: from somedomain.com (ec2-53-129-25-139.compute-1.amazonaws.com [53.129.25.139])
by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id fO-7wrjmSeqrZAzFoOXgbg
for <[email protected]>; Mon, 24 Oct 2016 07:05:22.959 +0000 (UTC)
I've added a before-queue mail handler to Plesk and when looking at the email message that this handler receives via stdin, this header is missing. The message looks like this:
Subject: Test
Message-Id: <[email protected]>
Mon, 24 Oct 2016 07:05:22.959 +0000 (UTC)
From: [email protected]
<Message here>
My guess is that since this mail handler is pre-queue, there won't be any "Received" header until the message is being queued. So I went and registered a before-local handler, but this one does not even get called, so no "Received" header there, either.
Thank you for any ideas or suggestions you might have on this topic. I know it has to work somehow because the onboard "SPF" mail handler has to be able to access the sender IP as well in order to function at all.
Cheers,
Lucas
this question is about the Mail Handlers feature in Plesk 12.5 for Linux (https://docs.plesk.com/en-US/12.5/extensions-guide/mail-handlers.71844/). I'm using Postfix.
For an incoming email, I would like to get the sender IP address that can be found in the "Received" header, e.g.
Received: from somedomain.com (ec2-53-129-25-139.compute-1.amazonaws.com [53.129.25.139])
by ismtpd0002p1iad1.sendgrid.net (SG) with ESMTP id fO-7wrjmSeqrZAzFoOXgbg
for <[email protected]>; Mon, 24 Oct 2016 07:05:22.959 +0000 (UTC)
I've added a before-queue mail handler to Plesk and when looking at the email message that this handler receives via stdin, this header is missing. The message looks like this:
Subject: Test
Message-Id: <[email protected]>
Mon, 24 Oct 2016 07:05:22.959 +0000 (UTC)
From: [email protected]
<Message here>
My guess is that since this mail handler is pre-queue, there won't be any "Received" header until the message is being queued. So I went and registered a before-local handler, but this one does not even get called, so no "Received" header there, either.
Thank you for any ideas or suggestions you might have on this topic. I know it has to work somehow because the onboard "SPF" mail handler has to be able to access the sender IP as well in order to function at all.
Cheers,
Lucas