Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

My Postfix setup does not receive emails from anywhere other than the localhost (sendmail).

I can log in and send emails from my server, but nothing comes in.

Here is my postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
content_filter = amavis:[]:10024
disable_vrfy_command = yes
inet_interfaces = all
mailbox_size_limit = 0
message_size_limit = 0
mydestination =
mydomain =
mynetworks = [::ffff:]/104 [::1]/128
mynetworks_style = host
myorigin = /etc/mailname
readme_directory = no
receive_override_options = no_address_mappings
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_use_tls = yes
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject
smtpd_tls_cert_file = /etc/ssl/private/
smtpd_tls_key_file = /etc/ssl/private/
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = mysql:/etc/postfix/maps/
virtual_gid_maps = static:5000
virtual_mailbox_base = /var/spool/mail/virtual
virtual_mailbox_domains = mysql:/etc/postfix/maps/
virtual_mailbox_limit = 0
virtual_mailbox_maps = mysql:/etc/postfix/maps/
virtual_uid_maps = static:5000

And here is the error in the log

Jan  9 19:14:06 mail postfix/smtpd[2389]: connect from[]
Jan  9 19:14:07 mail postfix/smtpd[2389]: NOQUEUE: reject: RCPT from[]: 554 5.7.1 <>: Sender address rejected: Access denied; from=<> to=<> proto=ESMTP helo=<>
Jan  9 19:14:07 mail postfix/smtpd[2389]: disconnect from[]

Any advice?

share|improve this question
Ok, I have changed them back. – DuineAnaithnid Jan 9 '13 at 19:23
What are you trying to accomplish here with your setup? What is the context of this mail server? This server is clearly not accepting mail inbound because of its configuration. Current values to both smtpd_recipient_restrictions and smtpd_sender_restrictions are preventing you to receive anything other than local network connected hosts as well as authenticated users. – gertvdijk Jan 9 '13 at 19:26
I want to be able to receive mail from anywhere and only send mail from an authenticated user – DuineAnaithnid Jan 9 '13 at 19:32

This behaviour is created by the lines

smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject


mynetworks = [::ffff:]/104 [::1]/128

Don't (repeat don't) just remove reject!

I advise against running any publicly accessible mail server unless you are already experienced with managing those beasts. Run it within your network, use a small virtualization structure to get a feeling for the pitfalls and read.

One good source for instance is the Ubuntu Server Guide

share|improve this answer

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.