Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I have a personal VPS that I use as a personal email and web server. Today I was diagnosing email, and I created a test account at Gmail. At first I was not implemented DomainKey and only SPF was available. I sent an email from my server, and it landed in inbox folder. this is the message:

Delivered-To: measqwrety2@gmail.com  
Received: by 10.49.109.169 with SMTP id ht9csp256915qeb;  
    Thu, 10 Oct 2013 08:27:14 -0700 (PDT)  
X-Received: by 10.60.42.168 with SMTP id p8mr617741oel.73.1381418834422;  
    Thu, 10 Oct 2013 08:27:14 -0700 (PDT)  
Return-Path: <soroosh@azary.ir>  
Received: from azary.ir (azary.ir. [198.23.143.195])  
    by mx.google.com with ESMTP id t30si17805783yhb.274.1969.12.31.16.00.00;  
    Thu, 10 Oct 2013 08:27:14 -0700 (PDT)  
Received-SPF: pass (google.com: domain of soroosh@azary.ir designates 198.23.143.195 as permitted sender) client-ip=198.23.143.195;  
Authentication-Results: mx.google.com;  
   spf=pass (google.com: domain of soroosh@azary.ir designates 198.23.143.195 as permitted sender) smtp.mail=soroosh@azary.ir  
Received: from azary.ir (localhost [127.0.0.1])  
by azary.ir (Postfix) with ESMTPA id F06AF141077  
for <measqwrety2@gmail.com>; Thu, 10 Oct 2013 18:57:12 +0330 (IRST)  
MIME-Version: 1.0  
Content-Type: text/plain; charset=UTF-8;  
 format=flowed  
Content-Transfer-Encoding: 7bit  
Date: Thu, 10 Oct 2013 18:57:12 +0330  
From: "soroosh.azary" <soroosh@azary.ir>  
To: measqwrety2@gmail.com  
Subject: test15  
Message-ID: <a6bbd9be2cbce7254c9a938417529640@azary.ir>  
X-Sender: soroosh@azary.ir  
User-Agent: Roundcube Webmail/0.9.4  

;aslfj ;lsakjf ;asj;fdlkj    

And then I realized that I have not enabled DomainKey in my server. After enabling it, I again sent an email to the same account, but this time it landed in spam folder. This is the message:

Delivered-To: measqwrety2@gmail.com  
Received: by 10.49.109.169 with SMTP id ht9csp260477qeb;  
        Thu, 10 Oct 2013 09:33:48 -0700 (PDT)  
X-Received: by 10.182.66.164 with SMTP id g4mr1837295obt.47.1381422827879;  
        Thu, 10 Oct 2013 09:33:47 -0700 (PDT)  
Return-Path: <soroosh@azary.ir>  
Received: from azary.ir (azary.ir. [198.23.143.195])
        by mx.google.com with ESMTP id z44si17956142yhn.218.1969.12.31.16.00.00;
        Thu, 10 Oct 2013 09:33:47 -0700 (PDT)
Received-SPF: pass (google.com: domain of soroosh@azary.ir designates 198.23.143.195 as permitted sender) client-ip=198.23.143.195;
Authentication-Results: mx.google.com;
       spf=pass (google.com: domain of soroosh@azary.ir designates 198.23.143.195 as permitted sender) smtp.mail=soroosh@azary.ir;
       dkim=pass header.i=@azary.ir
Received: from azary.ir (localhost [127.0.0.1])
        by azary.ir (Postfix) with ESMTPA id CC8FF1400AA
        for <measqwrety2@gmail.com>; Thu, 10 Oct 2013 20:03:45 +0330 (IRST)
DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=azary.ir; s=2013;
    t=1381422825; bh=JEpdovrX5kTP5c8EfB0d+fjgdTg6w2qACp6GgAOfVto=;
    h=Date:From:To:Subject:From;
    b=X9ecar48Un7rocSIUgJllNLJM/ukuc57zaGUxM3Iwp8uKy2Z6lUOc0mrqpJDhx+/c
     ZbS5d4nkM8Geq4982ik6/0l0NDsTxtBIkJosRNeU02MhxSb7fnE9vCCx0W379w4A+T
     CpuTT28Dq6np4mRrIEiVX/DmhmI2Zu7GdSVU2CjupQ8Jyei/X6/33IS/+9BJ522++H
     FlkwQ3lFDWgU6zBdvmXm6TYTvA+phJKCC3rgbKTlyQInT8KPLpgZFzzzBwJkWWmKOR
     0pdsapmPjiJMXoCoLXpPoT4Ld1Ff4ZmT1z15LEbgigdihZRyeAd/BNKjFwk0bVqSr4
     8aVQRmzPH17+w==
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8;
 format=flowed
Content-Transfer-Encoding: 7bit
Date: Thu, 10 Oct 2013 20:03:45 +0330
From: "soroosh.azary" <soroosh@azary.ir>
To: measqwrety2@gmail.com
Subject: test18
Message-ID: <7ed74bf6cb71f37a7f689b9d820300e2@azary.ir>
X-Sender: soroosh@azary.ir
User-Agent: Roundcube Webmail/0.9.4

sdfnlasdfaslkfdjhasf

What is going on? And how can I fix it?
The interesting thing is that when I sent emails to Yahoo, at first they went to spam folder, and then to inbox, just opposite of what Gmail did!

UPDATE:
I've sent an email to check-auth2@verifier.port25.com and this is the result:

==========================================================
    Summary of Results
==========================================================
SPF check:          pass
DomainKeys check:   neutral
DKIM check:         pass
Sender-ID check:    pass
SpamAssassin check: ham

==========================================================
Details:
==========================================================

