OpenBSD Handbook

    Theme
    • Part I. Install & Configure
      • Introduction to OpenBSD
      • Installing OpenBSD
      • The X Window System
      • Networking on OpenBSD
      • System Configuration
      • OpenBSD Basics
      • Managing Software: Packages and Ports
    • Part II. Daily Operations
      • OpenBSD Desktop Environments
      • Multimedia
      • Printing
      • Linux Compatibility
      • Windows Compatibility
      • Games
    • Part III. System Administration
      • Virtualization
      • Storage and File Systems
      • Updating and Upgrading
      • Localization
      • The OpenBSD Boot Process
      • Security
    • Part IV. Networking & Daemons
      • Services
        • Database
          • MariaDB
          • PostgreSQL
          • Redis
          • memcached
        • Directory
          • YP (NIS)
          • LDAP
        • File
          • NFS
          • Samba
        • FTP Services
          • ftpd
          • ProFTPD
          • vsftpd
          • Pure-FTPd
          • TFTP
        • Mail
          • OpenSMTPD Mail Server
          • Dovecot IMAP and POP3 Server
          • Postfix
          • Exim
          • Rspamd
        • Name
          • Unbound DNS Resolver
          • NSD Authoritative DNS Server
          • BIND DNS Server
        • Networking
          • OpenBGPD
          • rad
          • DHCP on OpenBSD
          • slaacd
        • Web
          • Apache HTTP Server
          • nginx Web Server
          • OpenBSD httpd Web Server
          • relayd Reverse Proxy
        • Logging
          • syslogd
        • Monitoring
          • SNMP
        • Remote Access
          • Audit OpenSSH
          • OpenSSH Server
        • File Synchronization
          • rsync
        • Messaging
          • RabbitMQ Message Broker
        • Time
          • NTP Time Synchronization
      • PF
        • pfctl cheat sheet
        • PF Anchors
        • PF Filter Rules
        • PF Forwarding
        • PF Lists and Macros
        • PF Load Balancing
        • PF Logging
        • PF NAT
        • PF Options
        • PF Policies
        • PF Shortcuts
        • PF Tables
      • Advanced Networking
        • High Availability and State Replication
        • Multi-WAN and Policy-Based Routing
        • VPN and Cryptographic Tunneling
        • Classic and Lightweight Tunnels
        • IPv6 at Scale
        • QoS and Traffic Shaping
        • MPLS and Label Distribution
        • Network Services at Scale
        • Virtualization and Host Networking
        • Large-Scale L2 and L3 Design
        • Telemetry, Logging, and Flow Export
        • Hardening and Operational Safety
        • Reference Architectures
        • Troubleshooting Playbooks
      • Serial Communication
    • Part V. Miscellaneous
      • Virtualization Cheat Sheet
      • OpenBSD Cheatsheet
      • How-to Guides
        • Complete the First 30 Minutes After Installation
        • Check Hardware Compatibility Before Installing
        • Bootstrap Wi-Fi Firmware Without Ethernet
        • Set Up OpenBSD as a Laptop or Workstation
        • Configure Laptop Power Management
        • Run OpenBSD as a Virtual Machine Guest
        • Install OpenBSD on a VPS or Cloud Server
        • Install OpenBSD with Full-Disk Encryption
        • Troubleshoot Web Browsers on OpenBSD
        • Create an Administrator Account with doas and SSH Keys
        • Establish a Conservative Security Baseline
        • Manage OpenBSD with Ansible
        • Recover Access and Reset the Root Password
        • Collect OpenBSD Diagnostic Evidence
        • Configure Secure Remote Access with OpenSSH
        • Set Up WordPress on OpenBSD
        • Build Third-Party Software from Ports
        • Use FIDO Security Keys with OpenSSH
        • Build OpenBSD from Source
        • Configure Wi-Fi Roaming and Wired Failover
        • Dual-Boot OpenBSD on a UEFI System
        • Troubleshoot PF, NAT, and Routing
        • Automate OpenBSD Installation with Autoinstall and PXE
        • Route Multiple VLANs with PF
        • Configure a Road-Warrior WireGuard VPN
        • Troubleshoot Package Installation and Update Failures
        • Route IPv6 Networks without NAT
        • Schedule Recurring Maintenance
        • Plan a Docker Workload Migration to OpenBSD
        • Build a Mail Server with OpenSMTPD, Dovecot, and Rspamd
        • Build a Simple Router and Firewall
        • Monitor an OpenBSD System
        • Back Up and Restore an OpenBSD System
        • Configure softraid RAID1
        • Recover an OpenBSD System That Does Not Boot
        • Install Z shell (zsh)
      • OpenBSD for Linux Users
      • OpenBSD for FreeBSD Users
      • OpenBSD for macOS Users
    • OpenBSD FAQ
    • OpenBSD Architectures
      • OpenBSD Package Search

        mimedefang-3.7.1

        Package search / Categories / Current snapshot
        โ† Back to search
        OpenBSD branch
        OpenBSD 8.0 releaseCurrent snapshot

        Current snapshot ยท amd64

        mailfilter to identify and mark spam

        Project homepage: https://www.mimedefang.org/

        Description

        MIMEDefang is a framework for filtering e-mail. It uses Sendmail's "Milter" API, some C glue code, and some Perl code to let you write high-performance mail filters in Perl. People use MIMEDefang to: - Block viruses - Block or tag spam - Remove HTML mail parts - Add boilerplate disclaimers to outgoing mail - Remove or alter attachments - Replace attachments with URL's - Implement sophisticated access controls. You're limited only by your imagination. If you can think of it and code it in Perl, you can do it with MIMEDefang.

        Package information

        Ports path
        mail/mimedefang
        Package architecture
        amd64
        Maintainer
        Giovanni Bechis <giovanni@openbsd.org>
        Categories
        mail
        Available flavors
        None listed

        Ports list build and test dependencies as well as runtime dependencies. pkg_add selects those needed for installation.

        Direct dependencies

        Library

        • mail/sendmail,-libmilter

        Runtime

        • mail/p5-Mail-Tools
        • mail/p5-MIME-tools
        • security/p5-Crypt-OpenSSL-Random
        • security/p5-IO-Socket-SSL
        • sysutils/p5-Unix-Syslog
        • archivers/p5-Archive-Zip
        • www/p5-HTML-Parser

        Build

        • mail/p5-Mail-Tools
        • mail/p5-MIME-tools
        • security/p5-Crypt-OpenSSL-Random
        • security/p5-IO-Socket-SSL
        • sysutils/p5-Unix-Syslog
        • archivers/p5-Archive-Zip
        • www/p5-HTML-Parser

        Test

        • devel/p5-Test-Class
        • devel/p5-Test-Most
        OpenBSD README

        This README contains unresolved ports variables; replace them before using its commands.

        +-----------------------------------------------------------------------
        | Running mimedefang on OpenBSD
        +-----------------------------------------------------------------------
        
        Post-installation steps
        =======================
        Register the mimedefang milter with sendmail(8) by adding the following
        to your .mc file:
        
            INPUT_MAIL_FILTER(`mimedefang', \
                `S=local:/var/spool/MIMEDefang/mimedefang.sock, \
                F=T, T=C:15m;S:4m;R:4m;E:10m')dnl
        
        Then re-generate your .cf file.
        
        When using administrator notifications, it is advised to add the
        "_mdefang" user to the list of users that are allowed to set their
        envelope "from" address to a different user. This is done in:
            ${SYSCONFDIR}/mail/trusted-user
        
        Improving performance
        ---------------------
        On a busy mail server, it is advised to have the spool directory in
        virtual memory (i.e. ramdisk). This can be achieve by adding the
        following line to fstab(5):
        swap /var/spool/MIMEDefang tmpfs rw,nodev,nosuid,-s256M,-u570,-g570,-m0750 0 0
        
        This will create a 256M tmpfs filesystem under /var/spool/MIMEDefang.
        
        SpamAssassin
        ------------
        SpamAssassin can be used by mimedefang(8) in which case some maintenance
        tasks are required and cron(8) jobs must be setup in root's crontab(5):
        
        - Automating SpamAssassin rule updates:
        0	0	*	*	*	PATH=${PATH}:${LOCALBASE}/bin; ${LOCALBASE}/bin/sa-update && ${RCDIR}/mimedefang_multiplexor reload >/dev/null
        
        - Synchronizing the journal data into the Bayes databases:
        30	0	*	*	*	PATH=${PATH}:${LOCALBASE}/bin; su -s /bin/sh _mdefang -c "${LOCALBASE}/bin/sa-learn --force-expire >/dev/null"
        
        IP validation header
        ====================
        To retain relay's IP address information between Mail eXchangers, an
        identical ${SYSCONFDIR}/mail/mimedefang-ip-key must be installed on all
        relays. The content of this file is generated using:
            # /usr/local/share/examples/gen-ip-validator.pl
        
        Start-up order
        ==============
        Be sure to start mimedefang_multiplexor before mimedefang in rc.local(8).
            # rcctl order mimedefang_multiplexor mimedefang
        
        Used by (1 dependency relationships)

        Includes library, runtime, build and test dependencies.

        Package guides

        • Installing and updating packages

        Package details as JSON

        Report a bug