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 want my mailserver to send mail from my local application "from" any user supplied email address "to" my own address, say "". The MX records for "" actually point to a different server, even though the outgoing mainserver is running with mydomain set as "". Perhaps this is part of the problem?

postfix is currently causing a SMTPRecipientsRefused error within the python application. Can anyone point me to what to change in the configuration?


postconf -n:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
mydestination =,, , localhost, *
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_use_tls = yes
share|improve this question
You might need to add the output of postconf -n to your question. The mynetworks setting is the one I suspect isn't right. – Ladadadada Nov 15 '12 at 10:11
Added output, thanks – Jon Nov 15 '12 at 10:22

Your current mynetworks only allows the local machine to relay email. It doesn't allow any other machines on the network to send emails (although it will still accept emails that it can deliver locally).

If your web box is not the same machine as your mail box, you will need to add your local network or the specific boxes to mynetworks.

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


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

or something like that.

share|improve this answer

You have set

mydestination =,

So server tries to deliver it locally and probably recipient does not exist there.

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.