auto-whitelist people we send email to
authoradam <adam@megacz.com>
Sat, 17 Mar 2007 09:02:02 +0000 (09:02 +0000)
committeradam <adam@megacz.com>
Sat, 17 Mar 2007 09:02:02 +0000 (09:02 +0000)
darcs-hash:20070317090202-5007d-6e2c236e71c53be11d449d56e747efd9d37fcac3.gz

src/org/ibex/mail/SMTP.java

index bf162fb..eed1a31 100644 (file)
@@ -185,6 +185,11 @@ public class SMTP {
                     } else if (conn.getRemoteAddress().isLoopbackAddress() || (from!=null&&from.toString().indexOf("johnw")!=-1)) {
                         conn.println("250 you are connected locally, so I will let you send");
                         to.addElement(addr);
+                        whitelist.addWhitelist(addr);
+                    } else if (authenticatedAs!=null) {
+                        conn.println("250 you are authenticated as "+authenticatedAs+", so I will let you send");
+                        to.addElement(addr);
+                        whitelist.addWhitelist(addr);
                     } else {
                         conn.println("535 sorry, " + addr + " is not on this machine, you are not connected from localhost, and I will not relay without SMTP AUTH");
                         Log.warn("","535 sorry, " + addr + " is not on this machine, you are not connected from localhost, and I will not relay without SMTP AUTH");