Парни Мучаюсь несколько дней! Как решить вопрос: Ситуация такая. Есть VPS находиться за DDos(CloudFlare) почта c VPS уходит через Exim4.
Следовательно В заголовках письма есть Реальный IP VPS. Задача обрезать реальный IP заголовка.
Настроил через Gmail письма уходят, но IP остается в заголовке все равно. (Ведь Это Дыра для Любителей по DDos'ить)
Письмо приходит в таком виде:
как видим строчка в которой и палиться IP VPS
Received: from vps123.ovh.net (XX.ip-XX-XX-XX.eu. [АЙПИ VPS СЕРВЕРА])
Delivered-To: testmail@mail.ru
Return-path: <smtpmail@gmail.com>
Authentication-Results: mxs.mail.ru; spf=pass (mx116.mail.ru: domain of gmail.com designates 209.85.128.196 as permitted sender) smtp.mailfrom=smtpmail@gmail.com smtp.helo=mail-wr0-f196.google.com;
dkim=pass header.d=gmail.com
Received-SPF: pass (mx116.mail.ru: domain of gmail.com designates 209.85.128.196 as permitted sender) client-ip=209.85.128.196; envelope-from=smtpmail@gmail.com; helo=mail-wr0-f196.google.com;
Received: from mail-wr0-f196.google.com ([209.85.128.196]:36636)
by mx116.mail.ru with esmtp (envelope-from <smtpmail@gmail.com>)
id 1diPW7-000224-Hp
for testmail@mail.ru; Thu, 17 Aug 2017 21:27:39 +0300
Received: by mail-wr0-f196.google.com with SMTP id f8so1362459wrf.3
for <testmail@mail.ru>; Thu, 17 Aug 2017 11:27:39 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20161025;
h=from:message-id:date;
bh=MOB46Fgk/Ma4RrQNQQEBhEwKF9tc2aDed5yE1P0w6Ac=;
b=mjK+RRBlz/QihQZ9zF/BKhIepDtKJC8gfgoRNaKwq/Fs5rGSQNm+r3ZGrYoMHlODk6
TCKbE0JPagQ3OrJteHjuhNjDMT/RmXiMPPNGtXEDG12FHgrqv9kCQIgViwWD4mFEs2p4
gqEyJMRoogseR+NdRy9ZKxjKJAFjRG4VFAUFgItLcZ9JIRa8i8057drQVgSvuFIOixmc
bvv9FLej9AEVRyZkCC2dbfv1vMWnGQSu78nbI5GzAuzP+m2YGooQx3piU6P959woM4TC
FDOXk2GHzWl3IR/Bb2UosH3sID3aQgJjDtOcctllSOVjqAqlDpaXq2os0yg+o3M8h6Ez
WAfQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20161025;
h=x-gm-message-state:from:message-id:date;
bh=MOB46Fgk/Ma4RrQNQQEBhEwKF9tc2aDed5yE1P0w6Ac=;
b=BMFIb1wJHhgqp/ate9VXC8NT4BBlhEvkEYBbr/zEq62XgJkJOMZBwcRKf2MHQAV8pv
tcfHqUGOkre3FuPXm9F2apfzrORgECo0eN3kjlClEqo6+v+siZWuoiFdW3phc9PdHbA5
bodC0TRFhL11VtMQTgOhc5pTlRVVHQJSYgPqQ7YJI/HWtFgPsY0l47lBIqrsnYXwyURC
dzddVXq3minDqfVR5Y3PW8N7BSxP+ZWVqCPn4HUYKk7hL2aehUwJ5qTmuYvd2SbLK1mn
VZ/JoPNzhqJdESJ6g6juW2okuKu7MSlLCd9kZypHmJ65jmkytgbFYwVyOSkAP1v7cISp
W7zA==
X-Gm-Message-State: AHYfb5j71nQyx/ocubxT2eO/fwygsIbsKkcMsz6J/XddUvYSPPzWINZN
YsudhIALWc3cohfGJOk=
X-Received: by 10.28.133.129 with SMTP id h123mr1956901wmd.20.1502994458691;
Thu, 17 Aug 2017 11:27:38 -0700 (PDT)
Received: from vps123.ovh.net (XX.ip-XX-XX-XX.eu. [АЙПИ VPS СЕРВЕРА])
by smtp.gmail.com with ESMTPSA id b130sm4500046wme.28.2017.08.17.11.27.37
for <testmail@mail.ru>
(version=TLS1_2 cipher=AES128-SHA bits=128/128);
Thu, 17 Aug 2017 11:27:38 -0700 (PDT)
From: root <smtpmail@gmail.com>
X-Google-Original-From: root <root@mailsender>
Received: from root by vps412901.ovh.net with local (Exim 4.82)
(envelope-from <root@vps412901.ovh.net>)
id 1diPW4-0005aF-8t
for testmail@mail.ru; Thu, 17 Aug 2017 20:27:36 +0200
Message-Id: <E1diPW4-0005aF-8t@vps412901.ovh.net>
Date: Thu, 17 Aug 2017 20:27:36 +0200
X-DMARC-Policy: none
X-DMARC-Result: pass
X-Mras: OK
X-Spam: undefined
Настройки Exim4
/etc/exim4/passwd.client
*.google.com:smtpmail@gmail.com:passwd
update-exim4.conf.conf
dc_eximconfig_configtype='smarthost'
dc_other_hostnames='vps123.ovh.net'
dc_local_interfaces='127.0.0.1 ; ::1'
dc_readhost=''
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.gmail.com::587'
CFILEMODE='644'
dc_use_split_config='true'
dc_hide_mailname='true'
dc_mailname_in_oh='true'
dc_localdelivery='mail_spool'