Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 64778
Collapse All | Expand All

(-)amavis-0.3.12.orig/README.courier (+74 lines)
Line 0 Link Here
1
How To Use AMaViS With postfix
2
******************************
3
4
 By Lars Hecking <lhecking@users.sourceforge.net>
5
 Modified for Courier by Jim Gifford <giffordj@linkline.com>
6
7
  This setup requires Courier and Maildrop.
8
9
  You'll also need external unpackers, like arc etc.
10
11
  And yes, you need to have a virusscanner installed; and it must be
12
  in the $PATH environment variable.
13
14
  Also, a problem one might run into is some weird configure output
15
  about undefined macros. To fix this, one needs to install:
16
17
  http://cryp.to/autoconf-archive/Installed_Packages/acx_pthread.m4
18
  into the directory specified by 'aclocal --print-ac-dir' and then rerun 
19
  aclocal && automake && autoconf !
20
21
  In this configuration, amavis runs under a non-privileged user id
22
  (by default: amavis). Make sure it exists before proceeding.  If  a different
23
  user is chosen, use the "--with-amavisuser=USER" configure option for amavis.
24
25
  So, if you use defaults
26
27
  ./configure  --enable-courier
28
29
  it should work.
30
31
  Configuring courier itself is very simple:
32
33
  * a change to /etc/courier/courierd or /usr/lib/etc/courier/courierd:
34
35
  From
36
  DEFAULTDELIVERY="| /usr/bin/maildrop"
37
  or
38
  DEFAULTDELIVERY=./Maildir
39
40
  To
41
  DEFAULTDELIVERY="| /usr/sbin/amavis | /usr/bin/maildrop"
42
43
  This is the recommended setup for Amavis. There is an alternative
44
  method which is listed below.
45
46
  * a change to /etc/courier/courierd or /usr/lib/etc/courier/courierd:
47
48
  From
49
  DEFAULTDELIVERY=./Maildir
50
51
  To
52
  DEFAULTDELIVERY="| /usr/bin/maildrop"
53
54
  * add to /etc/courier/maildroprc or /usr/lib/etc/courier/maildroprc:
55
 
56
   # Virus Scan
57
   #
58
   import SENDER
59
   import RECIPIENT
60
61
   xfilter "/usr/sbin/amavis $SENDER $RECIPIENT"
62
63
  Additional Maildroprc rules
64
65
  If you would like to put your infected emails into their own Maildir
66
  you can add the following line to your maildroprc file. Make sure
67
  you create the Maildir or this rule will not work properly
68
69
  if (/^Subject:.*VIRUS IN*/)
70
	{
71
		exception {
72
			to "$DEFAULT/.Virus/"
73
			}
74
 	}
(-)amavis-0.3.12.orig/amavis/Makefile.am (+6 lines)
Lines 27-32 Link Here
27
	  else \
27
	  else \
28
	    umask 077 ; \
28
	    umask 077 ; \
29
	    $(mkinstalldirs) $$subdir ; \
29
	    $(mkinstalldirs) $$subdir ; \
30
            if test $(MTA) = courier ; then \
31
              chmod 777 $$subdir; \
32
            fi; \
30
	    if test -n $(amavisuser) ; then \
33
	    if test -n $(amavisuser) ; then \
31
	      chown $(amavisuser) $$subdir ; \
34
	      chown $(amavisuser) $$subdir ; \
32
	      if test $(MTA) = qmail ; then \
35
	      if test $(MTA) = qmail ; then \
Lines 39-44 Link Here
39
	if test ! -d $(DESTDIR)$(virusdir) ; then \
42
	if test ! -d $(DESTDIR)$(virusdir) ; then \
40
		umask 077 ; \
43
		umask 077 ; \
41
		$(mkinstalldirs) $(DESTDIR)$(virusdir) ; \
44
		$(mkinstalldirs) $(DESTDIR)$(virusdir) ; \
45
                if test $(MTA) == courier ; then \
46
                        chmod 777 $(DESTDIR)$(virusdir); \
47
		fi; \
42
		if test -n $(amavisuser) ; then \
48
		if test -n $(amavisuser) ; then \
43
			chown $(amavisuser) $(DESTDIR)$(virusdir) ; \
49
			chown $(amavisuser) $(DESTDIR)$(virusdir) ; \
44
		fi; \
50
		fi; \
(-)amavis-0.3.12.orig/amavis/checkaccount.in (-1 / +10 lines)
Lines 5-14 Link Here
5
5
6
if test -f "/etc/mail/aliases"; then
6
if test -f "/etc/mail/aliases"; then
7
  aliases=/etc/mail/aliases
7
  aliases=/etc/mail/aliases
8
  newaliases=newaliases
8
elif test -f "/etc/aliases"; then
9
elif test -f "/etc/aliases"; then
9
  aliases=/etc/aliases
10
  aliases=/etc/aliases
11
  newaliases=newalaises
12
elif test -f "/etc/courier/aliases/system"; then
13
  aliases=/etc/courier/aliases/system
14
  newaliases=makealiases
15
elif test -f "/usr/lib/courier/etc/aliases/system"; then
16
  aliases=/usr/lib/courier/etc/aliases/system
17
  newaliases=/usr/lib/courier/sbin/makealiases
10
else
18
else
11
  aliases=
19
  aliases=
20
  newaliases=
12
fi
21
fi
13
22
14
if test "`echo \"@mailto@\" | grep \"@\" | wc -l`" -eq 1; then
23
if test "`echo \"@mailto@\" | grep \"@\" | wc -l`" -eq 1; then
Lines 22-28 Link Here
22
      if test "`grep \"@mailto@\" $aliases | wc -l`" -lt 1; then
