I have been trying to get my DNS records right and mail server (postfix) configured correctly so receiving remote mail servers (yahoo, hotmail, msn) are happy and don’t block me and I just can’t get it right.
I know previously I had asked questions about running separate postfix instances for domains with dedicated IPs but I am no longer trying to do that and my setup is default virtualmin pro setup.
The issues I am running into when doing tests at DNS Colos are:
Legend.
vps.example.net = server
74.63.2.190 = IP of the server
example.org = regular virtual host domain
example.com = Dedicated IP virtual host domain
74.63.2.190 = IP of dedicated IP virtual host domain
If it is a regular domain without a dedicated IP.
FAIL
Mailserver connection test
HELO, MAIL FROM, RCPT TO, QUIT
Connect to mailserver mail.example.org FAILED (could be greylisting)
550 5.1.1 : Recipient address rejected: User unknown in virtual alias table
Here is what a regular virtual host domain DNS record looks like:
$ttl 38400
@ IN SOA ns1.example.net. hostmaster.example.net. (
2008062811
2H
1H
1W
20M )
@ IN NS ns1.example.net.
@ IN NS ns2.example.net.
example.org. IN A 74.63.2.190
www.example.org. IN A 74.63.2.190
ftp.example.org. IN A 74.63.2.190
localhost.example.org. IN A 127.0.0.1
mail.example.org. IN A 74.63.2.190
example.org. IN MX 5 mail.example.org.
example.org. IN TXT "v=spf1 a mx a:example.org. ip4:74.63.2.190 -all"
If it is a domain with a dedicated IP it gets the fail above PLUS the fail below:
FAIL
Mailserver greeting
The server should have an A record which points to the mailserver for the hostname
which is presented in the greeting
mail.example.com
220 vps.example.net ESMTP Postfix
Here is what a dedicated IP virtual host domain DNS record looks like:
$ttl 20M
@ IN SOA ns1.example.net. hostmaster.example.net. (
2008070315
2H
1H
1W
20M )
@ IN NS ns1.example.net.
@ IN NS ns2.example.net.
example.com. IN A 74.63.2.247
www.example.com. IN A 74.63.2.247
ftp.example.com. IN A 74.63.2.247
localhost.example.com. IN A 127.0.0.1
mail.example.com. IN A 74.63.2.247
example.com. IN MX 5 mail.example.com.
example.com. IN TXT "v=spf1 a mx a:example.com ip4:74.63.2.247 ip4:74.63.2.190 -all"
Here is my postconf output:
postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
html_directory = no
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, vps.example.net
newaliases_path = /usr/bin/newaliases.postfix
qmgr_message_active_limit = 4000
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sender_bcc_maps = hash:/etc/postfix/bcc
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual
Why am I getting the fails when checking my record?
What is the right way to configure the DNS record for a virtual host that has a dedicated IP as mail will not be coming from that IP but from the servers IP right? please help as my mind is almost gone!