log.error("post of message from `" + sender + "' failed:\n" + ExceptionUtils.stackTrace(e));
if (sender != null) { log.error("post of message from `" + sender + "' failed:\n" + ExceptionUtils.stackTrace(e)); } else { log.error("post of message failed before user established:\n" + ExceptionUtils.stackTrace(e)); }
  public void run() {    try {      output("220 " + smtpIdentifier + " SMTP");      for (;;) {        String command = fromClient.readLine().trim();        if (command.regionMatches(true, 0, "HELO", 0, 4))          output("250 " + smtpIdentifier);        else if (command.regionMatches(true, 0, "MAIL FROM:", 0, 10))          mailFrom(command.substring(10).trim());        else if (command.regionMatches(true, 0, "RCPT TO:", 0, 8))          rcptTo(command.substring(8).trim());        else if (command.regionMatches(true, 0, "DATA", 0, 4))          data();        else if (command.regionMatches(true, 0, "RSET", 0, 4)) {          reset();          output("250 Reset state");        } else if (command.regionMatches(true, 0, "QUIT", 0, 4)) {          output("221 " + smtpIdentifier + " closing connection");          break;        }        // does it matter that we don't do VRFY?        else          output("500 Command unrecognized: \"" + command + "\"");      }    } catch (Exception e) {      output("554 Sorry: something is wrong with this server---"           + StringUtils.tr(e.toString(), "\n\r", "  "));      log.error("post of message from `" + sender + "' failed:\n"          + ExceptionUtils.stackTrace(e));    } finally {      try {        reset();        withClient.close();      } catch (Exception e) {        ; // Already reported the significant exception      }    }  }