Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

In postfix, I'm using relay_host to send an email to an external address using sendgrid, but I get an error about local ricipient table when sending an email from my PHP code.

This is my main.cf in /postfix/

## -- Sendgrid
smtp_sasl_auth_enable = yes 
smtp_sasl_password_maps = static:username:password 
smtp_sasl_security_options = noanonymous 
smtp_tls_security_level = may 
header_size_limit = 4096000
relayhost = [smtp.sendgrid.net]:587

This is the error message from the log:

postfix/smtpd[53598]: [ID 197553 mail.info] NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 Recipient address rejected: User unknown in local recipient table; from=<help@mydomain.com> to=<john@mydomain.com> proto=ESMTP helo=<localhost.localdomain>

One interesting thing is when I use "sendmail john@mydomain.com" from the command line, the email is delivered successfully using SendGrid. I think it's because this uses postfix/smtp instead of postfix/smtpD

the log for this says,

postfix/smtp[18670]: [ID 197553 mail.info] AAF7313A7E: to=, relay=smtp.sendgrid.net[50.97.69.148]:587, delay=4.1, delays=3.5/0.02/0.44/0.18, dsn=2.0.0, status=sent (250 Delivery in progress)

Thank you

share|improve this question
    
Check your formatting please. You have to indent code by 4 spaces or press Ctrl-K for it to display correctly. –  slhck Oct 13 '12 at 8:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.