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.

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 main.cf file to allow this? I'm starting from the default.

Error:

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 = mothfox.com, localhost.com, , localhost
myhostname = mothfox.com
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/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 main.cf 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

2 Answers 2

For eg. If you are trying to receive mail for user@mothfox.com The error shows that you have listed your domain name (mothfox.com) 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

 
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.