Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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

On my website, I allow users to enter their email and a message. My website then generates an email FROM them TO myself, which is passed along to my email provider. (The reason for this is so that it's easy to reply.)

However, postfix does not allow this by default.

Does anyone know how to modify the file to allow this? I'm starting from the default.


Recipient address rejected: User unknown in local recipient table

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 (Ubuntu)
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

I think somehow I need to filter based on IP, rather than on domain...

share|improve this question
Please post your and the error message you get. Your question doesnt convey any required info – clement Aug 7 '13 at 7:13
Updated question sorry about that. – user184701 Aug 7 '13 at 7:20
Just add output of the "# postconf -n" to the question – ALex_hha Aug 7 '13 at 7:26

For eg. If you are trying to receive mail for The error shows that you have listed your domain name ( under mydestination, but user is not specified in your local_recipient_maps. Please check the answer section here. 554 5.7.1 Relay access denied This will help you.

share|improve this answer

I'd say this is really a wrong way to solve such problems. SMTP was supposed to acquire and check incoming mail, not for spoofing local messages.

I see you are using procmail to filter messages. Why not just talk directly to procmail without touching postfix?

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.