0

Recently decided to move away from google mail services and to establish private mail server. What I came up to was that email sent from one me@example.com to inbox@gmail.com and spam@gmail.com was put in Inbox and Spam folders accordingly.

Problem

Why is the mail distributed to different folders? Does the mail destination folder (*@gmail.com) depends on

  • account settings - I was able to receive mail to Inbox from me@example.com when marked as non-spam in my gmail account ?
  • service settings - some specific requisites for gmail, for example, headers like Received-SPF, DKIM-Signature ?
  • global settings - superclass, other services (yahoo, hotmail, outlook), more/less headers ?

Message

Checked the pass'es in some header fields. That IMHO seems to be fine as well. The respective IP's are hidden.

Delivered-To: spam@gmail.com
Received: by [example.com] with SMTP id s194csp2015594wmd;
        Tue, 16 Jun 2015 03:43:40 -0700 (PDT)
X-Received: by 10.66.154.233 with SMTP id vr9mr57332135pab.124.1434451419946;
        Tue, 16 Jun 2015 03:43:39 -0700 (PDT)
Return-Path: <me@example.com>
Received: from mail.example.com (example.com. [[example.com]])
        by mx.google.com with ESMTP id hf2si854902pbb.140.2015.06.16.03.43.38
        for <spam@gmail.com>;
        Tue, 16 Jun 2015 03:43:39 -0700 (PDT)
Received-SPF: pass (google.com: domain of me@example.com designates [example.com] as permitted sender) client-ip=[example.com];
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of me@example.com designates [example.com] as permitted sender) smtp.mail=me@example.com;
       dkim=pass header.i=@mail.example.com;
       dmarc=pass (p=QUARANTINE dis=NONE) header.from=example.com
Received: from [spam@gmail.com] (unknown [[gmail.com]])
    by mail.example.com (Postfix) with ESMTPSA id 7D2CB12164B
    for <spam@gmail.com>; Tue, 16 Jun 2015 06:43:36 -0400 (EDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.example.com;
    s=default; t=1434451416;
    bh=EmposAsl9Yoxe9cb6dijtNnJsjZ0DuYCuwTZhRF2GXU=;
    h=Date:From:To:Subject:From;
    b=cjR7tpLvJ1JFVPf/ddLM4rpooeo95kFlu3ybHSHW8IK6oOTA1QfKy/Q14U9CojrDL
     IDf9s2fqNIBBAhH81ivwdNQQFo64hw4/rstljealG1lNQRiIl0zUvD3bm8WbC1CfWb
     i3/d8CgiAYkixStNSYEYQhNaUEixWMmznk/bUJJg=
Message-ID: <557FFDD8.2070201@example.com>
Date: Tue, 16 Jun 2015 13:43:36 +0300
From: =?UTF-8?B?TcSBcnRpxYbFoSBFZ2zEq3Rpcw==?= <me@example.com>
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:31.0) Gecko/20100101 Thunderbird/31.7.0
MIME-Version: 1.0
To: spam@gmail.com
Subject: Some test subject
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

This is some message, however the mail is put to Spam folder...

DNS

MX 50 mail.example.com.
TXT @ "v=spf1 a mx ip4:[example.com] -all"
TXT _dmarc "v=DMARC1; p=quarantine; rua=mailto:postmaster@example.com"
TXT default._domainkey.mail "v=DKIM1; k=rsa; p=[some_long_string]"

Outro

Was following an quite nice tutorial and related posts here and here. Also checked DNS setup with public tools - everything was fine.

Update

The same email sent to yahoo was put into Inbox folder...

Community
  • 1
  • 1
sitilge
  • 3,569
  • 4
  • 27
  • 49

1 Answers1

0

The answer to the problem is this line:

TXT _dmarc "v=DMARC1; p=quarantine; rua=mailto:postmaster@example.com"

As stated here the policy can be one of

  • none - the so-called monitor mode
  • quarantine - to treat the message with suspicion according to the receiver capabilities
  • reject - to reject the message outright
sitilge
  • 3,569
  • 4
  • 27
  • 49