NOQUEUE: reject: Relay access denied - Postfix


 
Thread Tools Search this Thread
Operating Systems Linux Ubuntu NOQUEUE: reject: Relay access denied - Postfix
# 1  
Old 08-30-2014
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:
Mod Comment 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
# 2  
Old 09-24-2014
I think you must add relay_domains
Code:
relay_domains = mydomain.com

or
Code:
relay_domains = mydomain.com, other.domain

# 3  
Old 11-25-2014
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

Need an help in configuring Postfix mail relay server

Hello, We have 2 servers, server A and Server B in same domain. I have already configured the Serevr A to send an email to the internet (outside domain) by opening the port 25 to the internet. Now I need to send an email to the outside domain from Server B using server A. I have opened the... (1 Reply)
Discussion started by: sathishbabu89
1 Replies

2. UNIX for Dummies Questions & Answers

Access Denied

I login to a server and get a Access Denied Prompt but I clearly lets me into the prompt with Putty. I do a sudo -s enter my password tells me Access Denied but I am clearly now Root Just wondering why this is so? what is misconfigured? I mean its not prohibiting me from anything, this is more... (3 Replies)
Discussion started by: gkelly1117
3 Replies

3. Linux

Configure Postfix to relay to Exchange Server with NTLM authentication

Hello I have a shell script, which should send email, if any error occurred. This script is running in Red Hat Linux 4.6, and want to configure postfix so it can relay to an Exchange Server. The Authorization method of Exchange server, I guess is: 250-AUTH NTLM. So I have: Server A ( Red... (1 Reply)
Discussion started by: viktor1985
1 Replies

4. UNIX for Dummies Questions & Answers

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (2 Replies)
Discussion started by: lpacor
2 Replies

5. UNIX and Linux Applications

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

6. UNIX for Advanced & Expert Users

postfix config: how to relay mails for only one user of a certain domain

Hello there, First of all I tell you that this is my first postfix installation so please be patient... I have following scenario: fetchmail --> postfix --> amavis-new --> postfix --> exchange 2010. Everything -except exchange ;-)- runs on an opensuse 12.1 box. Now, I have a list of... (0 Replies)
Discussion started by: lpacor
0 Replies

7. Solaris

Access Denied

Hi All, I have a root access for one of the server. But, when i try to cd one particular directory i will get the access denied message. Even though that particular directory is created under root. What would be the cause for this? I really wonder if any one have answer for my... (20 Replies)
Discussion started by: Sricharan21
20 Replies

8. Emergency UNIX and Linux Support

Access denied when sending mail - postfix

i have configured mail server with postfix with dovecot with no encryption: When connecting with Thunderbird imap is working fine. when sending email from another domain to this domain again it is fine. but when i want to send mail frommy domain to another it gives me error and this is... (3 Replies)
Discussion started by: majid.merkava
3 Replies

9. UNIX for Dummies Questions & Answers

Please help with Postfix config issue - How to allow remote Exchange server to relay to my postfix

Hi guys One of our clients have a problem with sending email to a certain domain. No matter what we try, the mails just dont get delivered. What I did then, is created a new connector on their Exchange server, pointing all mail sent to their client at "domain1" to relay to our Postfix mail... (0 Replies)
Discussion started by: wbdevilliers
0 Replies

10. SuSE

"scp" access denied:/etc/security/access.conf

Guys i have 2 SUSE Linux Enterprise Server 10 SP1 (i586) boxes.if i take a look into /etc/security/access.conf ,i see following lines at the eof # All other users should be denied to get access from all sources. #- : ALL : ALL - : myID : ALL now earlier i had written scripts where files... (1 Reply)
Discussion started by: ak835
1 Replies
Login or Register to Ask a Question