LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-22-2010, 03:59 PM   #1
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Rep: Reputation: 0
Postfix Issue mails goes to spam. Have A, MX and rDNS record


Hello

I have a issue with my mailserver, when I sent mails to hotmail and probely other servers, the mail is going to spam.
I have set A record, MX record and rDNS.
My setup is Debian as server and Postfix with dovecot to handle mails.
There are 2 domains on the server and that is mail.casoe84.org there handle mails for both because of A record and rDNS.

Here is my main.cf file (stripped for database and passwords)

#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mail.casoe84.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all

#Virtual mailbox settings
virtual_mailbox_domains = proxy:mysql:$config_directory/mysql_virtual_domains_maps.cf
virtual_mailbox_base = /var/vmail
virtual_mailbox_maps = proxy:mysql:$config_directory/mysql_virtual_mailbox_maps.cf
virtual_alias_maps = proxy:mysql:$config_directory/mysql_virtual_alias_maps.cf
virtual_minimum_uid = 150
virtual_uid_maps = static:150
virtual_gid_maps = static:8
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1

# SASL Authentication
smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_exceptions_networks = $mynetworks
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/auth

# SASL Config
#pwcheck_method: auxprop
#auxprop_plugin: sql
#log_level: 10
#mech_list: sql login digest-md5 cram-md5 plain
#allow_plaintext: true
#sql_hostnames: localhost
#sql_user:
#sql_passwd:
#sql_database:
#sql_statement: select clear_pw from mailbox where username='%u@%r'
#sql_verbose: yes


#disable_vrfy_command = yes
#smtpd_delay_reject = yes
#smtpd_helo_required = yes
#smtpd_helo_restrictions = permit_mynetworks, reject_non_fqdn_hostname, reject_invalid_hostname, permit

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_hostname, reject_unauth_destination, reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net, permit
# smtpd_recipient_restrictions = reject_rbl_client zen.spamhaus.org, reject_rbl_client bl.spamcop.net
 
Old 11-22-2010, 05:38 PM   #2
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I did a little bit of investigation and confirmed that your DNS, both forward and reverse as well as your MX record seem fine. I also ran your domain against a black list check. To be honest, it looks like you have done everything right. One thing that I can think of you may want to add is an SPF record. There is another, newer, type of validation method but I can't recall the name of it off hand (it shouldn't cause you problems to not have it).

I am wondering if there is something in your content that could be triggering the spam flag. For a first step, I would see if you can get a full header from one of these mails to see if there is any spam filter analysis. Also check the headers and make sure that there isn't a mis-match of some form where it appears to be coming from a different system.

Lastly, check your domain at the mxtoolbox site. It has a lot of tools that will do an thorough check against your domain and report anything that could cause you to appear as spam.
 
Old 11-22-2010, 06:22 PM   #3
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Is that the PTR Record you are thinking at?
About SPF record I can't find it in my dns manager and my vps hoster said that the only thing they could do for me was the rDNS.

About the header there I can make one right away because I have an gmail and hotmail for testing pupose.
 
Old 11-22-2010, 06:23 PM   #4
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Here is the complete header from hotmail

Quote:
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtTQ0w9NA==

X-Message-Status: n

X-SID-PRA: Casper =?ISO-8859-1?Q?S=F8rensen?= <casper@casoe84.dk>

X-AUTH-Result: NONE

X-Message-Info: 6sSXyD95QpUA2sdytjh5bBbe+T5TFkH0wBu6tpqiBvKB8QLeBpBkGfq9xzmFPrIDpx6hXCHpJkWcsVCq9YAwQaGMxw9tynfS

Received: from mail.casoe84.org ([81.7.189.48]) by snt0-mc2-f24.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);

Mon, 22 Nov 2010 16:18:21 -0800

Received: from [10.0.3.14] (unknown [95.166.163.54])

by mail.casoe84.org (Postfix) with ESMTPA id 264CF2841CA;

Tue, 23 Nov 2010 02:08:48 +0000 (UTC)

Subject: Testing Mailserver

From: Casper =?ISO-8859-1?Q?S=F8rensen?= <casper@casoe84.dk>

To: Casper =?ISO-8859-1?Q?S=F8rensen?= <casoe84dk@gmail.com>,

casoe84dk@hotmail.com

Content-Type: text/plain

Date: Tue, 23 Nov 2010 01:18:17 +0100

Message-ID: <1290471497.17749.13.camel@medion>

Mime-Version: 1.0

X-Mailer: Evolution 2.30.3

Content-Transfer-Encoding: 7bit

Return-Path: casper@casoe84.dk

X-OriginalArrivalTime: 23 Nov 2010 00:18:21.0988 (UTC) FILETIME=[EFEE8640:01CB8AA3]



This is a test of my mailserver
 
