Postfix issue: Relay access denied and problem with sending mails

Discussion in 'Installation/Configuration' started by Debianer, Feb 6, 2009.

  1. Debianer

    Debianer New Member

    Hi,
    I've just installed postfix and popa3d - debian packages.

    1. When I try to send an e-mail from Gmail account to me:
    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 <[email protected]>: 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?
     
  2. falko

    falko Super Moderator Howtoforge Staff

  3. Debianer

    Debianer New Member

    MX Record is my server IP.

    Blacklist check:
    Code:
    Checking 78.88.117.27 against 123 known blacklists...
    Listed: 2 time(s)
    Timeouts:7
    
     
  4. falko

    falko Super Moderator Howtoforge Staff

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

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

    Debianer New Member

    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.
     
    Last edited: Feb 8, 2009
  6. falko

    falko Super Moderator Howtoforge Staff

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

    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.
     
  7. Debianer

    Debianer New Member

    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"
     
  8. falko

    falko Super Moderator Howtoforge Staff

    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.
     
  9. Debianer

    Debianer New Member

    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?
     
  10. falko

    falko Super Moderator Howtoforge Staff

    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?
     

Share This Page