Super User is a question and answer site for computer enthusiasts and power users. 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

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 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 = []:587

This is the error message from the log:

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

One interesting thing is when I use "sendmail" 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] AAF7313A7E: to=,[]: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
I am also facing similar issue. The error I see in /var/log/mail.log is Feb 3 22:57:29 vsempprdapp11 postfix/error[24019]: 327A4441481: to=<>, relay=none, delay=193633, delays=193632/1/0/0.01, dsn=4.3.0, status=deferred (unknown mail transport error) – swap.nil Feb 4 at 6:58

You must log in to answer this question.

Browse other questions tagged .