I have page on my site which sends out e-mails to all of our clients. The idea is that if a client''s e-mail bounces, the server catches the bounce message and flags the client (from the Rails Recipes book). This works perfectly, except in the event that the destination domain is my own. Since I''m running my own postfix server on the same box, instead of accepting the message and then returning an error report, it immediately throws the following error in my controller: Net:SMTPFatalError 550 <blah@blah.com>: Recipient address rejected: User unknown in local recipient table Is this something I can change on my server to allow an actual report to be emailed back, or do I need to handle this error separately (and how would I do that?).
Peter De Berdt
2006-Apr-28 14:39 UTC
[Rails] ActionMailer - 550 Error - Net:SMTPFatalError
On 28 Apr 2006, at 16:00, Dylan Markow wrote:> I have page on my site which sends out e-mails to all of our > clients. The idea is that if a client''s e-mail bounces, the server > catches the bounce message and flags the client (from the Rails > Recipes book). > > This works perfectly, except in the event that the destination > domain is my own. Since I''m running my own postfix server on the > same box, instead of accepting the message and then returning an > error report, it immediately throws the following error in my > controller: > > Net:SMTPFatalError > > 550 <blah@blah.com>: Recipient address rejected: User unknown in > local recipient table > > Is this something I can change on my server to allow an actual > report to be emailed back, or do I need to handle this error > separately (and how would I do that?).From the Postfix site: Configuring local_recipient_maps in main.cf The local_recipient_maps parameter specifies lookup tables with all names or addresses of local recipients. A recipient address is local when its domain matches $mydestination, $inet_interfaces or $proxy_interfaces. If a local username or address is not listed in $local_recipient_maps, then the Postfix SMTP server will reject the address with "User unknown in local recipient table". The default setting, shown below, assumes that you use the default Postfix local(8) delivery agent for local delivery, where recipients are either UNIX accounts or local aliases: /etc/postfix/main.cf: local_recipient_maps = proxy:unix:passwd.byname $alias_maps To turn off unknown local recipient rejects by the SMTP server, specify: /etc/postfix/main.cf: local_recipient_maps That is, an empty value. With this setting, the Postfix SMTP server will not reject mail with "User unknown in local recipient table". More info at http://www.postfix.org/LOCAL_RECIPIENT_README.html Best regards Peter De Berdt
On Apr 28, 2006, at 7:00 AM, Dylan Markow wrote:> I have page on my site which sends out e-mails to all of our > clients. The idea is that if a client''s e-mail bounces, the server > catches the bounce message and flags the client (from the Rails > Recipes book). > > This works perfectly, except in the event that the destination > domain is my own. Since I''m running my own postfix server on the > same box, instead of accepting the message and then returning an > error report, it immediately throws the following error in my > controller: > > Net:SMTPFatalError > > 550 <blah@blah.com>: Recipient address rejected: User unknown in > local recipient table > > Is this something I can change on my server to allow an actual > report to be emailed back, or do I need to handle this error > separately (and how would I do that?).This would be a question for the Postfix list. :-) Robby Robby Russell Founder & Executive Director PLANET ARGON, LLC Ruby on Rails Development, Consulting & Hosting www.planetargon.com www.robbyonrails.com +1 503 445 2457 +1 877 55 ARGON [toll free] +1 815 642 4968 [fax]
Beautiful!! That fixed it! Thanks a ton On Apr 28, 2006, at 7:23 AM, Peter De Berdt wrote:> > On 28 Apr 2006, at 16:00, Dylan Markow wrote: > >> I have page on my site which sends out e-mails to all of our >> clients. The idea is that if a client''s e-mail bounces, the server >> catches the bounce message and flags the client (from the Rails >> Recipes book). >> >> This works perfectly, except in the event that the destination >> domain is my own. Since I''m running my own postfix server on the >> same box, instead of accepting the message and then returning an >> error report, it immediately throws the following error in my >> controller: >> >> Net:SMTPFatalError >> >> 550 <blah@blah.com>: Recipient address rejected: User unknown in >> local recipient table >> >> Is this something I can change on my server to allow an actual >> report to be emailed back, or do I need to handle this error >> separately (and how would I do that?). > > > From the Postfix site: > > Configuring local_recipient_maps in main.cf > The local_recipient_maps parameter specifies lookup tables with all > names or addresses of local recipients. A recipient address is > local when its domain matches $mydestination, $inet_interfaces or > $proxy_interfaces. If a local username or address is not listed in > $local_recipient_maps, then the Postfix SMTP server will reject the > address with "User unknown in local recipient table". > > The default setting, shown below, assumes that you use the default > Postfix local(8) delivery agent for local delivery, where > recipients are either UNIX accounts or local aliases: > > /etc/postfix/main.cf: > local_recipient_maps = proxy:unix:passwd.byname $alias_maps > To turn off unknown local recipient rejects by the SMTP server, > specify: > > /etc/postfix/main.cf: > local_recipient_maps > That is, an empty value. With this setting, the Postfix SMTP server > will not reject mail with "User unknown in local recipient table". > > > > More info at http://www.postfix.org/LOCAL_RECIPIENT_README.html > > > > Best regards > > Peter De Berdt > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >