if (!m.envelopeTo.isLocal()) Outgoing.accept(m);
else Target.root.accept(m);
}
- if (m != null) Log.error(SMTP.class, "accepted message: " + m.summary());
+ if (m != null) Log.info(SMTP.class, "accepted message: " + m.summary());
conn.println("250 message accepted");
conn.flush();
from = null; to = new Vector();
private static final HashSet deadHosts = new HashSet();
public static void accept(Message m) throws IOException {
- Log.error("[outgoing]", "accept():\n" + m.summary());
+ Log.info(SMTP.class, "queued:\n" + m.summary());
if (m.traces.length >= 100)
Log.warn(SMTP.Outgoing.class, "Message with " + m.traces.length + " trace hops; dropping\n" + m.summary());
else synchronized(Outgoing.class) {
conn.println(m.toString());
conn.println(".");
check(conn.readln());
- Log.info(SMTP.Outgoing.class, "message accepted by " + mx);
+ Log.info(SMTP.Outgoing.class, "success: message accepted by " + mx);
accepted = true;
conn.close();
} catch (Exception e) {
Log.warn(SMTP.Outgoing.class, "unable to send; error=" + e);
Log.warn(SMTP.Outgoing.class, e);
return false;
- } finally { Log.setThreadAnnotation("[outgoing smtp] "); }
+ }
return accepted;
}
public synchronized void add(Message message) { add(message, Mailbox.Flag.RECENT); }
public synchronized void add(Message message, int flags) {
- Log.error(this, "adding message to ["+toString()+"]:\n" + message.summary());
+ Log.info(this, "adding message to ["+toString()+"]:\n" + message.summary());
try {
int num = new File(path).list(filter).length;
String name = path + slash + uidNext(true) + "." +
message.dump(new Stream(fo));
fo.close();
f.renameTo(target);
- Log.error(this, " done writing to " + target);
} catch (IOException e) { throw new MailException.IOException(e); }
}
public synchronized void accept(Message m) throws IOException, MailException {
this.m = m;
try {
- Log.error(this, "invoking config...");
+ Log.info(this, "invoking config...");
Object ret = js.call(m, null, null, null, 1);
- Log.error(this, "config returned " + ret);
+ Log.info(this, "config returned " + ret);
if (ret == null) throw new IOException("configuration script returned null");
if (ret instanceof Target) ((Target)ret).accept(m);
//else if (ret instanceof Filter) ((Filter)ret).process(m);