Old 11-23-2010, 03:39 AM   #5
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
The headers from that mail look clean as far as I can tell. There is some information towards the top that is hotmail diagnostic code, such as X-SID-PRA, but it doesn't seem to be an error. I did find one link that has some usefull information: here. They recommend a site called port25.com and suggest sending an email requesting a report but note that it takes a while to get it back. The other thing that is mentioned is that MSN, Yahoo, Gmail, etc often times use internal black lists that could be banning you.

As far as the SPF record goes, it is just a TXT record that goes in the forward DNS entry. This would be something you can set up with your DNS provider, which is usually your registrar. Your ISP can change the rDNS to match your domain rather than something like a.b.c.d-provider-name. The link about mentions things like DKIM and domain keys, which I haven't looked into. A link is here. It seems to be another form of email authentication and apparently some providers make use of this.

The only thing that is remotely questionable in your email header is this entry (emphasis mine):
Quote:
Received: from mail.casoe84.org ([81.7.189.48]) by snt0-mc2-f24.Snt0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);
Mon, 22 Nov 2010 16:18:21 -0800
Received: from [10.0.3.14] (unknown [95.166.163.54])
by mail.casoe84.org
(Postfix) with ESMTPA id 264CF2841CA;
The 95.166.163.54 resolves to fullrate.dk, which I assume is your provider. This appears as the origin entry of the email and it is possible that hotmail is triggering on this. The domain and the IP both check clean for RBLs, though. Are you using some form of relay to send your mail?
 
Old 11-23-2010, 04:46 AM   #6
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Are you using a fixed i.p. address from your ISP? Some sites will treat mail coming from dynamic i.p. addresses as spam.
 
Old 11-23-2010, 08:02 AM   #7
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
I will try to look at the links but have never success full added a txt to the DNS

Quote:
Originally Posted by Noway2 View Post
The only thing that is remotely questionable in your email header is this entry (emphasis mine):

The 95.166.163.54 resolves to fullrate.dk, which I assume is your provider. This appears as the origin entry of the email and it is possible that hotmail is triggering on this. The domain and the IP both check clean for RBLs, though. Are you using some form of relay to send your mail?
No I don't use a relay server I'm calling my smtp directly in my mailprogram.
10.0.3.4 Is my internal IP on my network here at home
And yes fullrate Is my ISP

Quote:
Originally Posted by jamrock
you using a fixed i.p. address from your ISP? Some sites will treat mail coming from dynamic i.p. addresses as spam.
I'm using fixed IP both at my VPS and at home, but why should that be some issue It should only see are the IP in any spamlist's and that is no, then the mail is okay.
 
Old 11-23-2010, 08:08 AM   #8
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Here is the header if I sent a mail from my webmail. And the mail is still going to spam

Quote:
X-Message-Delivery: Vj0xLjE7dXM9MDtsPTA7YT0wO0Q9MjtTQ0w9NA==

X-Message-Status: n

X-SID-PRA: casper@casoe84.org

X-AUTH-Result: NONE

X-Message-Info: 6sSXyD95QpVahU8khdALYB5eU+sZNzGq3lx+XWHtyglptgvLYr9qRd+pKijHCCt3VnZDfYMspw9ecRVDZgwMwTl9FlNj7XPA

Received: from mail.casoe84.org ([81.7.189.48]) by col0-mc2-f25.Col0.hotmail.com with Microsoft SMTPSVC(6.0.3790.4675);

Tue, 23 Nov 2010 06:05:11 -0800

Received: from webmail.casoe84.org (localhost [127.0.0.1])

by mail.casoe84.org (Postfix) with ESMTP id C58052841CB

for <casoe84dk@hotmail.com>; Tue, 23 Nov 2010 15:55:37 +0000 (UTC)

Received: from 95.166.163.54

(SquirrelMail authenticated user casper@casoe84.org)

by webmail.casoe84.org with HTTP;

Tue, 23 Nov 2010 15:55:37 -0000 (UTC)

Message-ID: <87059d7a5145ad75b3d02ba27111327d.squirrel@webmail.casoe84.org>

Date: Tue, 23 Nov 2010 15:55:37 -0000 (UTC)

Subject: Test from my webmail

From: casper@casoe84.org

To: casoe84dk@hotmail.com

User-Agent: SquirrelMail/1.4.15

MIME-Version: 1.0

Content-Type: text/plain;charset=iso-8859-1

Content-Transfer-Encoding: 8bit

X-Priority: 3 (Normal)

Importance: Normal

Return-Path: casper@casoe84.org

X-OriginalArrivalTime: 23 Nov 2010 14:05:11.0672 (UTC) FILETIME=[719B8F80:01CB8B17]



This is a test from my webmail on the server





 
Old 11-24-2010, 03:52 AM   #9
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
I am really sorry that you are having such trouble. It really looks like you are doing everything right, including the rDNS, which is often times overlooked.

