# Exim filter # based on Exim filter ## Version: 0.10 # # touch /var/log/exim/filterlog # chown mailnull /var/log/exim/filterlog # chgrp mail /var/log/exim/filterlog # chmod 640 /var/log/exim/filterlog # logfile /var/log/exim/filterlog #logwrite "$tod_log $message_exim_id - processed" # # Only run any of this stuff on the first pass through the # filter - this is an optimisation for messages that get # queued and have several delivery attempts # # we express this in reverse so we can just bail out # on inappropriate messages # ifdef(`confM4_DIR', `', `define(`confM4_DIR', `../m4')')dnl ifdef(`confSYSTEMFILTERS_DIR', `', `define(`confSYSTEMFILTERS_DIR', `.')')dnl include(confFEATURES_DIR`/cfhead.m4')dnl include(confM4_DIR`/conf.default')dnl include(confSITE_DIR/`conf')dnl define(`SECTION', `SYSTEM_FILTER')dnl sinclude(confSITE_DIR`/system_filter_top')dnl ifdef(`confANTIVIRUS_SAVE_BACKUP', `ifelse(confANTIVIRUS_SAVE_BACKUP, `YES', `dnl ifdef(`confMAIL_BACKUP', `ifelse(confMAIL_BACKUP, `SYSTEM_FILTER', ` if first_delivery then include(confSITE_DIR`/system_filter_backup')dnl endif ')') ')') ifdef(`confANTIVIRUS0_ACT', `dnl include(confSYSTEMFILTERS_DIR`/system_filter_quarantine_infected.m4')dnl ') ifdef(`confANTIVIRUS_SAVE_BACKUP', `ifelse(confANTIVIRUS_SAVE_BACKUP, `NO', `dnl ifdef(`confMAIL_BACKUP', `ifelse(confMAIL_BACKUP, `SYSTEM_FILTER', ` if first_delivery then include(confSITE_DIR`/system_filter_backup')dnl endif ')') ')') if not first_delivery then finish endif undefine(`_SPAMASSASSIN_') ifelse_strstr(confCONTENT_SCANNING, `SPAMASSASSIN', `define(`_SPAMASSASSIN_')') ifelse_strstr(confCONTENT_SCANNING, `DLFUNC_SPAMD', `define(`_SPAMASSASSIN_')') ifdef(`_SPAMASSASSIN_', ` ifelse_strstr(confSPAMASSASSIN_ACTION, `QUARANTINE', `include(confSITE_DIR`/system_filter_quarantine_content_scaned')') ', ` ifelse_strstr(confCONTENT_SCANNING, `DSPAM', ` ifelse_strstr(confDSPAM_ACTION, `QUARANTINE', `include(confSITE_DIR`/system_filter_quarantine_content_scaned')') ', ` ifelse_strstr(confCONTENT_SCANNING, `KAS3', ` ifelse_strstr(confKAS3_ACTION, `QUARANTINE', `include(confSITE_DIR`/system_filter_quarantine_content_scaned')') ') dnl ifelse_strstr(confCONTENT_SCANNING, `KAS3', `') ') dnl ifelse_strstr(confCONTENT_SCANNING, `DSPAM', `') ') dnl ifdef(`_SPAMASSASSIN_', `') ifelse(confSYSTEM_FILTER_WARNINGS_AGE, `0', `', ` include(confSITE_DIR`/system_filter_quarantine_quarantined') ') if error_message then finish endif ifelse(confSYSTEM_FILTER_WARNINGS_AGE, `0', `', ` include(confSITE_DIR`/system_filter_quarantine_warned') ') sinclude(confSITE_DIR`/system_filter_bottom')dnl finish