[dev] Custom Message "Message could not be delivered" during recipient failure

Michael M Slusarz slusarz at horde.org
Mon Dec 22 18:18:14 UTC 2014


Quoting Kambey L. Kisambu <kambeylk at gmail.com>:

> Hi,I'm using postfix and horde in my mail server setup.On sending
> email, the local recipients database  table lookup take place and if
> the user is not available, it gives the error notice and unable to
> send such email.This is a good idea if the recipient is only one, but
> if i have varieties of recipients I'm getting trouble to identify the
> unknown user.How can i customize the notification message to popup
> with the email address claimed to be unknown?From the Horde logs i can
> see the following:-...HORDE: [imp] Message could not be delivered -
> the address was not found, is unknown, or is not receiving messages.
> <demo at domain.co.tz <demo at demo.co.tz>>: Recipient address rejected:
> User unknown in virtual mailbox table [pid 19952 on line 1150 of
> "/var/www/htdocs/horde/imp/lib/Compose.php"]But the horde popup
> message is only "Message could not be delivered - the address was not
> found, is unknown, or is not receiving messages."

There is not currently a way to handle this in the SMTP library.  It  
would be necessary to change the code to map the various RCPT TO  
commands to the responses to do this.

The SMTP error text itself is irrelevant since there is absolutely no  
guarantee it will show any useful information on any given server.

You could add a hook to do this local mailbox verification in IMP  
where you can catch these cases though.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the dev mailing list