Tyme Out - Tyme to waste

Vacation Patch

How to Modify Sendmail vacation autoresponder to work with SpamAssAssin

This patch to vacation stops it from replying to any mail SpamAssassin flages as spam. This will greatly reduce backscatter spam from your system.


Start by installing SpamAssassin Milter
SpamAssassin Milter lets you check the spam status of a mail before Sendmail accepts the message.


Compiling Vacation

Download and compile Sendmail. You must actualy compile sendmail (even if its installed and working). Then patch and build vacation.c. running Build in the vacation dir will compile vacation. Next copy the vacation binary from the sendmail obj. directory to your /usr/bin directory.


you can use the patch file (sendmail 8.14.x)
You can hand patch vacation.c around line 582
    case 'X':
          cont = false;
          if (strlen(buf) <= 10 ||
              strncasecmp(buf, "X-Spam-Status", 13) != 0 ||
              (buf[13] != ':' && buf[13] != ' ' &&
	      buf[13] != '\t'))
		 break;
	      if ((p = strchr(buf, ':')) == NULL)
		 break;
	      while (*++p != '\0' && isascii(*p) && isspace(*p));
		if (*p == '\0')
		  break;
	      if (strncasecmp(p, "Yes", 3) == 0 ||
	      strncasecmp(p, "yes", 3) == 0)
                  EXITIT(EX_NOUSER);
                  break;
-end of patch>>>>
     case 'C':             /* "Cc:" */
     case 'c':
    			                  
    

If you get this message in your mail log when you run vacation -i "vacation: .vacation.db: Unknown database type" you did not compile sendmail with the correct options.

here is my site.config.m4
APPENDDEF(`confENVDEF', `-DNETINET6')
APPENDDEF(`confMAPDEF', `-DNEWDB -DSTARTTLS -DSASL=2 -DTCPWRAPPERS -DNIS -DMAP_REGEX -DSOCKETMAP')
APPENDDEF(`confLIBS', `-lnsl -lssl -lcrypto -lsasl2 -lwrap -lm -ldb -lresolv')
APPENDDEF(`conf_libmilter_ENVDEF', `-DMILTER')
APPENDDEF(`conf_sendmail_ENVDEF', `-DMILTER')
APPENDDEF(`conf_libmilter_ENVDEF', `-D_FFR_MILTER_ROOT_UNSAFE ')
APPENDDEF(`confENVDEF', `-DBROKEN_PTHREAD_SLEEP')
APPENDDEF(`confENVDEF', `-D_FFR_TLS_1')dnl