LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Ubuntu server with postfix. My mail goes to Spam in Gmail and Yahoo Mail. Ideeas? (https://www.linuxquestions.org/questions/linux-server-73/ubuntu-server-with-postfix-my-mail-goes-to-spam-in-gmail-and-yahoo-mail-ideeas-702720/)

bob808 02-06-2009 07:29 AM

Ubuntu server with postfix. My mail goes to Spam in Gmail and Yahoo Mail. Ideeas?
 
Hello guys! I would like to thank you in advance for your help. I am really stuck here and have a deadly deadline :) I have to take over the mail from my company (they have a contract atm with another company for mail services) and I am stuck. I have a Dell R300 server witch has Ubuntu Server installed. I also added Postfix for mail, configured it, everything runs smooth but!...all of my mail ends up in Spam at gmail and yahoo.

Let's say my domain is "mydomain.com" and my ip is 89.xxx.yyy.zzz :)

I shall put here all the config maybe you can help me.

First of all...i talked to my ISP and had them put reverse dns on mydomain.com. I checked it with some utilities and it really shows mydomain.com.

Now with my config:

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
inet_interfaces = all
inet_protocols = ipv4
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
message_size_limit = 102400000
mydestination = /etc/postfix/local-host-names
mydomain = mydomain.com
myhostname = mail. mydomain.com
mynetworks = 89.xxx.yyy.0/30, 127.0.0.0/8
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_note_starttls_offer = yes
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom

cat /etc/postfix/local-host-names

###################################
#
# ISPConfig local-host-names Configuration File
# Version 1.0
#
###################################
localhost
server1
localhost.server1
localhost.localdomain
www.mydomain.com
webmail.mydomain.com
mydomain.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####

cat /etc/hosts
127.0.0.1 localhost
89.xxx.yyy.zzz server1

cat /etc/resolv.conf
search mydomain.com
nameserver 89.xxx.yyy.zzz


dig mydomain.com

; <<>> DiG 9.5.0-P2 <<>> mydomain.com
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 58678
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 0

;; QUESTION SECTION:
;mydomain.com. IN A

;; ANSWER SECTION:
mydomain.com. 86400 IN A 89.xxx.yyy.zzz

;; AUTHORITY SECTION:
mydomain.com. 86400 IN NS ns1.mydomain.com.
mydomain.com. 86400 IN NS ns2.mydomain.com.

;; Query time: 0 msec
;; SERVER: 89.xxx.yyy.zzz#53(89.xxx.yyy.zzz)
;; WHEN: Fri Feb 6 13:57:06 2009
;; MSG SIZE rcvd: 83


nslookup 89.xxx.yyy.zzz
Server: 89.xxx.yyy.zzz
Address: 89.xxx.yyy.zzz#53

Non-authoritative answer:
zzz.yyy.xxx.89.in-addr.arpa name = mydomain.com.


cat /etc/bind/named.conf
options {
pid-file "/var/run/bind/run/named.pid";
directory "/etc/bind";
auth-nxdomain no;
/*
* If there is a firewall between you and nameservers you want
* to talk to, you might need to uncomment the query-source
* directive below. Previous versions of BIND always asked
* questions using port 53, but BIND 8.1 uses an unprivileged
* port by default.
*/
// query-source address * port 53;
};

//
// a caching only nameserver config
//
zone "." {
type hint;
file "db.root";
};

zone "0.0.127.in-addr.arpa" {
type master;
file "db.local";
};


zone "mydomain.com" {
type master;
file "pri. mydomain.com";
};

//// MAKE MANUAL ENTRIES BELOW THIS LINE! ////

zone "zzz.yyy.xxx.89.in-addr.arpa" {
type master;
file "rev.yyy.xxx.89.in-addr.arpa";
};


cat /etc/bind/rev.yyy.xxx.89.in-addr.arpa

@ IN SOA ns1.mydomain.com. www.mydomain.com. (
2006081401;
28800;
604800;
604800;
86400 )


IN NS ns1.mydomain.com.
zzz IN PTR mydomain.com.



cat /etc/bind/pri.mydomain.com

$TTL 86400
@ IN SOA ns1. mydomain.com. xxx.gmail.com. (
2009013002 ; serial, todays date + todays serial #
28800 ; refresh, seconds
7200 ; retry, seconds
604800 ; expire, seconds
86400 ) ; minimum, seconds
;
NS ns1. mydomain.com. ; Inet Address of name server 1
NS ns2. mydomain.com. ; Inet Address of name server 2
;

MX 10 mail. mydomain.com.

mydomain.com. A 89.xxx.yyy.zzz
www CNAME mydomain.com.
webmail CNAME mydomain.com.
mail CNAME mydomain.com.
ns1 CNAME mydomain.com.
ns2 CNAME mydomain.com.
ftp CNAME mydomain.com.





;;;; MAKE MANUAL ENTRIES BELOW THIS LINE! ;;;;

bathory 02-06-2009 07:53 AM

Maybe mail from your server goes to spam, because in your dns you have setup a CNAME for your mailserver. Change it to
Code:

mail A 89.xxx.yyy.zzz
and see if it helps.

bob808 02-06-2009 09:53 AM

Quote:

Originally Posted by bathory (Post 3434126)
Maybe mail from your server goes to spam, because in your dns you have setup a CNAME for your mailserver. Change it to
Code:

mail A 89.xxx.yyy.zzz
and see if it helps.

I just updated the config file, hope it will work. I'll check tommorow after the dns updates.
Thank you! :)

bob808 02-07-2009 01:31 PM

Well....after i made a SPF record that looks like this: "mydomain.com. IN TXT "v=spf1 ip4:89.xxx.yyy.zzz a mx ~all" and after making an A record of mail.domain.com my mail goes to Inbox in Gmail but still in spam at Yahoo Mail. Should I buy a security certificate? Because it keeps asking me when I try to send mail. Maybe that should solve the problem?

Have a nice day

bathory 02-07-2009 04:11 PM

I don't think that implementing spf helped. AFAIK yahoo does not use it at all.
Maybe you have to tell yahoo-mail that mails from your mailserver are legitimate a couple of times, so it stops putting them in the spam folder.


All times are GMT -5. The time now is 12:06 AM.