HELO hostname:  azary.ir
Source IP:      198.23.143.195
mail-from:      soroosh@azary.ir

----------------------------------------------------------
SPF check details:
----------------------------------------------------------
Result:         pass 
ID(s) verified: smtp.mailfrom=soroosh@azary.ir
DNS record(s):
    azary.ir. SPF (no records)
    azary.ir. 38400 IN TXT "v=spf1 a mx a:azary.ir ip4:198.23.143.195 ?all"
    azary.ir. 38400 IN A 198.23.143.195

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         neutral (message not signed)
ID(s) verified: header.From=soroosh@azary.ir
DNS record(s):

----------------------------------------------------------
DKIM check details:
----------------------------------------------------------
Result:         pass (matches From: soroosh@azary.ir)
ID(s) verified: header.d=azary.ir
Canonicalized Headers:
    Date:'20'Thu,'20'10'20'Oct'20'2013'20'22:32:26'20'+0330'0D''0A'
    From:'20'"soroosh.azary"'20'<soroosh@azary.ir>'0D''0A'
    To:'20'check-auth2@verifier.port25.com'0D''0A'
    Subject:'20'asdf'0D''0A'
    DKIM-Signature:'20'v=1;'20'a=rsa-sha256;'20'c=simple/simple;'20'd=azary.ir;'20's=2013;'0D''0A'
    '09't=1381431747;'20'bh=frcCV1k9oG9oKj3dpUqdJg1PxRT2RSN/XKdLCPjaYaY=;'0D''0A'
    '09'h=Date:From:To:Subject:From;'0D''0A'
    '09'b=

Canonicalized Body:
    '0D''0A'


DNS record(s):
  2013._domainkey.azary.ir. 38400 IN TXT "v=DKIM1; k=rsa; t=s; p=MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEAzmZ9hO/I4JfmRKOHP3ALQj15U/ECe/TiP88R2npL+B3jgrzTYQejG2uByYU9Eq1GlQTbqP4j+IKc4CnagBbOvGsnPfz/aUFSANd9qKmFPkFkwsWdhQ7mHQzDAXkOKrxvnhEc/ttFPnw5t4WZM+42n5mFojUMCchqsUvgj+jkpPbWYgA5tOLmRrgJ5Z7EbGvjU78TNAwrygyyFz2+VNHNsy1N008uoS6EO24xQZXc5u0HCzJEcK+TIC81t8E5W/2H0OY8KJEufl7kJorJgPlyFgu8Qq3ZEzzuywcQU+R70jJ+yofa0vPgq50n1vr8xpgYViquFi/LlcnJ4bapnPjjxwIDAQAB"

Public key used for verification: 2013._domainkey.azary.ir (2048 bits)

NOTE: DKIM checking has been performed based on the latest DKIM specs
(RFC 4871 or draft-ietf-dkim-base-10) and verification may fail for
older versions.  If you are using Port25's PowerMTA, you need to use
version 3.2r11 or later to get a compatible version of DKIM.

----------------------------------------------------------
Sender-ID check details:
----------------------------------------------------------
Result:         pass 
ID(s) verified: header.From=soroosh@azary.ir
DNS record(s):
    azary.ir. SPF (no records)
    azary.ir. 38400 IN TXT "v=spf1 a mx a:azary.ir ip4:198.23.143.195 ?all"
    azary.ir. 38400 IN A 198.23.143.195

----------------------------------------------------------
SpamAssassin check details:
----------------------------------------------------------
SpamAssassin v3.3.1 (2010-03-16)

Result:         ham  (-2.7 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
-0.7 RP_MATCHES_RCVD        Envelope sender domain matches handover relay domain
-1.9 BAYES_00               BODY: Bayes spam probability is 0 to 1%
                            [score: 0.0000]
-0.1 DKIM_VALID_AU          Message has a valid DKIM or DK signature from author's
                            domain
 0.1 DKIM_SIGNED            Message has a DKIM or DK signature, not necessarily valid
-0.1 DKIM_VALID             Message has at least one valid DKIM or DK signature

From what I can see, everything is good. What's next?

2nd UPDATE:
I've used services at http://www.appmaildev.com/en/dkim/ and http://dkimcore.org/tools/ to check it again. None of them reported any problem. Confusing.

3rd UPDATE:
The problem is not reproducible; I disabled DKIM and sent mails to Gmail and Yahoo, and they both went to spam folder. Again I enabled DKIM and sent mails to both, and only at yahoo it went to inbox.
I'm being convinced that it has something to do with reputation.

share|improve this question
    
Use Port25's Authentication Tools to figure out what the problem is, then post back here when you have a minimal understanding of whatever is happening. –  Chris S Oct 10 '13 at 16:58
    
I've added the test result. Nothing wrong I can see. BTW, can you increase your tolerance for marking questions as off-topic, bro?! –  sazary Oct 10 '13 at 19:18
1  
Your IP is black listed in at least 1 DNSBL for having send spam. We get a lot of questions from people who haven't done their homework. Experience has put the threshold low, don't take it personally. –  Chris S Oct 10 '13 at 20:06
    
Being listed in some DNSBLs are due to a breach some days ago, and it is being solved. But this problem has persisted from months ago, and as far as I know, google uses internal lists to determine spams. –  sazary Oct 10 '13 at 20:31
2  
DKIM and SPF are designed to ensure that the email comes from the domain that it says it comes from, not that it isn't spam. It looks like you've got these set up correctly but it's possibly that your domain may have a mark against it with these providers –  Matthew Steeples Oct 11 '13 at 1:37

1 Answer 1

Looks like yours emails goes to "greylist", try to put NOTSPAM on first letter then everything should be ok.

Yahoo also checks minimal message length. Try to put there more then 5 words.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.