Unix/Linux Go Back    


Ubuntu Ubuntu is a complete desktop Linux operating system, freely available with both community and professional support.

learn linux and unix commands - unix shell scripting

NOQUEUE: reject: Relay access denied - Postfix

Ubuntu


Tags
mail, postfix, server

Closed    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 08-30-2014   -   Original Discussion by sunnysthakur
sunnysthakur's Unix or Linux Image
sunnysthakur sunnysthakur is offline
Registered User
 
Join Date: Apr 2011
Last Activity: 30 December 2017, 3:26 AM EST
Posts: 51
Thanks: 1
Thanked 3 Times in 3 Posts
NOQUEUE: reject: Relay access denied - Postfix

Hello,

I am trying to setup a mail server (Postfix) on Ubuntu Server at my end but facing Relay access denied issue.

Mail Server DNS is mydomain.com and MX record is also added to the DNS server for the same. When i am sending out emails from outer domain to user1@mydomain.com, I configured the account on mail client (Thunderbird) and i am able to receive the mails in the users INBOX but the issue is that when ever i am going to send the mails from @mydomain.com to other domain from thunderbird and it simply denied it with below error in logs:-

ERROR (/var/log/mail.log)


Code:
Aug 28 16:53:53 ip-172-31-3-184 postfix/qmgr[5174]: 535454D34: removed
Aug 28 16:53:54 ip-172-31-3-184 postfix/smtpd[5537]: disconnect from unknown[xx.xx.xxx.xxx]
Aug 28 16:54:16 ip-172-31-3-184 postfix/smtpd[5537]: connect from unknown[xx.xx.xxx.xxx]
Aug 28 16:54:17 ip-172-31-3-184 postfix/smtpd[5537]: NOQUEUE: reject: RCPT from unknown[xx.xx.xxx.xxx]: 554 5.7.1 <user2@qasource.com>: Relay access denied test1@mydomain.com> to=<user1@otherdomain.com> proto=ESMTP helo=<[127.0.0.1]>
Aug 28 16:54:25 ip-172-31-3-184 postfix/smtpd[5537]: disconnect from unknown[xx.xx.xxx.xxx]
Aug 28 16:55:30 ip-172-31-3-184 dovecot: pop3-login: Login: user=<sales>, method=PLAIN, rip=xx.xx.xxx.xxx, lip=xx.xx.xxx.xxx, mpid=5553, TLS
Aug 28 16:55:32 ip-172-31-3-184 dovecot: pop3(sales): Disconnected: Logged out top=0/0, retr=0/0, del=0/21, size=166580
Aug 28 16:57:20 ip-172-31-3-184 dovecot: pop3-login: Login: user=<test1>, method=PLAIN, rip=203.190.154.38, lip=172.31.3.184, mpid=5563, TLS
Aug 28 16:57:22 ip-172-31-3-184 dovecot: pop3(test1): Disconnected: Logged out top=0/0, retr=1/697, del=0/17, size=78351

Below is my main.cf configuration file:-



Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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 = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/postfix.pem
smtpd_tls_key_file = /etc/ssl/private/postfix.pem
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.
#smtpd_sasl_auth_enable = yes
#broken_sasl_auth_clients = yes
#smtpd_sasl_type = dovecot
#smtpd_sasl_path = private/auth
#smtpd_sasl_security_options = noanonymous

myhostname = ip-10-168-49-111.us
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mydomain.com, ip-10-168-49-111.us, localhost.us, localhost
mydestination = mydomain.com, ip-10-168-49-111.us, localhost.us, localhost
relayhost =
mynetworks = 127.0.0.0/8, 172.31.0.0/16
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = ipv4
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_relay_domains

I also test the scenario where the mails exchanging across cross domain is working fine from command line from the postfix server.

Moderator's Comments:
NOQUEUE: reject: Relay access denied - Postfix Please use CODE tags for most code, input & output/errors, config files etc.
Only use PHP or HTML tags for the relevant code as the results can be confused by their interpretation


---------- Post updated 08-30-14 at 02:33 PM ---------- Previous update was 08-29-14 at 09:54 PM ----------

Any help will be appreciated

---------- Post updated at 02:34 PM ---------- Previous update was at 02:33 PM ----------

Any help will be appreciated

Last edited by rbatte1; 08-29-2014 at 01:27 PM.. Reason: Changed PHP tags for CODE tags
Sponsored Links
    #2  
Old Unix and Linux 09-24-2014   -   Original Discussion by sunnysthakur
MadeInGermany's Unix or Linux Image
MadeInGermany MadeInGermany is offline Forum Staff  
Moderator
 
Join Date: May 2012
Last Activity: 4 January 2018, 1:17 PM EST
Location: Simplicity
Posts: 3,902
Thanks: 327
Thanked 1,305 Times in 1,178 Posts
I think you must add relay_domains


Code:
relay_domains = mydomain.com

or


Code:
relay_domains = mydomain.com, other.domain

Sponsored Links
    #3  
Old Unix and Linux 11-25-2014   -   Original Discussion by sunnysthakur
xabbu's Unix or Linux Image
xabbu xabbu is offline
Registered User
 
Join Date: Jan 2014
Last Activity: 6 March 2017, 1:19 PM EST
Location: Germany
Posts: 50
Thanks: 0
Thanked 15 Times in 15 Posts
Hi,

you said:

Quote:
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_relay_domains
so you can only send emails if you are in the network you defined in mynetworks.

or you must authetificate the user.

Regards,
xabbu
Sponsored Links
Closed


Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
postfix config: how to relay mails for only one user of a certain domain lpacor UNIX for Dummies Questions & Answers 2 02-23-2012 12:34 PM
postfix config: how to relay mails for only one user of a certain domain lpacor UNIX and Linux Applications 0 02-23-2012 11:24 AM
postfix config: how to relay mails for only one user of a certain domain lpacor UNIX for Advanced & Expert Users 0 02-15-2012 01:32 PM
Access denied when sending mail - postfix majid.merkava Emergency UNIX and Linux Support 3 02-18-2011 11:23 AM
Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix wbdevilliers UNIX for Dummies Questions & Answers 0 02-26-2010 06:28 AM



All times are GMT -4. The time now is 03:33 PM.