OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: How to customize error messages?

From: Magnus Bäck (magnusdsek.lth.se)
Date: Mon Jan 03 2005 - 12:05:46 CST


On Monday, January 03, 2005 at 17:21 CET,
     EchtLiebenswertaol.com wrote:

> Is there any way to customize error messages? e.g. if i try to send a mail
> like this: _nonexistingusermydomain_ (mailto:nonexistingusermydomain) my
> server replies:
>
> The original message was received at Mon, 3 Jan 2005 11:16:28 -0500 (EST)
> from rootlocalhost
>
> ... while talking to mydomain.:
> >>> RCPT To:<_nonexistingusermydomain_ (mailto:nonexistingusermydomain) >
> <<< 550 <_nonexistingusermydomain_ (mailto:nonexistingusermydomain) >:
> Recipient address rejected: User unknown in virtual mailbox table
> 550 <_nonexistingusermydomain_ (mailto:nonexistingusermydomain) >... User
> unknown

Note: This error message you were sent was not generated by Postfix.

> Final-Recipient: RFC822; _nonexistingusermydomain_
> (mailto:nonexistingusermydomain)
> Action: failed
> Status: 5.1.1
> Remote-MTA: DNS; mydomain
> Diagnostic-Code: SMTP; 550 _nonexistingusermydomain_
> (mailto:nonexistingusermydomain) : Recipient address rejected: User unknown in virtual mailbox table
> Last-Attempt-Date: Mon, 3 Jan 2005 11:16:40 -0500 (EST)
>
> Is there any way to change messages like "User unknown in virtual
> mailbox table" or _...rootlocalhost..._ (mailto:...rootlocalhost...)
> ... maybe just a blank email or a custom error message?

You can set

        show_user_unknown_table_name = no

to change the error message to just "User unknown", but otherwise it is
not configurable. If you're hell-bent on giving a custom error message
you can use check_recipient_access.

--
Magnus Bäck
magnusdsek.lth.se