INVALID_ADDRESS - solution
Michael Redinger
Michael.Redinger@uibk.ac.at
Thu, 22 Mar 2001 15:00:11 +0100 (CET)
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I experienced the same problem as described in the Horde FAQ and the
folling mail to the IMP list:
http://faqchest.dynhost.com/prgm/imp-l/imp-00/imp-0012/imp-001205/imp00121111_17730.html
In less than 1 day of real business I got some of these mails.
As described this error is generated by the UW IMAP library.
I could find the following "addresses":
INVALID_ADDRESS@.SYNTAX-ERROR.
UNEXPECTED_DATA_AFTER_ADDRESS@.SYNTAX-ERROR.
MISSING_MAILBOX_TERMINATOR@.SYNTAX-ERROR.
The solution seems to be very obvious and even better for the user.
Just add one line (the one marked with "^^^^^" below) to horde.lib:
if (is_array($rcpt_arr) && count($rcpt_arr) > 0) {
$ob = $rcpt_arr[0];
$recipients = $ob->mailbox . '@' . $ob->host;
for ($i=1; $i<count($rcpt_arr); $i++) {
$ob = $rcpt_arr[$i];
if( $ob->host == ".SYNTAX-ERROR.") return false;
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
$recipients .= ' ' . $ob->mailbox . '@' . $ob->host;
}
}
_no_ mail is sent now, the user is still in the compose window and gets
a chance to correct this problem.
the current solution sends the mail to some of the recipients (the user will
probably correct the problem and resend the mail - so some of the recipients
get it twice) and produces a sendmail error which is far from ideal.
Chuck - would you accept this solution?
Michael
_______________________________________
Michael Redinger
Computer Centre University of Innsbruck
He deserves death.
Deserves it! I dare say he does. Many that live deserve death. And some that
die deserve life. Can you give it to them? Then do not be too eager to deal
out death in judgment. For even the very wise cannot see all ends.
-- The Lord of the Rings
-----BEGIN PGP SIGNATURE-----
Version: PGPfreeware 5.0i for non-commercial use
Charset: noconv
Filter: gpg4pine 4.0 (http://azzie.robotics.net)
iQA/AwUBOroFbg/XqdllwsEdEQLa9wCgkktVNbeVjHFLrS+Mqo5mmnvgIR8An347
2Hw6q3KQLnoWdFbThNENVgoo
=Xlzg
-----END PGP SIGNATURE-----