diff spamass-milt/spamass-milter.cpp spamass-milt.orig/spamass-milter.cpp 70,71d69 < #include <sys/socket.h> < #include <arpa/inet.h> 120c118 < mlfi_connect, // connection info filter callback --- > NULL, // info filter callback 139,140d136 < bool override = false; < string authorized_host; 148c144 < const char *args = "p:fd:mr:u:o:D:"; --- > const char *args = "p:fd:mr:u:D:"; 178,181d173 < case 'o': < override = true; < authorized_host = strdup(optarg); < break; 191c183 < cout << "Usage: spamass-milter -p socket [-d nn] [-D host] [-f] [-m] [-r nn] [-u user] [-o host]" << endl; --- > cout << "Usage: spamass-milter -p socket [-d nn] [-D host] [-f] [-m] [-r nn] [-u user]" << endl; 201d192 < cout << " -o host: bypass SpamAssassin for connections from host."<< endl; 396,422d386 < // Gets called once for every new SMTP connection < // < // Bypasses SpamAssassin for connections from override host < // if so requested < // < sfsistat < mlfi_connect(SMFICTX* ctx, char * hostname, _SOCK_ADDR * hostaddr) < { < string debuginfo=string("mlfi_connect: ")+string(hostname); < debug(1, debuginfo.c_str()); < < // is this a connection from override host and we should < // bypass SpamAssassin? < int return_value = SMFIS_CONTINUE; < if (override && cmp_nocase_partial(authorized_host,string(hostname)) == 0) < { < debug(1, "mlfi_connect: SMFIS_ACCEPT"); < return_value = SMFIS_ACCEPT; < }; < < debug(1, "mlfi_connect: exit"); < < return return_value; < < }; < < // diff spamass-milt/spamass-milter.h spamass-milt.orig/spamass-milter.h 33d32 < sfsistat mlfi_connect(SMFICTX *, char *, _SOCK_ADDR *);