You are not logged in.

#1 2004-12-20 06:13:02

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

amavisd-new for postfix

I am in the process of making a package for amavisd-new for use with postfix.
Here is my pkgbuild for it:

pkgname=amavisd-new
pkgver=2.2.0
pkgrel=1
pkgdesc="A high-performance interface between mailer (MTA) and content checkers. Written in Perl for maintainability, without paying a significant price for speed."
url="http://www.ijs.si/software/amavisd"
depends=('perl')
makedepends=()
conflicts=()
replaces=('amavisd')
backup=(etc/amavisd/amavisd.conf)
install=$pkgname.install
source=(http://www.ijs.si/software/amavisd/$pkgname-$pkgver.tar.gz conf.patch amavisd)
md5sums=('70af3c7b6d06de900b74e216cfcf12f7' '3497f59cd7fa1246aaed294425b0a7e5' '59a32e0c6cde8b8af5e85e8555d7a904')

build() {
  cd $startdir/src/$pkgname-$pkgver
  patch -p1 < ../conf.patch 
  install -D -m755 ./amavisd $startdir/pkg/usr/sbin/amavisd
  install -D -m644 ./amavisd.conf $startdir/pkg/etc/amavisd/amavisd.conf
  install -D -m644 ./amavisd.conf-default $startdir/pkg/etc/amavisd/amavisd.conf-default
  install -D -m644 ./amavisd.conf-sample $startdir/pkg/etc/amavisd/amavisd.conf-sample
  install -D -m755 ../amavisd $startdir/pkg/etc/rc.d/amavisd
}

Here is my amavisd rc.d script:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

DAEMON_NAME="amavisd-new"
DAEMON_CONF="/etc/amavisd/amavisd.conf"
DAEMON_PATH="/usr/sbin/amavisd"

PID=`pidof -o %PPID ${DAEMON_NAME}`
case "$1" in
  start)
    stat_busy "Starting ${DAEMON_NAME}"
    [ -z "$PID" ] && ${DAEMON_PATH} -c ${DAEMON_CONF}
    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon ${DAEMON_NAME}
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping ${DAEMON_NAME}"
    [ ! -z "$PID" ]  && kill $PID &> /dev/null
    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon ${DAEMON_NAME}
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;
  reload)
    stat_busy "Reloading ${DAEMON_NAME}" 
    ${DAEMON_PATH} -c ${DAEMON_CONF} reload
    stat_done
    ;;
  *)
    echo "usage: $0 {start|stop|restart|reload}"  
esac
exit 0

config.patch for making the changes to the default config file:

--- old/amavisd.conf    2004-12-19 20:57:42.000000000 -0800
+++ fixed/amavisd.conf    2004-12-19 20:58:35.000000000 -0800
@@ -12,15 +12,15 @@
 # @bypass_spam_checks_maps  = (1);  # uncomment to DISABLE anti-spam code
 
 $max_servers = 2;            # number of pre-forked children (2..15 is common)
-$daemon_user  = 'vscan';     # (no default;  customary: vscan or amavis)
-$daemon_group = 'vscan';     # (no default;  customary: vscan or amavis)
+$daemon_user  = 'amavis';     # (no default;  customary: vscan or amavis)
+$daemon_group = 'amavis';     # (no default;  customary: vscan or amavis)
 
 $mydomain = 'example.com';   # a convenient default for other settings
 
-$MYHOME   = '/var/amavis';   # a convenient default for other settings
+$MYHOME   = '/home/amavis';   # a convenient default for other settings
 $TEMPBASE = "$MYHOME/tmp";   # working directory, needs to be created manually
 $ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR
-$QUARANTINEDIR = '/var/virusmails';
+$QUARANTINEDIR = "$MYHOME/quarantine";
 
 # $daemon_chroot_dir = $MYHOME;   # chroot directory or undef

So far I have nothing in the .install file, but I think I should be checking for the required perl CPAN stuff in there..or maybe just asking the user if they want to install them/have cpan check them or not..
Anyone out there with experience on how to auto-check and install those things?

I also noticed that someone else on the forum had packaged amavisd, or they said they did, I never could locate the repo or a page for it though.  sad

Also, I think I am missing a few dependencies, but like I said, this is still a package in its early formations..

Any help would be appreciated.

edit: all of the above is in cvs here
and binary is here


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#2 2005-01-29 03:51:20

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

ok. Finally getting back to amavisd. I added some stuff to the post-install. It should create the user there...
Trying to package the needed perl-modules so you don't have to manually install with cpan..what a pain!
ick. For now I might just go the cpan route..
:?

Also, a new version of amavisd is out, so I updated the package.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-01-29 15:53:40

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Funny that I have that config installed all over the place, though I actually use an old patched version of amavisd that has multiple levels of spam and as a last resort sends it to an alternate address.

