// Licensed under the Apache Public Source License 2.0 ("the License").
// You may not use this file except in compliance with the License.
-package org.ibex.mail.protocol;
-import org.ibex.mail.*;
+package org.ibex.mail;
import org.ibex.mail.target.*;
import org.ibex.util.*;
import org.ibex.net.*;
import javax.naming.*;
import javax.naming.directory.*;
+// Note: we can't actually use status codes for feedback if we accept
+// multiple destination addresses... a failure on one and success on
+// the other...
+
// FIXME: logging: current logging sucks
// FIXME: loop prevention
// FIXME: probably need some throttling on outbound mail
conn.println("250 message accepted");
conn.flush();
from = null; to = new Vector();
- } catch (Reject.RejectException re) {
+ } catch (MailException.Malformed mfe) { conn.println("501 " + mfe.toString());
+ } catch (MailException.MailboxFull mbf) { conn.println("452 " + mbf);
+ } catch (Script.Later.LaterException le) { conn.println("453 try again later");
+ } catch (Script.Reject.RejectException re) {
Log.warn(SMTP.class, "rejecting message due to: " + re.reason + "\n " + re.m.summary());
conn.println("501 " + re.reason);
- } catch (MailException.Malformed mfe) { conn.println("501 " + mfe.toString());
- } catch (MailException.MailboxFull mbf) { conn.println("452 " + mbf);
- } catch (Later.LaterException le) { conn.println("453 try again later");
}
} else { conn.println("500 unrecognized command"); }
} catch (Message.Malformed e) { conn.println("501 " + e.toString()); }