Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I try to configure Postfix on CentOs 6. I can send mails from the server just fine, but cannot receive.

The Delivery Status Notification that I get is:

The error that the other server returned was:
550 5.1.1 <user@mydomain.com>: Recipient address rejected:
User unknown in virtual alias table

I have used this tutorial to setup postfix.
The content of /etc/postfix/main.cf file is:

soft_bounce             = no
queue_directory         = /var/spool/postfix
command_directory       = /usr/sbin
daemon_directory        = /usr/libexec/postfix
mail_owner              = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
#default_privs = nobody

myhostname              = mail.mydomain.com 
mydomain                = mydomain.com

mydestination           = $myhostname, localhost
unknown_local_recipient_reject_code = 550

mynetworks_style        = host
mailbox_transport       = lmtp:unix:/var/lib/imap/socket/lmtp
local_destination_recipient_limit       = 300
local_destination_concurrency_limit     = 5

virtual_alias_maps      = hash:/etc/postfix/virtual

header_checks           = regexp:/etc/postfix/header_checks
mime_header_checks      = pcre:/etc/postfix/body_checks
smtpd_banner            = $myhostname

debug_peer_level        = 2
debugger_command =
         xxgdb $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.3.3/samples
readme_directory        = /usr/share/doc/postfix-2.3.3/README_FILES

smtpd_sasl_auth_enable          = yes
smtpd_sasl_application_name     = smtpd
smtpd_recipient_restrictions    = permit_sasl_authenticated,
                                  reject_rbl_client zen.spamhaus.org,
                                  reject_rbl_client bl.spamcop.net,
                                  reject_rbl_client dnsbl.njabl.org,
                                  reject_rbl_client dnsbl.sorbs.net,

smtpd_sasl_security_options     = noanonymous
smtpd_sasl_local_domain         = 
broken_sasl_auth_clients        = yes

smtpd_helo_required             = yes 

The content of /etc/postfix/virtual file is:

user@mydomain.com   mydomain.com/user

In /var/log/maillog I don't see any information about this problem.
I am new to Linux, and I would like to know how to debug or how can I fix this issue.
Any help will be appreciated

share|improve this question
first of all you need to have working dns, second you need to have working email created on your domain .. – klerk Feb 9 '14 at 22:32
@vladeli I think that DNS records are all right. host -t MX mydomain.com points to mail.mydomain.com and host -t A mail.mydomain.com points to my server IP. About what that you say "you need to have working email created on your domain" - what do you mean? – s976 Feb 9 '14 at 22:55
Does the unix user "user" exist? Or is it defined in the virtual alias table to map to some user? What docs have you tried that didn't give the expected result? – Marki Feb 9 '14 at 23:16
@Marki Yes it is. I can see this user in /etc/passwd. I deal with this problem for two days, I went through a few instructors. Meanwhile, nothing helps. – s976 Feb 9 '14 at 23:26
If there are no logs of your attempts and you believe logging is alright and you know where and how to look, then only one thing remains: mails are not arriving at your server. So go check everything from the beginning. Dns, ips, services, hell use tcpdump on port 25 to see what's happening if you must. – Marki Feb 10 '14 at 11:19

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.