Google Mail forwarding rewrites To, For and Delivered-To headers

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Google Mail forwarding rewrites To, For and Delivered-To headers

Pau Peris
Hi,

i have a private server which handles email messages for different domains - ie, example.com, mydomain.es - through Postfix. For domain mydomain.es i'm already using Google Apps to handle the email. I use both systems to handle the email for domain mydomain.es because i have some web apps installed on the server which needs to send email messages on behalf mydomain.es and as i already i had a Postfix mail server working i decided to set it up on my MTA system.

The issue i'm looking to solve is related to Google Mail forwarding system. Some days ago i enabled automatic email forwarding for [hidden email] so ti forwards email to [hidden email] but when it gets Postfix on the server i gets rejected due to the following message:

postfix/smtpd[5945]: NOQUEUE: reject: RCPT from mail-ot0-x22d.google.com[2607:f8b0:4003:c0f::22d]: 550 5.1.0 <foo+caf_=bar=[hidden email]>: Sender address rejected: User unknown; from=<pau+caf_=dmarc=[hidden email]> to=<[hidden email]> proto=ESMTP helo=<mail-ot0-x22d.google.com>

I don't know why Google does this rewriting but i would like to know what could i do in order to solve this issue.

These are the original headers:

Delivered-To: foo+caf_=bar=[hidden email]
Received: by 10.157.7.81 with SMTP id 75csp4162688ote;
        Wed, 29 Nov 2017 02:36:22 -0800 (PST)
X-Received: by 10.157.92.197 with SMTP id r5mr1920889oti.286.1511951782640;
        Wed, 29 Nov 2017 02:36:22 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1511951782; cv=none;
        d=google.com; s=arc-20160816;
        b=iRH6MZeu7Cm7aUGgPwgqJd+e5T4ijzeY/1IyUha8x/Aj9GSkx8jU/x3Ym6GRR526Zk
         TP+JN3MY6tp38C7tubTUJPa3xRoeUCEt09g44egcjVfMHbTST0AZG86TvqNXzLSVC+0P
         oTOh3ab1COe1GA2DLeaB24QtO3llLYiFZ83OViBMDGVaDr9Vlhp61HZoanND6oziruMb
         QPrPGcejFEgX8oryU8nA6jUrkSHVXFQpwaPok+tNRk4SQuMMAvAX5umF2qO6i6MiDkOa
         634L4nh/24a1+4FP/+sP/mbyjEk3X51gsoXGLmuv9SK/lXSmkvFERd1+n3Oh2cRlUMOK
         DDfw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=date:message-id:in-reply-to:references:subject:auto-submitted:to
         :from:dkim-signature:arc-authentication-results;
        bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
        b=l+WZtBnktn4eI0hTjbom0Oa7tbsyfF8QkIX5TWB7AjuUHnIlG2rzBL88wkrtnOVPpe
         BSmFQvRgXnxlZpsXOg4uzzyaMX8mk2Xw6Nih78oH10OFrZqrkr3ymX9dknWnXCv6KVM+
         cqBc+MzdUsxw8gvVnOFnarO6rWM4kv+JAuabF6MQwvvHlRKOLrb9Wi4kE+t8UzU+kee2
         V+0Gfs6Kzf4dl37tNwQhgcTHN5xcTalrQ6eDN8IpiPwV//o8jX8Jwqc8p7LTL7bjH8d6
         VtMFVZkZGutZndsJl4Yw6QmiO/YUsQaV3AfuzLsxkEHlYUPB1W8GZbuIMQb/u5msimTW
         hNEw==
ARC-Authentication-Results: i=1; mx.google.com;
       dkim=pass header.i=@googlemail.com header.s=20161025 header.b=tcyPoStR;
       spf=pass (google.com: best guess record for domain of [hidden email] designates 209.85.220.69 as permitted sender) smtp.helo=mail-sor-f69.google.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com
Return-Path: <>
Received: from mail-sor-f69.google.com (mail-sor-f69.google.com. [209.85.220.69])
        by mx.google.com with SMTPS id i17sor505691otc.135.2017.11.29.02.36.22
        for <foo+caf_=bar=[hidden email]>
        (Google Transport Security);
        Wed, 29 Nov 2017 02:36:22 -0800 (PST)
