Server Fault is a question and answer site for system and network administrators. 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 have postfix installed with dovecot. There are no problems when I'm trying to send e-mails from my server, however all e-mails that are coming in are rejected.

My file:

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix

mail_owner = postfix
inet_interfaces = all

mydestination = localhost, $mydomain, /etc/postfix/domains/domains
virtual_maps = hash:/etc/postfix/domains/addresses

unknown_local_recipient_reject_code = 550
mynetworks =

alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
home_mailbox = Maildir/

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_type = dovecot
smtpd_sasl_path = private/auth
smtpd_sasl_auth_enable = yes
smtpd_recipient_restrictions = check_policy_service inet:,
smtpd_sender_restriction = reject_non_fqdn_sender
broken_sasl_auth_clients = yes

UPDATE: Now, when e-mail comes to the server, the server tries to reroute the mail. Example, if the message was sent to, my server changes that to john@HOSTNAME.localhost and then the mail bounces because there's no such domain on my server.

share|improve this question
I'm having this problem right now, did you ever get this solved? – Cayetano Gonçalves Feb 7 '12 at 0:42
Hey! Sorry for a late reply. No, unfortunately I wasn't able to solve it, and because time was a constraint at that time I just switched to sendmail. – Primoz Sep 12 '12 at 11:20

From the configuration posted, I can't see a $myhostname or a $mydomain - if that's the case in, it will only treat @localhost as local and everything else will be rejected with 550. You can send out as you are sasl authenticated.

Add $mydomain = and it should work.

share|improve this answer
I have multiple domains on this server, and I'd like to enable mail on all of them. Can I list multiple domains in $mydomain? – Primoz Aug 25 '10 at 17:53
Do: mydestination = localhost, $mydomain, /etc/postfix/virtual_domains And then list each domain on a separate line inside that file. – James L Aug 25 '10 at 21:50
I posted the updated file. I've also added virtual_maps statement, following a guide on virtual domains. The virtual map file contains all my domains and maps existing e-mail addresses. – Primoz Aug 26 '10 at 12:17

Your Answer


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.