println("250 " + (from = new Address(command.substring(10).trim())) + " is syntactically correct");
} else if (c.startsWith("RCPT TO:")) {
if (from == null) { println("503 MAIL FROM must precede RCPT TO"); continue; }
- command = command.substring(9).trim();
+ command = command.substring(8).trim();
if(command.indexOf(' ') != -1) command = command.substring(0, command.indexOf(' '));
Address addr = new Address(command);
InetAddress[] mx = getMailExchangerIPs(addr.host);
Log.setThreadAnnotation("[outgoing smtp] ");
Log.info(SMTP.Outgoing.class, "outgoing thread started; " + spool.count(Query.all()) + " messages to send");
while(true) {
- for(Mailbox.Iterator it = spool.iterator(); it.cur() != null; it.next())
+ for(Mailbox.Iterator it = spool.iterator(); it.next(); )
try { if (attempt(it.cur())) it.delete(); }
catch (IOException e) { Log.error(SMTP.Outgoing.class, e); }
synchronized(Outgoing.class) {