I have a few more suggestions for you:
1 - in your hotmail, make sure that your spam filter is not set to restrictive (no higher than standard). This causes anyone who is not explicitly marked as safe to automatically go to your junk mail.
2 - With hotmail, it does appear that X-AUTH-Result: NONE and X-SID-Result not being pass are the indications that they think the mail is junk. Hotmail supposedly has a Sender ID list that you will need to contact them regarding. You appear to be getting neutral results, which is a lot better than being classified as SPAM.
3 - Domain Keys and SPF records also appear to be the ticket with them according to other posts I read. From my own experience, this was the difference with Yahoo for me.
4 - As an experiment, try to relay your mail through your ISP's smtp server instead of directly. If this resolves the problem of being classified as junk, it will tell you that your problem is one of server identification. If still goes to the junk folder then it is an indication that there is something in the content, such as HTML only, or wrong keywords, etc. As with the sender ID, contact Hotmail may be the answer.

One tip for creating an SPF record, there are wizards on line that will do that for you. Since your domain is set up well with respect to the DNS, this should be an almost automatic process. Search for 'create spf record' and you should get results for these wizards. Believe it or not, the Microsoft wizard is quite good. It will give you the text, which is a little cryptic, that you simply add to your zone. This is just like adding an A or MX record but the type is TXT instead.

Lastly, here and here are a couple of links that I found that I referenced in this reply in case it helps. I searched on the X-Auth-Result to find them.
 
Old 11-24-2010, 05:35 AM   #10
jamrock
Member
 
Registered: Jan 2003
Location: Kingston, Jamaica
Posts: 444

Rep: Reputation: 41
Quote:
Originally Posted by casoe84dk View Post
I'm using fixed IP both at my VPS and at home, but why should that be some issue It should only see are the IP in any spamlist's and that is no, then the mail is okay.
A significant portion of spam is generated by infected home machines. Most home internet connections use dynamic i.p. addresses. For this reason, some ISP's reject mail originating from mail servers on dynamic i.p. addresses.

If someone wants to host a mail server on a dynamic ip. address, it is best to forward the mail through his ISP's mail server.

Last edited by jamrock; 11-24-2010 at 05:40 AM.
 
Old 11-24-2010, 07:55 AM   #11
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by Noway2 View Post

3 - Domain Keys and SPF records also appear to be the ticket with them according to other posts I read. From my own experience, this was the difference with Yahoo for me.
4 - As an experiment, try to relay your mail through your ISP's smtp server instead of directly. If this resolves the problem of being classified as junk, it will tell you that your problem is one of server identification. If still goes to the junk folder then it is an indication that there is something in the content, such as HTML only, or wrong keywords, etc. As with the sender ID, contact Hotmail may be the answer.
3. I have created a SPF record for my 2 domains but that did not the trick. I have allso validated them http://www.allaboutspam.com/email-se...48274D3D5DF8F2 & http://www.allaboutspam.com/email-se...F0ACAABFC661E1
About Domain Key that I can't find out. I havent been able to find an danish guide to it yet, and my english is not that good that I would try from a english tutorial.

4. Allso I won't go it to the Sender ID project still because of my english. There can easy be made som failures when that is on such a high level when I don't understand everything perfect
 
Old 11-24-2010, 08:18 AM   #12
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
I have allso tested my domains with port25.com and that result is attached in the txt file
Attached Files
File Type: txt port25.txt (5.4 KB, 10 views)
 
Old 11-24-2010, 08:37 AM   #13
casoe84dk
LQ Newbie
 
Registered: Aug 2009
Posts: 22

Original Poster
Rep: Reputation: 0
And when I call my isp, they said that they don't have smtp servers anymore.
 
Old 11-24-2010, 05:14 PM   #14
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
The port25 report looks clean. The DKIM and Sender ID are neutral, but that is to be expected given that you haven't implemented them. As far as I can tell, everything looks good on your end and you have taken the proper steps to run a valid email server. I think your next step will be to send an email to the administrators of the domains that are giving you trouble (yahoo, hotmail, gmail) and ask them to put you on the accepted list. A lot of times, you will receive an automated response and if you reply to it correctly, you will automatically get removed from the Spam list. The sad fact is that spam is such a problem that the big mail providers have had to resort to an "unless I know you, I assume your spam" policy and people like you are paying the price.

I wouldn't let English be a barrier to keeping you from contacting them, your English seems pretty good to me.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Spam nightmare, duplicate e-mails, scrubbing of mails boxes metallica1973 Linux - Security 3 05-25-2010 09:06 AM
spf, domainkeys, rdns, ip not black listed but still mail goes to spam box kingkashif Linux - General 11 10-06-2009 05:54 AM
spam issue (postfix and cyrus ) rakmvk Linux - Server 2 01-06-2009 01:48 AM
To restrict a user to send mails only to 3 e-mails IDs using postfix mail server sharath41 Linux - Newbie 2 07-21-2008 07:38 PM
stop outgoing mails classified as spam (postfix, spamass) tim124 Linux - Server 6 06-26-2008 05:50 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:42 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration