1

Topic: IP Forwarding header and IPv6 issue

==== Required information ====
- iRedMail version (check /etc/iredmail-release):
- Linux/BSD distribution name and version:
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
- Web server (Apache or Nginx):
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
======== Required information ====
- iRedMail version (check /etc/iredmail-release):
0.9.7
- Linux/BSD distribution name and version:
Ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL):
MySQL
- Web server (Apache or Nginx):
Apache
- Manage mail accounts with iRedAdmin-Pro?
No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Delivered-To: abc@gmail.com
Received: by 10.46.156.217 with SMTP id g25csp2198094ljj;
        Tue, 20 Mar 2018 05:22:01 -0700 (PDT)
X-Google-Smtp-Source: AG47ELt8T03fg1R2o5Z/2b8d8Nfnq6OZJfOKvzuP23oddafLHtZiqkmNuSJmqxr7eaiBG/9Cm7TC
X-Received: by 10.223.176.171 with SMTP id i40mr12118163wra.246.1521548521330;
        Tue, 20 Mar 2018 05:22:01 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1521548521; cv=none;
        d=google.com; s=arc-20160816;
        b=d5OWhTBF4kAnQ9ipEG6racX2ixuE7kmiaOHZBnWODW36Yg/nFHq6IkUEb+MIxV9wCK
         eEdC4EUi4ZsxF6zKYDuxpf/A1ZoC3QHpf1C/0mBfDim+0ctVNQ9RYS2RIhjhkIqZBi02
         kNCDcvTSxIQwPeqoQyJ1V5pzhFnZ0yXq27k/sZuX0oxdnBkwN7q6j3A7oDwpLyPHa+dR
         BrnvuyKQgvhBunLzFyi+1Gslwr6IW+8dDV4DNeSc8zNS7cDc5gNfF4AIk7gNvMxYCDwH
         pliu2WaxuqJYFBF/3nDM6W3wJK9C7zacUmaXFXN0t/9RiuDiSrFZFVp2GABb0YybYEhd
         zBtQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=date:message-id:from:subject:to:mime-version:dkim-signature
         :arc-authentication-results;
        bh=8aBKa3MI9FpJZKOrTm25XkU+em8rlDsbtavR635Za2w=;
        b=VPRUREcBqK4f9Sq8oTl98i4+5Fu6vHYl3EmTDTNZbHx4TTiis3djj/JVfLL33pGoKc
         1b+fvQqqeViM4amHXKyy7xjtJeNAp74icSR83kDGn3dlYA2yuJQYcdsZClmOsrRbvJLa
         vdRFEcJuvw77SjSEmg0OS7fIsHu7VN20C99ZiBxZgjE+67+gHuEX/SZmWQ1F1XGhgIU4
         v57On4wXGUKSYk48B34EJJmzEmflKzSA/BSVMF3GynSxALzu6NachQ9y5AUBvYU9UyfO
         m1bEpn/6GCDD2i0QgfFjYNi/nk8w6D7I0o7K6ZO/+FF2mWs5v8SALXenHVXm41QGO7/O
         Upiw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@themailserver.com header.s=dkim header.b=An5exXoo;
       spf=softfail (google.com: domain of transitioning postmaster@themailserver.com does not designate 2b01:8620:201:20f::67a8 as permitted sender) smtp.mailfrom=postmaster@themailserver.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=themailserver.com
Return-Path: <postmaster@themailserver.com>
Received: from mail.themailserver.com ([2b01:8620:201:20f::67a8])
        by mx.google.com with ESMTPS id n20si1506923wra.303.2018.03.20.05.22.00
        for <abc@gmail.com>
        (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
        Tue, 20 Mar 2018 05:22:01 -0700 (PDT)
Received-SPF: softfail (google.com: domain of transitioning postmaster@themailserver.com does not designate 2b01:8620:201:20f::67a8 as permitted sender) client-ip=2b01:8620:201:20f::67a8;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@themailserver.com header.s=dkim header.b=An5exXoo;
       spf=softfail (google.com: domain of transitioning postmaster@themailserver.com does not designate 2b01:8620:201:20f::67a8 as permitted sender) smtp.mailfrom=postmaster@themailserver.com;
       dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=themailserver.com
Received: from mail.themailserver.com (localhost.localdomain [127.0.0.1]) by mail.themailserver.com (Postfix) with ESMTP id 3378350C020E for <abc@gmail.com>; Tue, 20 Mar 2018 08:17:09 -0400 (EDT)
Authentication-Results: mail.themailserver.com (amavisd-new); dkim=pass (1024-bit key) reason="pass (just generated, assumed good)" header.d=themailserver.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d= themailserver.com; h=from:from:subject:subject:to:mime-version :content-type:content-type; s=dkim; t=1521548229; x=1522412230;
     bh=8aBKa3MI9FpJZKOrTm25XkU+em8rlDsbtavR635Za2w=; b=An5exXooBIzb jHSRS2/HoOlaij1cjNogtGNUXvXW6KtgI7CBV49EU6XQcmZxg7g3/aD3D/9fNM9y JQDPw1QGs6FAtryUhHrZZSZFR0zUR2DH/VtLVx3opi/hux4Ni6NjlmhaOXiEz09S kRKz1Oo0cLNwhyx3xzEYt2NPWAvwXgw=
X-Virus-Scanned: Debian amavisd-new at
Received: from mail.themailserver.com ([127.0.0.1]) by mail.themailserver.com (mail.themailserver.com [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 2yYj1tklKePo for <abc@gmail.com>; Tue, 20 Mar 2018 08:17:09 -0400 (EDT)
Received: from [127.0.1.1] (unknown [91.123.XX.XXX]) by mail.themailserver.com (Postfix) with ESMTPSA id D584350C020D for <abc@gmail.com>; Tue, 20 Mar 2018 08:17:08 -0400 (EDT)
Content-Type: multipart/mixed; boundary="===============0044292903499227953=="
MIME-Version: 1.0
To: abc@gmail.com
Subject: Good morning!
From: Post Master <postmaster@themailserver.com>
Message-Id: <20180320121709.3378350C020E@mail.themailserver.com>
Date: Tue, 20 Mar 2018 08:17:09 -0400 (EDT)

--===============0044292903499227953==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit

now get back to work!
--===============0044292903499227953==--
====
Hello.
I'm having a little issue with my e-mail server, as it forwards CLIENT IP in header (Received: from [127.0.1.1] (unknown [91.123.XX.XXX]) ). What should I do to remove this header from sharing the client IP?

Also, I am having an issue with the IPv6 SPF  (Received-SPF: softfail (google.com: domain of transitioning postmaster@themailserver.com does not designate 2b01:8620:201:20f::67a8 as permitted sender) client-ip=2b01:8620:201:20f::67a8;), also, what should I do in order to get ridd of this softfail?
Thanks!

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: IP Forwarding header and IPv6 issue

1) in postfix, this is handled by  the cleanup process  (    grep -A 2 cleanup /etc/postfix/master.cf  )
http://www.postfix.org/cleanup.8.html
see example  http://www.danpros.com/2014/11/remove-o … smtp-relay
I havn't tried it my self, though

2) Check your SPF settings, and make sure You add all IPV4 and PIV6 addresses to the allowed senders field.
Use https://mxtoolbox.com/SPFRecordGenerator.aspx.com to check the existing value and create a new valid spf text record including ipv4 and ipv6

3

Re: IP Forwarding header and IPv6 issue

example, something like this:
"v=spf1 mx a ip6:2b01:8620:201:20f::67a8  ~all"
# Allow all MX records
# Allow A record listed
# Allow a specific IPV6 address
# Do a Soft Fail

http://www.openspf.org/SPF_Record_Syntax
https://xnode.org/page/SPF_Record_Creator