Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th November 2009, 19:05
pirateye pirateye is offline
Junior Member
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default Remote host said: 554 5.7.1 Recipient address rejected: Access denied

I can send emails from mydomain.com but i can not receive.

sending mail from user@mydomain.com to user@gmail.com (or any other provider) is working

but

sending mail from user@gmail.com (or any other provider) to user@mydomain.com is not working

and mailer-daemon@gmail it says:

123.45.67.89 does not like recipient.
Remote host said: 554 5.7.1 <user@mydomain.com>: Recipient address rejected: Access denied
Giving up on 123.45.67.89.


I use ISPConfig version 2.2.33 and Postfix 2.5.5

main.cf looks like this:


smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
append_dot_mydomain = no
readme_directory = no

smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.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 = host.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = /etc/postfix/local-host-names
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128, 192.168.1.0/24
mynetwork_style = class
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
mydestination = host.mydomain.com, localhost.mydomain.com, localhost.localdomain, localhost
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
append_at_myorigin = no
virtual_maps = hash:/etc/postfix/virtusertable


virtusertable looks like this



File: virtusertable Line 1 Col 0 317 bytes 100%
###################################
#
# ISPConfig virtusertable Configuration File
# Version 1.0
#
###################################

user@www.mydomain.com user
user@mydomain.com user
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####



any idea?
thanks!
Reply With Quote
Sponsored Links
  #2  
Old 5th November 2009, 19:53
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

I think you have to make a small modification within your /etc/postfix/main.cf.
So here is my suggestion:

Replace the line:
mydestination = host.mydomain.com, localhost.mydomain.com, localhost.localdomain, localhost

with:
#mydestination = host.mydomain.com, localhost.mydomain.com, localhost.localdomain, localhost

And add the line:
mydestination = /etc/postfix/local-host-names

Restart postfix afterwards by executing:
/etc/init.d/postfix restart
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #3  
Old 5th November 2009, 20:00
pirateye pirateye is offline
Junior Member
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

@hans
i did but no effect...
Reply With Quote
  #4  
Old 5th November 2009, 20:17
Hans Hans is offline
Moderator
 
Join Date: Dec 2005
Location: Montfoort, The Netherlands
Posts: 2,256
Thanks: 210
Thanked 648 Times in 294 Posts
Send a message via Skype™ to Hans
Default

Oeps, i see you had the line mydestination = /etc/postfix/local-host-names already. Commenting out the other mydestination line is fine.

Is the recipient address within the file:
/etc/postfix/virtusertable

What do you see within your mail.log ?

Also try setting your option "My outgoing server SMTP requires authentication" and then select "Use same settings as my incoming mail server" within your e-mailaclient.
__________________
Hans

BB-Hosting | Quality Web Hosting since 2005
Reply With Quote
  #5  
Old 5th November 2009, 20:33
pirateye pirateye is offline
Junior Member
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Hans View Post
Oeps, i see you had the line mydestination = /etc/postfix/local-host-names already. Commenting out the other mydestination line is fine.

Is the recipient address within the file:
/etc/postfix/virtusertable

What do you see within your mail.log ?

Also try setting your option "My outgoing server SMTP requires authentication" and then select "Use same settings as my incoming mail server" within your e-mailaclient.

the recipient address is ok (only one address just for testing first) so.. i cant confuse it

from log:


postfix/smtpd[11655]: Anonymous TLS connection established from host1.domain1.com[xx.xx.xx.xx]: TLSv1 with cipher DHE-RSA-AES256-SHA (2$
$ejected: Access denied; from=<user1@domain1.com> to=<user@mydomain.com> proto=ESMTP helo=<host1.domain1.com>
postfix/smtpd[11655]: warning: restriction `_unauth_destination' after `reject' is ignored
postfix/smtpd[11655]: disconnect from host1.domain1.com[xx.xx.xx.xx]
*where user1, hos1 and domain1 are sender data


the email client is not so important cuz i can send email from every service (yahoo, gmail, etc) which does not need smtp authentication etc
Reply With Quote
  #6  
Old 6th November 2009, 15:05
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
Default

Does the MX record for your domain point to the correct server? You can check that with
Code:
dig mx yourdomain.com
Please make sure that reject_unauth_destination is one word in your main.cf.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Chow (6th December 2010)
  #7  
Old 6th November 2009, 15:35
pirateye pirateye is offline
Junior Member
 
Join Date: Nov 2009
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by falko View Post
Does the MX record for your domain point to the correct server? You can check that with
Code:
dig mx yourdomain.com
Please make sure that reject_unauth_destination is one word in your main.cf.
man i can't believe it... the problem was that space between "reject" and "_"

thnaks!
i should by 10 pairs of glasses... thank you again!
Reply With Quote
  #8  
Old 16th July 2012, 09:01
sateesh sateesh is offline
Junior Member
 
Join Date: Jul 2012
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default SMTP server error: 5.7.1 Client host rejected: Access denied in postfix server cento

Hi

when i am sending mail from php mailer i am getting this error
SMTP server error: 5.7.1 Client host rejected: Access denied in postfix server centos

and dkim signature is also not showing how to resolve this issue
Reply With Quote
  #9  
Old 17th July 2012, 16:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,711
Thanks: 1,899
Thanked 2,702 Times in 2,545 Posts
 
Default

Quote:
Originally Posted by sateesh View Post
Hi

when i am sending mail from php mailer i am getting this error
SMTP server error: 5.7.1 Client host rejected: Access denied in postfix server centos

and dkim signature is also not showing how to resolve this issue
Please don't highjack other threads. Please open a new thread.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Catchall and Forwarding not working simmo General 6 22nd March 2014 00:54
ISP Config hesitation when opening web pages frankb Installation/Configuration 7 15th December 2008 13:06
Recipient address rejected: User unknown in local recipient table djcronos Installation/Configuration 9 15th November 2007 11:48
Postfix 554 relay access denied! willebanks Installation/Configuration 3 26th September 2006 04:07
Recipient address rejected: User unknown in local recipent table. adrenalinic Installation/Configuration 15 25th April 2006 16:26


All times are GMT +2. The time now is 20:51.


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