+ /* For users who have authenticated to this server we never want to
+ * apply spam filtering, because presumably they're trustworthy.
+ */
+ if (CC->logged_in) return(0);
+
+ /* See if we have any SpamAssassin hosts configured */
+ num_sahosts = get_hosts(sahosts, "spamassassin");
+ if (num_sahosts < 1) return(0);
+
+ /* Try them one by one until we get a working one */
+ for (sa=0; sa<num_sahosts; ++sa) {
+ extract(buf, sahosts, sa);
+ lprintf(9, "Connecting to SpamAssassin at <%s>\n", buf);
+ sock = sock_connect(buf, SPAMASSASSIN_PORT, "tcp");
+ if (sock >= 0) lprintf(9, "Connected!\n");
+ if (sock >= 0) break;
+ }