Received-SPF: pass (google.com: best guess record for domain of [hidden email] designates 209.85.220.69 as permitted sender) client-ip=209.85.220.69;
Authentication-Results: mx.google.com;
       dkim=pass header.i=@googlemail.com header.s=20161025 header.b=tcyPoStR;
       spf=pass (google.com: best guess record for domain of [hidden email] designates 209.85.220.69 as permitted sender) smtp.helo=mail-sor-f69.google.com;
       dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=googlemail.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=googlemail.com; s=20161025;
        h=from:to:auto-submitted:subject:references:in-reply-to:message-id
         :date;
        bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
        b=tcyPoStRP7CyZ8hS+BqK8TN2R+MJGyzb+BcRwA6sWe16O0lVth0vHROn8RHQGmLVQF
         fDTy2mRT1WGTMXFrzv7mEq4iJDsNo/JG0rtmYZm2KlhKrKFLmVVJyGm4MFskHSVz4JGY
         fP3Jlc33HZ5JKAsBINmgwAjMsxo4VJxKWRqBpprl+jK/78n8gD14u8WUW82MwoIdcXZY
         NQhUxnjHzp73r4KalOqSbQTxhHKoRbAWJkG39e7685ewOGagYAXBn1yNE/LW1QLqC8AP
         A3CtsC42OM+HariU25Nh5djY9kNjResOUxHfZ4hyoMBvWplIBaN5Ak1UE8tc6kTiVzUJ
         l9NQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-gm-message-state:from:to:auto-submitted:subject:references
         :in-reply-to:message-id:date;
        bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
        b=PGtpO1Yy75ok/k39/aaNrfJm5Aq8roycBntbnnE/WlrVSPoKgo0NhN7cqBjzeU2Ke7
         60yneA4HWVwyrHl1y+Tpgg7d98ZC51g1wcwjiTgOyi6YkAInwrI1540HGPNPzQrL1ddG
         pJ5/Hx21mcpHEcGUerWYDqPa2HOtm0WKjlxe+fn68QbGTdzMDlnEhu8zN7j6a7ub2Xmw
         vHqOwHYuhVL4FhUOb/ONZx6L8b96IlvURiwpIDWi69ybtx7oXEBtaABXzeDIpU4zKzhf
         90qybECA/NsuqgdLqTGiRpmKAZ18N0sjknUQ9iVm0hNHtGiuKQOcTTkhck0WeuO2cj1r
         JA2w==
X-Gm-Message-State: AJaThX4b2lenay3D0PrrlDomryFfWa9ySXcnG62iKWyDkQVQVJ430hjx Y8rjha0cPPez3qHvd24KZGegCf3gASODO4QCnpIMVw==
X-Google-Smtp-Source: AGs4zMb/6o/h1hSBtPS+Igrtd+pa5pekIhxmNQC9b02vzMz6BLvppxdIXQ3RFCC+imq2/ZrQ3YDPPITqOdOfXyKxUxb2XSj/Ar2dFtw=
X-Received: by 10.157.15.154 with SMTP id d26mr1695860otd.334.1511951782499;
        Wed, 29 Nov 2017 02:36:22 -0800 (PST)
Content-Type: multipart/report; boundary="001a113cf206e9cb46055f1cb476"; report-type=delivery-status
Return-Path: <>
Received: by 10.157.15.154 with SMTP id d26mr1786241otd.334; Wed, 29 Nov 2017 02:36:22 -0800 (PST)
From: Mail Delivery Subsystem <[hidden email]>
To: foo+caf_=bar=[hidden email]
Auto-Submitted: auto-replied
Subject: Delivery Status Notification (Failure)
References: <[hidden email]>
In-Reply-To: <[hidden email]>
X-Failed-Recipients: [hidden email]
Message-ID: <[hidden email]>
Date: Wed, 29 Nov 2017 02:36:22 -0800 (PST)



Thanks for your time :)
Reply | Threaded
Open this post in threaded view
|

Re: Google Mail forwarding rewrites To, For and Delivered-To headers

Pau Peris
Hi,

i understand that's how they work and i can not do anything change it, but which approach could i follow in order to workaround that issue?

Thank Boris,

On Wed, Nov 29, 2017 at 5:27 PM, Boris Behrens <[hidden email]> wrote:
You can't :-)
That's how google apps work. I began to send mail over an own relay if
it needs to be exact like I want.

