Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 9th February 2012, 11:12
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default Recipient address rejected 5.1.1

Brand new single server Centos 6 ISPConfig 3 /last version/

Postfix works - sending and receiving email for root without problem.

In ISPConfig I have added: Email -> Email accounts -> Domain
added new domain example.com
after that in Email -> Email accounts -> Email Mailbox
added new mailbox info@example.com

Now I login thru Webmail (squirrelmail) to this virtual account. Sending emails without problem. Rceiving emails from myself (from info@example.com to info@example.com). The problem is that I can not receive email to this box from outside. Always receive SMTP 5.1.1 Recipient address rejected. User unknown in local recipient table.

I'm fighting with this second day without any success ... Please help. Nothing in mail error log. Most probably postfix does not loading properly virtual mailboxes from mysql table. How to fix this?
Reply With Quote
Sponsored Links
  #2  
Old 9th February 2012, 11:18
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,433
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

This might be a dns problem and not a email problem. If sending in webmail works, then your ispconfig server is configured correctly and that you dont get error in the mail log seconds that. My guess is that the MX record of the domain points to a different server and not your ispconfig server.

Quote:
Most probably postfix does not loading properly virtual mailboxes from mysql table. How to fix this?
If that would be the case, then webmail would not be working too.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 9th February 2012, 11:34
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Just checked with mxtoolbox

Everything seems ok. MX points to right server.

Reverse DNS FAILED! This is a problem.

0 seconds - Good on Connection time
Not an open relay.
1.295 seconds - Good on Transaction time

Can this reverse DNS be the problem?
Reply With Quote
  #4  
Old 9th February 2012, 11:36
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

This can not be MX record problem, because I receive mails for
root@example.com (real user)
but can not receive mails for info@example.com (virtual user)
Reply With Quote
  #5  
Old 9th February 2012, 11:38
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,433
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

The reverse dns should be fixed, but ist most likely not the source of the problem. I dont think that mxtoolbox can check if your server is the right one, it just checks that the dns configuration is valid.

run:

dig MX yourdomain.tld

on the shell of your server. It should return you the MX record and also the a record where the mx points to. The IP address of the a record that dig returns must be identical with the IP address of your server.

Beside that, where do you get the error "SMTP 5.1.1 Recipient address rejected. User unknown in local recipient table."? In the mail.log of your server or in the email that is returned.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 9th February 2012, 11:41
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,433
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Quote:
This can not be MX record problem, because I receive mails for
root@example.com (real user)
but can not receive mails for info@example.com (virtual user)
Have you used example.com as hostname or mailname for the server? As written in the perfect setup guides, the hostname and mailname have to be a subdomain like server1.example.com and not example.com. If you would use example.com as hostname, then this domain is blocked for mail receiving in postfix for all virtual mail users.

So if you used example.com as name of your server, then you will have to change that in the postfix main.cf, in /etc/hosts and also in the centos network configuration utility.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 9th February 2012, 16:49
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
....
run:

dig MX yourdomain.tld

on the shell of your server. It should return you the MX record and also the a record where the mx points to. The IP address of the a record that dig returns must be identical with the IP address of your server.
I have just run it and all is perfect. MX record shows smtp.myserverdomain.com
and the A record for smtp.myserverdomain.com is the right IP.

Quote:
Originally Posted by till View Post
Beside that, where do you get the error "SMTP 5.1.1 Recipient address rejected. User unknown in local recipient table."? In the mail.log of your server or in the email that is returned.
I got this as pop-up from my Mozzila Thunderbird on my home PC, when I'm trying to send email to info@example.com

I mean the message is right after I click "Send" not some "failed delivery" email.
Reply With Quote
  #8  
Old 9th February 2012, 16:53
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by till View Post
Have you used example.com as hostname or mailname for the server? As written in the perfect setup guides, the hostname and mailname have to be a subdomain like server1.example.com and not example.com. If you would use example.com as hostname, then this domain is blocked for mail receiving in postfix for all virtual mail users.

So if you used example.com as name of your server, then you will have to change that in the postfix main.cf, in /etc/hosts and also in the centos network configuration utility.
My hostname is server1.myhostdomain.com

I have added example.com in ISPConfig (there is also vhost for this domain example.com which works ok)
Reply With Quote
  #9  
Old 9th February 2012, 16:59
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,433
Thanks: 813
Thanked 5,209 Times in 4,085 Posts
Default

Please post your postfix main.cf file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 9th February 2012, 17:35
kopurka kopurka is offline
Junior Member
 
Join Date: Jan 2012
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

queue_directory = /var/spool/postfix

command_directory = /usr/sbin

daemon_directory = /usr/libexec/postfix

data_directory = /var/lib/postfix

mail_owner = postfix

inet_interfaces = all

inet_protocols = all

mydestination = server1.myserverdomain.com, smtp.myserverdomain.com, localhost, localhost.localdomain

unknown_local_recipient_reject_code = 550

alias_maps = hash:/etc/aliases

alias_database = hash:/etc/aliases


debug_peer_level = 2

debugger_command =
PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
ddd $daemon_directory/$process_name $process_id & sleep 5


sendmail_path = /usr/sbin/sendmail.postfix

newaliases_path = /usr/bin/newaliases.postfix

mailq_path = /usr/bin/mailq.postfix

setgid_group = postdrop

html_directory = no

manpage_directory = /usr/share/man

sample_directory = /usr/share/doc/postfix-2.6.6/samples

readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
myhostname = smtp.myserverdomain.com
mydomain = myserverdomain.com
mynetworks = 127.0.0.0/8 [::1]/128
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_use_tls = yes
smtpd_tls_security_level = may
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
relayhost =
mailbox_size_limit = 0
message_size_limit = 0
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
Postfix queue problem? murunix Server Operation 7 2nd May 2011 01:55
Odd Spam behaviour itsnedkeren Installation/Configuration 1 11th December 2010 14:20
Being Spammed/Hacked/Probed not sure PLEASE HELP! kresser General 10 29th October 2010 17:25
Sending emails with custom FROM email address merisor Installation/Configuration 4 8th February 2010 16:27
I am having problems with Email, and authenication savy2k General 10 14th January 2010 11:00


All times are GMT +2. The time now is 12:14.


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