Skip to content
Andreas Vögele edited this page Dec 29, 2021 · 9 revisions

Perl Modules

A list of Perl modules for use with Exim's embedded Perl interpreter.

Mail::Exim::Blacklist::Attachments

The Perl module Mail::Exim::Blacklist::Attachments checks email attachments and Zip archives for blacklisted filenames. The module blacklists filenames that are blocked by Outlook, that belong to macro-enabled Office documents or that are associated with 7-Zip.

acl_check_mime:
 
  warn
    condition = ${if and{{def:mime_filename} \
      {!match{${lc:$mime_filename}}{\N\.((json|xml)\.gz|zip)$\N}} \
      {eq{${perl{check_filename}{$mime_filename}}}{blacklisted}}}}
    set acl_m_blacklisted = yes
 
  warn
    condition = ${if match{${lc:$mime_filename}}{\N\. *(jar|zip)$\N}}
    decode = default
    condition = ${if eq{${perl{check_zip}{$mime_decoded_filename}}} \
                       {blacklisted}}
    set acl_m_blacklisted = yes

Mail::Exim::Blacklist::Geolocation

The Perl module Mail::Exim::Blacklist::Geolocation maps IP addresses to two-letter country codes such as "DE", "FR" and "US". SpamAssassin can use these country codes to filter junk e-mail.

acl_check_rcpt:
 
  warn
    domains = +local_domains : +relay_to_domains
    set acl_m_country_code = ${perl{country_code}{$sender_host_address}}
    add_header = X-Sender-Host-Country: $acl_m_country_code

Clone this wiki locally