Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I am using Dovecot with Postfix and virtual user/mailboxes.

Everything works fine accepting receiving mail from outside (other domains named as the mailserver)

I am able to: - send mail from my mail client from user1@example.com to user2@example.com and vice versa. - Send mail from my mail client from user1@example.com to anybody@anydomain.com.

BUT I can not receive mail from 'anybody@anydomain.com'.

My configuration of /etc/postfix/main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
mail_owner = postfix
unknown_local_recipient_reject_code = 550
alias_maps = hash:/etc/postfix/aliases
alias_database = $alias_maps

inet_interfaces = all
inet_protocols = ipv4
mydestination = $myhostname, localhost.$mydomain, localhost

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

relay_domains = *
virtual_alias_maps=hash:/etc/postfix/vmail_aliases
virtual_mailbox_domains=hash:/etc/postfix/vmail_domains
virtual_mailbox_maps=hash:/etc/postfix/vmail_mailbox

virtual_mailbox_base = /var/vmail
virtual_minimum_uid = 2222
virtual_transport = virtual
virtual_uid_maps = static:2222
virtual_gid_maps = static:2222

smtpd_sasl_auth_enable = yes
smtpd_sasl_type = dovecot
smtpd_sasl_path = /var/run/dovecot/auth-client
smtpd_sasl_security_options = noanonymous
smtpd_sasl_tls_security_options = $smtpd_sasl_security_options
smtpd_sasl_local_domain = $mydomain
broken_sasl_auth_clients = yes

smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination 


Postmaster delivery failure:

This is an automatically generated Delivery Status Notification.

Delivery to the following recipients failed.

      username@domain.com

Reporting-MTA: dns;cpsmtpb-ews02.kpnxchange.com
Received-From-MTA: dns;cpsps-ews25.kpnxchange.com
Arrival-Date: Tue, 11 Feb 2014 13:51:27 +0100

Final-Recipient: rfc822;username@domain.com
Action: failed
Status: 5.5.0
Diagnostic-Code: smtp;550-5.1.1 The email account that you tried to reach does not exist. Please try
550-5.1.1 double-checking the recipient's email address for typos or
550-5.1.1 unnecessary spaces. Learn more at
550 5.1.1 http://support.google.com/mail/bin/answer.py?answer=6596 x7si31977190eef.177 - gsmtp

for 2 other mail adresses I even didn't gat a failure notice.

Thanks in advance!

share|improve this question

1 Answer 1

You should probably remove reject_unauth_destination from your smtpd_recipient_restrictions, as you have already configured it to do so under smtpd_relay_restrictions, and as the postfix manual says:

 # reject_unauth_destination is not needed here if the mail
 # relay policy is specified under smtpd_relay_restrictions
 # (available with Postfix 2.10 and later)

That said, you might want to put in permit_auth_destination in it's place, though I would comment out the relay_domains = * line first.. I'm not sure if that is valid syntax, but it would be saying that any mail it gets will be forwarded on to whatever you have set up as your relay_transport (google server it seems)..

share|improve this answer
    
Thank you! yes I guess it has something to do with Google! I will test asap and let you know about it! :) thnaks a lot (you get the credits after I tested) –  user968898 Feb 12 at 16:34

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.