31
      if test "`grep \"@mailto@\" $aliases | wc -l`" -lt 1; then
23
        if test -w "$aliases"; then
32
        if test -w "$aliases"; then
24
          echo "@mailto@: $whoami" >> $aliases
33
          echo "@mailto@: $whoami" >> $aliases
25
          `newaliases` || echo "WARNING: could not run \"newaliases\""
34
          `$newaliases` || echo "WARNING: could not run \"newaliases\""
26
        else
35
        else
27
          echo "WARNING: $aliases is not writable by \"$whoami\""
36
          echo "WARNING: $aliases is not writable by \"$whoami\""
28
          error="yes"
37
          error="yes"
(-)amavis-0.3.12.orig/amavis/mta/courier_args (+6 lines)
Line 0 Link Here
1
# command line parsing, courier version
2
3
# This file is just a place holder, it
4
# may be needed in the future.
5
6
# End courier cmd line parsing
(-)amavis-0.3.12.orig/amavis/mta/courier_init (+12 lines)
Line 0 Link Here
1
# courier
2
3
# error codes
4
$VIRUSERR = 0;
5
$REGERR = 75;   # EX_TEMPFAIL from sendmail sysexits.h
6
7
# don't run suid
8
9
# set path explicitly
10
$ENV{PATH} = "/bin:/usr/bin:/usr/local/bin";
11
12
# End courier
(-)amavis-0.3.12.orig/amavis/mta/courier_send (+17 lines)
Line 0 Link Here
1
	# sending mail, courier version
2
3
	# Courier is using STDIN and STDOUT so there is no
4
	# need to open the mail file
5
	while (<$fh>) {
6
		next if ($seen_xheader == 0 && m/^$X_HEADER_TAG:/o);
7
		if ($seen_xheader == 0 && m/\A\r?\n\Z/) {
8
			print STDOUT "$X_HEADER_TAG: $X_HEADER_LINE\n";
9
			$seen_xheader = 1;
10
		}
11
		print STDOUT $_;
12
	}
13
14
	# Pass up the LDA's error code
15
	do_exit(retcode($?), __LINE__);
16
17
# End courier
(-)amavis-0.3.12.orig/configure.in (-6 / +24 lines)
Lines 261-266 Link Here
261
  fi
261
  fi
262
fi
262
fi
263
263
264
AC_ARG_ENABLE(courier,
265
[  --enable-courier              use courier as MTA],
266
  [if test "x$enableval" = "xyes" ; then
267
     MTA=courier
268
   fi])
269
270
dnl Need to find out whether sendmail_wrapper is really courier' sendmail
271
if test "x$MTA" = "xsendmail" ; then
272
  strings ${sendmail_wrapper} | grep -i courier >/dev/null 2>&1
273
  if test $? -eq 0 ; then
274
    MTA=courier
275
  fi
276
fi
277
264
AC_ARG_ENABLE(exim,
278
AC_ARG_ENABLE(exim,
265
[  --enable-exim                 use exim as MTA],
279
[  --enable-exim                 use exim as MTA],
266
  [if test "x$enableval" = "xyes" ; then
280
  [if test "x$enableval" = "xyes" ; then
Lines 474-484 Link Here
474
488
475
### Clam Antivirus Daemon
489
### Clam Antivirus Daemon
476
clamd_scanner_frag=/dev/null
490
clamd_scanner_frag=/dev/null
491
if test "x$MTA" != "xcourier" ; then
477
AC_CHECKING([*** Clam Antivirus (Daemon) ***])
492
AC_CHECKING([*** Clam Antivirus (Daemon) ***])
478
AC_PATH_PROG(clamd,clamd,,$PATH:/usr/bin:/usr/local/bin)
493
AC_PATH_PROG(clamd,clamd,,$PATH:/usr/bin:/usr/local/bin)
479
if test "x$clamd" != "x" ; then
494
	if test "x$clamd" != "x" ; then
480
  avscanner="$avscanner Clam Antivirus Daemon"
495
	  avscanner="$avscanner Clam Antivirus Daemon"
481
  clamd_scanner_frag=$srcdir/amavis/av/clamavd
496
	  clamd_scanner_frag=$srcdir/amavis/av/clamavd
497
	fi
482
fi
498
fi
483
499
484
### Command AntiVirus for Linux
500
### Command AntiVirus for Linux
Lines 726-736 Link Here
726
742
727
### OpenAntiVirus ScannerDaemon
743
### OpenAntiVirus ScannerDaemon
728
oav_scanner_frag=/dev/null
744
oav_scanner_frag=/dev/null
745
if test "x$MTA" != "xcourier" ; then
729
AC_CHECKING([*** OpenAntiVirus ScannerDaemon ***])
746
AC_CHECKING([*** OpenAntiVirus ScannerDaemon ***])
730
AC_PATH_PROG(oav,ScannerDaemon.jar,,$PATH:/bin:/usr/bin:/usr/local/bin)
747
AC_PATH_PROG(oav,ScannerDaemon.jar,,$PATH:/bin:/usr/bin:/usr/local/bin)
731
if test "x$oav" != "x" ; then
748
	if test "x$oav" != "x" ; then
732
  avscanner="$avscanner OpenAntiVirus ScannerDaemon"
749
  	avscanner="$avscanner OpenAntiVirus ScannerDaemon"
733
  oav_scanner_frag=$srcdir/amavis/av/oav
750
	oav_scanner_frag=$srcdir/amavis/av/oav
751
	fi
734
fi
752
fi
735
753
736
### Norman Virus Control for Linux
754
### Norman Virus Control for Linux

Return to bug 64778