HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   Installation/Configuration (http://www.howtoforge.com/forums/forumdisplay.php?f=4)
-   -   Postfix issue: Relay access denied and problem with sending mails (http://www.howtoforge.com/forums/showthread.php?t=31045)

Debianer 6th February 2009 20:21

Postfix issue: Relay access denied and problem with sending mails
 
Hi,
I've just installed postfix and popa3d - debian packages.

1. When I try to send an e-mail from Gmail account to me:
Code:

user@domain.com
I'm getting error:
Code:

Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 554 554 5.7.1 <user@domain.com>: Relay access denied (state 14).
2. When I try to send an e-mail from Postfix to Gmail it normally, go out, but I am not getting this e-mail on my Gmail account.

My main.cf is:
Code:

myorigin = /etc/mailname # domain.com

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

append_dot_mydomain = no

readme_directory = no


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

myhostname = my computer static ISP hostname
mydomain = domain.com
mydestination = $myhostname
mynetworks = 192.168.0.0/24
inet_interfaces = all

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases

disable_dns_lookups = yes

mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +

What should I do?

falko 7th February 2009 16:39

Please check if your MX record is ok...
Code:

dig mx yourdomain.com
... and that your server isn't blacklisted: http://mxtoolbox.com/blacklists.aspx

Debianer 7th February 2009 16:56

MX Record is my server IP.

Blacklist check:
Code:

Checking 78.88.117.27 against 123 known blacklists...
Listed: 2 time(s)
Timeouts:7


falko 8th February 2009 19:45

Quote:

Originally Posted by Debianer (Post 168409)
MX Record is my server IP.

The MX record must point to a hostname (e.g. mail.example.com) which then points to an IP (using an A record).

Quote:

Originally Posted by Debianer (Post 168409)
Blacklist check:
Code:

Checking 78.88.117.27 against 123 known blacklists...
Listed: 2 time(s)
Timeouts:7


Is your server hosted on a dynamic IP and/or was it abused by spammers?

Debianer 8th February 2009 22:35

My server is hosted on static IP and it was not abused by spammers.
Fixed MX record. Now it points to hostname, which points to server IP.
... but still e-mails from Gmail cannot be sent, beacuse there is same error with Relay Access Denied.

Checked log when sending an e-mail to Gmail and other mail server. Most servers (maybe all) say that I am spammer.

I am not sure is it spam block or becuase I dont have revDNS configured properly for my domain.
Found somewhere that configuring revDNS helped for this problem.


Now have problem with configuring bind9. Installed it then

Added to named.conf, my IP is 73.48.217.17
Code:

zone "17.217.48.73.in-addr.arpa" {
type master;
file "/etc/bind/17.217.48.73.in-addr.arpa";
};

17.217.48.73.in-addr.arpa - file
Code:

17.217.48.73.in-addr.arpa.    IN PTR  domain.com.
I am not Primary DNS for domain.com, it has external default DNS servers.

I've checked the RevDNS and its still not correct. Here: remote.12dt.com/lookup.php

What should be inside of 17.217.48.73.in-addr.arpa file?
I've only one line of code as you see.

falko 9th February 2009 14:35

Quote:

Originally Posted by Debianer (Post 168581)
My server is hosted on static IP and it was not abused by spammers.
Fixed MX record. Now it points to hostname, which points to server IP.
... but still e-mails from Gmail cannot be sent, beacuse there is same error with Relay Access Denied.

IT can take up to 72 hours until DNS changes propagate, so you might have to wait a little bit longer.

Quote:

Originally Posted by Debianer (Post 168581)
Checked log when sending an e-mail to Gmail and other mail server. Most servers (maybe all) say that I am spammer.

Please contact the maintainers of the blacklists and ask them to remove your server.

A PTR record is important, but it must be created by your ISP/hoster (the one who gave you the IP address).

Also make sure you have SPF records for your domains.

Debianer 12th February 2009 20:07

Still Relay Acces Denied. POP3 port 110 open.
Dont know why it blocks.

PTR record must be created by my ISP?
My hostname is vectranet.pl, but my domain is different, so revDNS for my IP do not point to my mail domain.

About SPF
Here is my bind9 zone file:
Code:

27.117.88.78.in-addr.arpa.    IN PTR  guid.pl.
guid.pl. TXT "v=spf1 ip4:78.88.117.27 -all"


falko 13th February 2009 14:13

Quote:

Originally Posted by Debianer (Post 169295)
PTR record must be created by my ISP?
My hostname is vectranet.pl, but my domain is different, so revDNS for my IP do not point to my mail domain.

The PTR must point to a domain/hostname that in return points back to the same IP. It doesn't matter if it's your hostname or something like dgbg123523452.rthrt435634.yourisp.com.

Debianer 13th February 2009 15:07

So revDNS is propably set up correclty. RevDNS for my IP get my hostname created by ISP.
What about sending from email account to my server account?
What about SPF is set up correctly in bind9?

falko 14th February 2009 13:47

If you send guid.pl mails only from the 78.88.117.27 server, then the SPF record is ok.

Can you send an email to your server and at the same time take a look at the mail log? What happens there?


All times are GMT +2. The time now is 16:17.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.