Post the list of perl modules, and we could agree to split them into areas of responsibility. (You do some, I'll do some).


Kind regards

Benedict White

Offline

#4 2005-01-29 16:19:39

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Also, amavisd runs as vscan normally (on all the systems I have set up) so that it can interact painlessly with clamav.

I use the home directory of /var/spool/amavis/

because it spools allot there. This has the advantage that if you are on a really busy server /var/spool can in fact be a different hard disk.

I also integrate it (in a failry ugly way at the moment) with mailgraph which produces some real time stats using rrd-tool.


Kind regards

Benedict White

Offline

#5 2005-01-29 20:16:18

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

I actually setup clamav to run as the amavis user. Which is basically what it sounds like you did.  wink Just a different username.

List of perl modules:
Archive::Tar Archive::Zip Compress::Zlib Convert::TNEF Convert::UUlib MIME::Base64 MIME::Parser Mail::Internet Net::Server Net::SMTP Digest::MD5 IO::Stringy Time::HiRes Unix::Syslog BerkeleyDB

and of course, the Mail::ClamAV. The spammassassin ones are already packaged..

I have some initial stabs at packages (PKGBUILDS) located in my cvs here:
http://cactuswax.net/~eliott/cvs/viewcv … pkgbuilds/

I am unsure of what the package names should be. I am currently using a perl-module-name syntax.
I think the biggest problem so far is the prerequisite perl modules. When running cpan and installing the above, alot of other packages are pulled in and built.
I wonder if it would be better to just package an autobundle somehow. I really don't know my arse from my elbow when it comes to perl modules and cpan, so I am kinda fumbling in the dark on this one.  :?


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#6 2005-01-31 10:54:56

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

I had a look at the existing perl PKGBUILD's and see that you have essentially just used that as a template. As far as I can tell this will work.

As for creating a "group" there are two ways to do this:

1. Create a directory like kde (perhaps called amavisd or amavisd-new) and place all packages in that directory.

2. A large depends list.

Making the packages using the existing template looks easy, and probably will be until something breaks.


Kind regards

Benedict White

Offline

#7 2005-01-31 12:03:20

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

I'm still curious about autobundle. I have the feeling it holds some secret lore that may help me...
lol


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2005-02-03 08:29:44

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#9 2005-02-05 14:54:08

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Just to let you know I am in the process of making packages. So far I am working on:

perl-archive-tar  perl-compress-zlib  perl-convert-uulib  perl-mime-base64
perl-archive-zip  perl-convert-tnef   perl-mailtools      perl-mime-tools

I will let you know how I get on.


Kind regards

Benedict White

Offline

#10 2005-02-05 15:53:42

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Actually I now have "skeleton" PKGBUILD's for all the required ones and will be building them later and fleshing them out as well.

So there are:

perl-archive-tar  perl-compress-zlib  perl-digest-md5  perl-mailtools    perl-net-server
perl-archive-zip  perl-convert-tnef   perl-io-stringy  perl-mime-base64  perl-time-hires
perl-berkeleydb   perl-convert-uulib  perl-libnet      perl-mime-tools   perl-unix-syslog

I must also check that they are not available already of course.


Kind regards

Benedict White

Offline

#11 2005-02-05 20:30:20

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

hooray!
make sure you check out spamassassin package. I believe it pulls in some perl modules currently, and there might be an overlap or two...

Good work on this. Packaging perl modules is not the funnest thing in the world, but from an end user point of view, it sure is nice to be able to manage them with pacman.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-02-06 02:37:28

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Right, I have got as far as perl-digest-md5, and have had to add some others as dependanies.

I will be checking what is already there as well and will remove what is already in the official repositories.

I am a little puzzled by your comment about checking out spamassassin, as all my mail Arch boxes have it installed and running.

The company for which I work installs these all the time, formally based on Suse, but now on Arch, hence the effort to make the amavisd-new install as painless as possible is part of the corporate goal.


Kind regards

Benedict White

Offline

#13 2005-02-06 02:54:16

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

Benedict_White wrote:

I am a little puzzled by your comment about checking out spamassassin, as all my mail Arch boxes have it installed and running.

I meant as far as what perl modules it already includes. No sense duplicating work.
That is all I meant.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#14 2005-03-03 23:20:44

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: amavisd-new for postfix

fixed a little issue in the wiki. Logrotate was not rotating the logs properly..
Also added an option to the /etc/conf.d/clamav file..


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#15 2006-07-31 16:49:26

eduac
Member
Registered: 2006-03-17
Posts: 123

Re: amavisd-new for postfix

Guys,

I try to install the amavisd-new with tarball method and i get this error:

# amavisd debug
ERROR: MISSING REQUIRED BASIC MODULES:
  IO::Wrap
  IO::Stringy
  Unix::Syslog
  MIME::Words
  MIME::Head
  MIME::Body
  MIME::Entity
  MIME::Parser
  MIME::Decoder
  MIME::Decoder::Base64
  MIME::Decoder::Binary
  MIME::Decoder::QuotedPrint
  MIME::Decoder::NBit
  MIME::Decoder::UU
  MIME::Decoder::Gzip64
  Net::Server
  Net::Server::PreForkSimple
BEGIN failed--compilation aborted at /usr/sbin/amavisd line 157.

anyone knows to solve this?


Arch - newbie

Offline

#16 2006-07-31 16:56:51

Benedict_White
Member
From: Sussex, UK
Registered: 2004-05-27
Posts: 331
Website

Re: amavisd-new for postfix

Yes, run cpan, configure it, (Answer some questions, posibly add some new pacman packages like netkit-ftp) then type install followed by what ever package name is missing.


Kind regards

Benedict White

Offline

Board footer

Powered by FluxBB