Back in June 2000, I developed a Perl application called macofida for the Postfix mail server. Although I did it primarily to learn Perl and SMTP, it turned out that there was interest among Postfix users for such an application. So I released the code as a proof of concept and received good feedback from the Postfix-Users mailing list which allowed me to iteratively improve the software. Due to personal circumstances, I stopped working on macofida pretty quickly. The good news though is that other folks expanded on the concept and eventually implemented other better solutions.

I would like to thank those on the Postfix-Users mailing list (particularly Liviu Daia and Bennet Todd) who once provided me encouragement and valuable feedback. For historical records, I now provide a mirror of the obsolete macofida website.


  • Previous website of macofida (obsolete)
  • The Postfix mail server developed by Wietse Venema
  • Web archive of the Postfix-Users mailing list

+++++ mirror of previous macofida website starts here +++++

What is macofida?
It stands for mail content filtering daemon. It is a simple SMTP server written in Perl to

  • receive mail via SMTP;
  • apply a content filtering script/program to the mail;
  • reject or relay mail based on the response of the content filter.

No sophisticated filtering algorithm is currently implemented. Instead, we have a sample filter-script that rejects all mails with the word ‘VIRUS’. It is easy for the user to customize this script without touching the macofida code. This gives a modular or ‘plug-in’ feel to the whole setup. See the README file and filter-script file for more details.

These scripts are for my own testing purposes. They worked for me but that is no guarantee they will work for you. You have been warned. Of course, if it does not work for you, please let me know.

  • macofida-all.tgz (20070225) contains all versions from 0.1 to 0.5
  • macofida-0.5 (20000616) with buffered spooling
  • macofida-0.4 (20000609) see README and filter-script
  • macofida-0.3 (20000605)
  • macofida-0.2 (20000602) previously known as acofida-0.1
  • macofida-0.1 (20000601) previously known as acofire-0.1

Recent Changes (Version 0.5)
Here are the recent changes made to macofida:

  • do not use Net::SMTP::Server::Client anymore; instead a similar dedicated module is used to perform the same task.
  • added a ‘buffer’ parameter; this indicates how many lines of data to buffer before writing it to the spool file.
  • renamed the ‘filter_sw’ parameter to ‘filter’.

The reasons for abandoning Net::SMTP::Server::Client are:

  • to avoid OO overhead.
  • to cut down on sanity checks (not necessary with a nice and well-behaved MTA like Postfix).
  • most importantly, to correct the “my %_cmds” problem.

The ‘buffer’ parameter was introduced to reduce file I/O, which presumably is the bottleneck of macofida. I wonder if it will help.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: