Ticket #271 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

[PATCH] Add support for Mac OSX to amavisd-maia

Reported by: rjl Owned by: rjl
Priority: normal Milestone: 1.0.1
Component: amavisd-maia Version: 1.0.0
Severity: normal Keywords: mac osx
Cc:

Description

The amavisd-maia application needs a few of the fixes that were introduced in amavisd-new 2.2.1, plus a couple of additional tweaks as suggested by Dale Walsh. Dale has supplied a refernce patch for this purpose (against amavisd-new 2.2.1), which is attached to this ticket.

Note that this patch also includes some minor enhancements in terms of code to add more mail headers to processed e-mail, and taking advantage of these requires some additions to the amavisd.conf.dist file as well. These header enhancements are optional, and should really be handled in a separate enhancement ticket, but anyone making use of the attached patch needs to know they're in there.

Changes for the amavisd.conf.dist file:

# Add MTA-Interface header field to mail?
# $X_HEADER_TAG = 'X-Virus-Scanned';    # (old default: 'X-Virus-Scanned')
# $X_HEADER_TAG = 'MTA-Interface';        # (new default: 'MTA-Interface')

# Set to empty to add no header field    # (dflt "$myproduct_name- $myversion_id ($myversion_date) at $mydomain")
# $X_HEADER_LINE = "$myproduct_name at $mydomain";
# $X_HEADER_LINE = "by $myproduct_name using ClamAV at $mydomain";
# $X_HEADER_LINE = "$myproduct_name $myversion_id ($myversion_date)  at $mydomain";

# Add X-Virus-Scanned header field to mail?
# $X_VIRUS_TAG = 'X-Virus-Scanned';    # (default: 'X-Virus-Scanned')

# Set to empty to add no header field    # (dflt "using ClamAV at  $mydomain")
$X_VIRUS_LINE = "using Clamav 0.88 (2006-01-09) at $mydomain";

# Add X-Spam-Scanned header field to mail?
# $X_SPAM_TAG = 'X-Spam-Scanned';    # (default: 'X-Spam-Scanned')

# Set to empty to add no header field    # (dflt "using SpamAssassin at  $mydomain")
eval {require Mail::SpamAssassin}; $using_sa_version =  Mail::SpamAssassin::Version();
$X_SPAM_LINE = "using SpamAssassin $using_sa_version  ($Mail::SpamAssassin::SUB_VERSION) at $myhostname";

#$remove_existing_mta_headers = 0; # leave existing X-Virus-Scanned  alone
$remove_existing_mta_headers= 1; # remove existing headers
                    # (defaults to false)
#$remove_existing_virus_headers = 0; # leave existing X-Virus-Scanned  alone
#$remove_existing_virus_headers= 1; # remove existing headers
                    # (defaults to true)
#$remove_existing_spam_headers = 0;     # leave existing X-Spam*  headers alone
#$remove_existing_spam_headers  = 1;     # remove existing spam  headers if
                                    # spam scanning is enabled (default)

Attachments

MAIA-OSX.tar.gz (53.5 kB) - added by rjl 3 years ago.
Patch for amavisd-new 2.2.1

Change History

Changed 3 years ago by rjl

Patch for amavisd-new 2.2.1

Changed 3 years ago by buildsmart@…

Aside from the supplied patch file, there is a minor path difference in the amavisd-new tree where Mac OSX uses "/var/amavis" instead of "/var/amavisd" so double-check your work to ensure success.

One other thing to note since I've already been bitten by this once since getting it to run on Mac OSX is that the "db.php" has been renamed "maia_db.php" and if you still have a "db.php" file in your maia web directory it will give you an error and will not run so make sure you only have a "maia_db.php" file and not a "db.php" file in the maia web directory.

This installation has been tested on OSXS 10.3.x, OSXS 10.4.x, and OSX 10.4.x running iTools and the results are much better than the mainstream amavisd-new and a lot more flexible.

-- Dale

Changed 3 years ago by anonymous

In the process of installing the maia mailguard perl dependancies, to avoid any issues where Apple's software update destroys your maia's perl dependancies, please install the perl modules manually using the following format.

Ex. install Data::UUID under 10.4.x (substitute "5.8.1" for "5.8.6" under 10.3.x) (always execute as root user).

perl -MCPAN -eshell

look Data::UUID

perl Makefile.PL \
  INSTALLDIRS=site \
  INSTALLSITEARCH=/System/Library/Perl/5.8.6/darwin-thread-multi-2level \
  INSTALLSITELIB=/System/Library/Perl/5.8.6 \
  PREFIX=/ \
  INSTALLSITEBIN=/usr/bin \
  INSTALLSCRIPT=/usr/sbin \
  INSTALLSITEMAN1DIR=/usr/share/man/man1 \
  INSTALLSITEMAN3DIR=/usr/share/man/man3; \
  make

make install

exit

Changed 3 years ago by rjl

  • status changed from new to closed
  • resolution set to fixed

Changeset 963 updates amavisd-maia to amavisd-new 2.2.1. It does NOT include any of the custom header changes from Dale's patch, however.

The only remaining OSX-specific changes from Dale's patch indicate that the $daemonize setting must be disabled for OSX users, and this does not require any patching of amavisd-maia. Set "$daemonize = 0;" in your amavisd.conf file, or start amavisd-maia with the "foreground" command-line option to achieve the same result. There should be no need to hard-code this into amavisd-maia itself. OSX-specific documentation will be added to the installation instructions for the 1.0.1 release.

Changed 3 years ago by rjl

  • summary changed from Add support for Mac OSX to amavisd-maia to [PATCH] Add support for Mac OSX to amavisd-maia
Note: See TracTickets for help on using tickets.