.include /usr/local/exim/bogus-virus-warning.acl acl_is_autoreply: # Detect auto-replies accept acl = acl_autoreply_headers deny acl = acl_is_bounce deny acl = acl_list_headers deny acl = acl_human_headers accept regex = This is an autoresponder. I'll never see your message. accept condition = ${if match {${lc:$h_subject:}}{(autoreply|re:|auto:)}{yes}{no}} deny acl_is_list: # Detect mailing lists accept condition = ${if def:acl_c7} condition = $acl_c7 deny condition = ${if def:acl_c7} accept !senders = : acl = acl_list_headers set acl_c7 = yes deny set acl_c7 = no acl_is_human: # Detect humans deny senders = : deny acl = acl_list_headers deny acl = acl_is_bounce deny acl = acl_autoreply_headers accept acl = acl_human_headers deny acl_is_bounce: # Detect automated return messages accept condition = ${if def:acl_c6} condition = $acl_c6 deny condition = ${if def:acl_c6} accept acl = raw_acl_is_bounce set acl_c6 = yes deny set acl_c6 = no raw_acl_is_bounce: deny senders = staff@hotmail.com:noreply@globessl.com:noreply@feedbackloop.yahoo.net deny acl = acl_list_headers deny acl = acl_autoreply_headers accept senders = : accept acl = acl_bounce_headers accept condition = ${if match {$h_precedence:}{(bulk|junk)}} accept condition = ${if match {${lc:$h_x-mailer:}}\ {(imail|microsoft cdo|novell groupwise internet agent|\ raidenmaild|superscout|mailing system|gwava)}} accept condition = ${if match {${lc:$sender_address_local_part}}\ {(mailer|daemon|dbmail|mail-server|\ warning|autorespon|nobody|noreply|server|proxy|\ gateway|relay|robot|virus)}} deny acl = acl_human_headers accept condition = ${if match {${lc:$sender_address_local_part}}\ {(postmaster|warning|sysadmin|\ root|smtp)}} accept condition = ${if match {${lc:$h_from:}}\ {(mailer|daemon|postmaster|warning|mail-server|\ administrator|sysadmin)}} deny acl_autoreply_headers: # Detect auto-replies accept condition = ${if def:h_x-autoresponse:} accept condition = ${if eqi {$h_auto-submitted:}{auto-replied}} accept condition = ${if eqi {$h_precedence:}{autoreply}} deny acl_human_headers: # Detect humans accept condition = ${if def:h_x-mailer:} !condition = ${if match {${lc:$h_x-mailer:}}\ {internet mail service}} accept condition = ${if def:h_user-agent:} accept condition = ${if def:h_priority:} # accept condition = ${if def:h_importance:} deny acl_list_headers: # Detect mailing lists accept condition = ${if eqi {$h_precedence:}{list}} accept condition = ${if def:h_list-id:} accept condition = ${if def:h_list-unsubscribe:} accept condition = ${if def:h_list-subscribe:} accept condition = ${if def:h_list-software:} accept condition = ${if def:h_mailing-list:} accept condition = ${if def:h_x-egroups-remote-ip:} accept condition = ${if def:h_x-lyris-type:} accept condition = ${if def:h_x-listmanager-type:} deny acl_bounce_headers: # Detect automated messages accept condition = ${if def:header_x-failed-recipients:} accept condition = ${if def:header_x-declude-sender:} accept condition = ${if eqi {$h_auto-submitted:}{failure}} accept condition = ${if eqi {$h_auto-submitted:}{auto-generated}} accept condition = ${if def:header_x-mb-message-source:} accept condition = ${if match {$h_content-type:}{multipart/report}} accept condition = ${if match {${lc:$h_x-loop:}}{email security warning}} deny acl_bad_bounce: # check Yahoo autoresponses deny condition = ${if match{$sender_address_domain}{yahoo}} condition = ${if match{$h_subject:}{(Yahoo !|Yahoo!)}} condition = ${if match{${lc:$message_body:}}\ {received: }} condition = ${if match{${lc:$message_body:}}\ {x-complains-to: abuse@ols.es }{no}{yes}} message = We do not accept bounces to messages \ not sent from here log_message = Bounce with bad headers # Accept non automated users accept !acl = acl_is_bounce # Accept non bounce subjects warn set acl_m7 = ${lc:$h_subject:} warn condition = ${if match {$h_subject:}{=\?utf-8\?}} set acl_m7 = ${lc:${from_utf8:$h_subject:}} accept condition = ${if match{${lc:$acl_m7}}\ {(report to sender|no such user|warn message|\ delivery (failure|problems|notification|system|\ failed|report|status|delay|error)|\ (mail|failed) delivery|\ message status|undeliverable|anexo proibido|\ failure (notice|delivery)|email rejected|\ disallowed attachment|policy violation|\ attachment too large|not been delivered|\ (returned|undelivered|failed) mail|autonotify:|\ delivering errors|warning: message|\ unknown user|user unknown|mail was rejected|\ your email message|mensaje fue rechazado|\ mms notification|re: status|panne|\ (mdaemon|mailserver) notification|\ (could not|cannot) be delivered)}\ {no}{yes}} deny condition = ${if match{${lc:$message_body:}}{received: }} condition = ${if match{${lc:$message_body:}}\ {x-complains-to: abuse@ols.es }{no}{yes}} !hosts = *.blackberry.com message = Message not sent from here, please bounce \ to the real sender log_message = Bounce with bad headers accept acl_virwarn: # Accept virustest tests accept senders = tester@testvirus.org # Accept mailing lists accept acl = acl_is_list # Reject virus warnings warn acl = bvw_data_acl warn condition = ${if > {$acl_m7}{0}} add_header = X-OLS-Security: OK - $acl_m7 bogus virwarn points deny condition = ${if >= {$acl_m7}{13000}} set acl_m7 = $acl_m7 points accept