On Wed, Nov 29, 2017 at 05:10:55PM +0100, Pau Peris wrote:
> Hi,
>
> i have a private server which handles email messages for different domains
> - ie, example.com, mydomain.es - through Postfix. For domain mydomain.es
> i'm already using Google Apps to handle the email. I use both systems to
> handle the email for domain mydomain.es because i have some web apps
> installed on the server which needs to send email messages on behalf
> mydomain.es and as i already i had a Postfix mail server working i decided
> to set it up on my MTA system.
>
> The issue i'm looking to solve is related to Google Mail forwarding system.
> Some days ago i enabled automatic email forwarding for [hidden email] so
> ti forwards email to [hidden email] but when it gets Postfix on the server
> i gets rejected due to the following message:
>
> postfix/smtpd[5945]: NOQUEUE: reject: RCPT from
> mail-ot0-x22d.google.com[2607:f8b0:4003:c0f::22d]:
> 550 5.1.0 *<foo+caf_=bar=[hidden email] <[hidden email]>>*:
> Sender address rejected: User unknown; from=<pau+caf_=dmarc=
> [hidden email]> to=<[hidden email]> proto=ESMTP helo=<
> mail-ot0-x22d.google.com>
>
> I don't know why Google does this rewriting but i would like to know what
> could i do in order to solve this issue.
>
> These are the original headers:
>
> Delivered-To: foo+caf_=bar=[hidden email]
> Received: by 10.157.7.81 with SMTP id 75csp4162688ote;
>         Wed, 29 Nov 2017 02:36:22 -0800 (PST)
> X-Received: by 10.157.92.197 with SMTP id r5mr1920889oti.286.1511951782640;
>         Wed, 29 Nov 2017 02:36:22 -0800 (PST)
> ARC-Seal: i=1; a=rsa-sha256; t=1511951782; cv=none;
>         d=google.com; s=arc-20160816;
>         b=iRH6MZeu7Cm7aUGgPwgqJd+e5T4ijzeY/1IyUha8x/Aj9GSkx8jU/x3Ym6GRR526Zk
>
>  TP+JN3MY6tp38C7tubTUJPa3xRoeUCEt09g44egcjVfMHbTST0AZG86TvqNXzLSVC+0P
>
>  oTOh3ab1COe1GA2DLeaB24QtO3llLYiFZ83OViBMDGVaDr9Vlhp61HZoanND6oziruMb
>
>  QPrPGcejFEgX8oryU8nA6jUrkSHVXFQpwaPok+tNRk4SQuMMAvAX5umF2qO6i6MiDkOa
>
>  634L4nh/24a1+4FP/+sP/mbyjEk3X51gsoXGLmuv9SK/lXSmkvFERd1+n3Oh2cRlUMOK
>          DDfw==
> ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
> s=arc-20160816;
>         h=date:message-id:in-reply-to:references:subject:auto-submitted:to
>          :from:dkim-signature:arc-authentication-results;
>         bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
>         b=l+WZtBnktn4eI0hTjbom0Oa7tbsyfF8QkIX5TWB7AjuUHnIlG2rzBL88wkrtnOVPpe
>
>  BSmFQvRgXnxlZpsXOg4uzzyaMX8mk2Xw6Nih78oH10OFrZqrkr3ymX9dknWnXCv6KVM+
>
>  cqBc+MzdUsxw8gvVnOFnarO6rWM4kv+JAuabF6MQwvvHlRKOLrb9Wi4kE+t8UzU+kee2
>
>  V+0Gfs6Kzf4dl37tNwQhgcTHN5xcTalrQ6eDN8IpiPwV//o8jX8Jwqc8p7LTL7bjH8d6
>
>  VtMFVZkZGutZndsJl4Yw6QmiO/YUsQaV3AfuzLsxkEHlYUPB1W8GZbuIMQb/u5msimTW
>          hNEw==
> ARC-Authentication-Results: i=1; mx.google.com;
>        dkim=pass header.i=@googlemail.com header.s=20161025
> header.b=tcyPoStR;
>        spf=pass (google.com: best guess record for domain of
> [hidden email] designates <a href="tel:209.85.220.69" value="+12098522069">209.85.220.69 as permitted
> sender) smtp.helo=mail-sor-f69.google.com;
>        dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=
> googlemail.com
> Return-Path: <>
> Received: from mail-sor-f69.google.com (mail-sor-f69.google.com.
> <a href="tel:%5B209.85.220.69" value="+12098522069">[209.85.220.69])
>         by mx.google.com with SMTPS id
> i17sor505691otc.135.2017.11.29.02.36.22
>         for <foo+caf_=bar=[hidden email]>
>         (Google Transport Security);
>         Wed, 29 Nov 2017 02:36:22 -0800 (PST)
> Received-SPF: pass (google.com: best guess record for domain of
> [hidden email] designates <a href="tel:209.85.220.69" value="+12098522069">209.85.220.69 as permitted
> sender) client-ip=<a href="tel:209.85.220.69" value="+12098522069">209.85.220.69;
> Authentication-Results: mx.google.com;
>        dkim=pass header.i=@googlemail.com header.s=20161025
> header.b=tcyPoStR;
>        spf=pass (google.com: best guess record for domain of
> [hidden email] designates <a href="tel:209.85.220.69" value="+12098522069">209.85.220.69 as permitted
> sender) smtp.helo=mail-sor-f69.google.com;
>        dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=
> googlemail.com
> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
>         d=googlemail.com; s=20161025;
>         h=from:to:auto-submitted:subject:references:in-reply-to:message-id
>          :date;
>         bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
>         b=tcyPoStRP7CyZ8hS+BqK8TN2R+MJGyzb+BcRwA6sWe16O0lVth0vHROn8RHQGmLVQF
>
>  fDTy2mRT1WGTMXFrzv7mEq4iJDsNo/JG0rtmYZm2KlhKrKFLmVVJyGm4MFskHSVz4JGY
>
>  fP3Jlc33HZ5JKAsBINmgwAjMsxo4VJxKWRqBpprl+jK/78n8gD14u8WUW82MwoIdcXZY
>
>  NQhUxnjHzp73r4KalOqSbQTxhHKoRbAWJkG39e7685ewOGagYAXBn1yNE/LW1QLqC8AP
>
>  A3CtsC42OM+HariU25Nh5djY9kNjResOUxHfZ4hyoMBvWplIBaN5Ak1UE8tc6kTiVzUJ
>          l9NQ==
> X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
>         d=1e100.net; s=20161025;
>         h=x-gm-message-state:from:to:auto-submitted:subject:references
>          :in-reply-to:message-id:date;
>         bh=XLvWlJgtropuAWVgL4T11D77Kxt40EfUM+DfSKy1y90=;
>         b=PGtpO1Yy75ok/k39/aaNrfJm5Aq8roycBntbnnE/WlrVSPoKgo0NhN7cqBjzeU2Ke7
>
>  60yneA4HWVwyrHl1y+Tpgg7d98ZC51g1wcwjiTgOyi6YkAInwrI1540HGPNPzQrL1ddG
>
>  pJ5/Hx21mcpHEcGUerWYDqPa2HOtm0WKjlxe+fn68QbGTdzMDlnEhu8zN7j6a7ub2Xmw
>
>  vHqOwHYuhVL4FhUOb/ONZx6L8b96IlvURiwpIDWi69ybtx7oXEBtaABXzeDIpU4zKzhf
>
>  90qybECA/NsuqgdLqTGiRpmKAZ18N0sjknUQ9iVm0hNHtGiuKQOcTTkhck0WeuO2cj1r
>          JA2w==
> X-Gm-Message-State:
> AJaThX4b2lenay3D0PrrlDomryFfWa9ySXcnG62iKWyDkQVQVJ430hjx
> Y8rjha0cPPez3qHvd24KZGegCf3gASODO4QCnpIMVw==
> X-Google-Smtp-Source:
> AGs4zMb/6o/h1hSBtPS+Igrtd+pa5pekIhxmNQC9b02vzMz6BLvppxdIXQ3RFCC+imq2/ZrQ3YDPPITqOdOfXyKxUxb2XSj/Ar2dFtw=
> X-Received: by 10.157.15.154 with SMTP id d26mr1695860otd.334.1511951782499;
>         Wed, 29 Nov 2017 02:36:22 -0800 (PST)
> Content-Type: multipart/report; boundary="001a113cf206e9cb46055f1cb476";
> report-type=delivery-status
> Return-Path: <>
> Received: by 10.157.15.154 with SMTP id d26mr1786241otd.334; Wed, 29 Nov
> 2017 02:36:22 -0800 (PST)
> From: Mail Delivery Subsystem <[hidden email]>
> To: foo+caf_=bar=[hidden email]
> Auto-Submitted: auto-replied
> Subject: Delivery Status Notification (Failure)
> References: <[hidden email]>
> In-Reply-To: <[hidden email]>
> X-Failed-Recipients: [hidden email]
> Message-ID: <[hidden email]>
> Date: Wed, 29 Nov 2017 02:36:22 -0800 (PST)
>
>
>
> Thanks for your time :)