[Mimedefang] MIMEDefang 2.13 released
Andrey V. Pevnev
andrey at mgul.ac.ru
Sun Jun 2 15:06:30 EDT 2002
Hello David,
AVP> But what about --sysconfdir for configure?
AVP> :(
I have done it by myself:
1) @${MV} ${WRKSRC}/mimedefang-filter.5 ${WRKSRC}/mimedefang-filter.5.in
@${MV} ${WRKSRC}/mimedefang-multiplexor.8 ${WRKSRC}/mimedefang-multiplexor.8.in
@${MV} ${WRKSRC}/mimedefang.8 ${WRKSRC}/mimedefang.8.in
@${MV} ${WRKSRC}/mimedefang.pl.8 ${WRKSRC}/mimedefang.pl.8.in
2) there is the patch:
--- Makefile.in.orig Wed May 29 22:40:47 2002
+++ Makefile.in Sun Jun 2 22:16:07 2002
@@ -5,6 +5,7 @@
# Needed for autoconf to behave properly...
exec_prefix=@exec_prefix@
prefix=@prefix@
+sysconfdir=@sysconfdir@
MANDIR=@mandir@
@@ -93,9 +94,9 @@
@INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter
install: all
- -mkdir -p $(RPM_INSTALL_ROOT)/etc/mail
+ -mkdir -p $(RPM_INSTALL_ROOT)${sysconfdir}
-if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \
- mkdir -p $(RPM_INSTALL_ROOT)/etc/mail/spamassassin; \
+ mkdir -p $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin; \
fi
-mkdir -p $(RPM_INSTALL_ROOT)$(prefix)/bin
-mkdir -p $(RPM_INSTALL_ROOT)$(MANDIR)/man5
@@ -104,10 +105,9 @@
-mkdir -p $(RPM_INSTALL_ROOT)@SPOOLDIR@ && chmod 700 $(RPM_INSTALL_ROOT)@SPOOLDIR@
-mkdir -p $(RPM_INSTALL_ROOT)@QDIR@ && chmod 700 $(RPM_INSTALL_ROOT)@QDIR@
- if test -f $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter ; then \
- @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter.example || exit 1; \
- else \
- @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)/etc/mail/mimedefang-filter || exit 1; \
+ @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter.example || exit 1; \
+ if !(test -f $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter) ; then \
+ @INSTALL@ -m 644 examples/suggested-minimum-filter-for-windows-clients $(RPM_INSTALL_ROOT)${sysconfdir}/mimedefang-filter || exit 1; \
fi
@INSTALL@ -m 755 mimedefang-multiplexor $(RPM_INSTALL_ROOT)$(prefix)/bin/mimedefang-multiplexor
@@ -119,10 +119,9 @@
@INSTALL@ -m 644 mimedefang-filter.5 $(RPM_INSTALL_ROOT)$(MANDIR)/man5/mimedefang-filter.5
@INSTALL@ -m 644 mimedefang-protocol.7 $(RPM_INSTALL_ROOT)$(MANDIR)/man7/mimedefang-protocol.7
if test "$(HAVE_SPAM_ASSASSIN)" = "yes" ; then \
- if test -f $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf ; then \
- @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf.example || exit 1; \
- else \
- @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)/etc/mail/spamassassin/sa-mimedefang.cf || exit 1; \
+ @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf.example || exit 1; \
+ if !(test -f $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf) ; then \
+ @INSTALL@ -m 644 SpamAssassin/spamassassin.cf $(RPM_INSTALL_ROOT)${sysconfdir}/spamassassin/sa-mimedefang.cf || exit 1; \
fi \
fi
--- configure.orig Wed May 29 22:40:42 2002
+++ configure Sun Jun 2 22:34:17 2002
@@ -2505,7 +2505,7 @@
cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile mimedefang.pl examples/init-script"}
+CONFIG_FILES=\${CONFIG_FILES-"Makefile mimedefang.pl examples/init-script mimedefang-filter.5 mimedefang-multiplexor.8 mimedefang.8 mimedefang.pl.8"}
EOF
cat >> $CONFIG_STATUS <<\EOF
for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
--- mimedefang-filter.5.in.orig Fri May 31 20:44:02 2002
+++ mimedefang-filter.5.in Sun Jun 2 21:50:38 2002
@@ -19,7 +19,7 @@
directory and the e-mail message is split into parts in this directory.
.PP
-2) If the file \fB/etc/mail/mimedefang-filter.pl\fR defines a Perl function
+2) If the file \fB at sysconfdir@/mimedefang-filter.pl\fR defines a Perl function
called \fBfilter_begin\fR, it is called with no arguments. Any return
value is ignored.
@@ -829,7 +829,7 @@
of the following found will be used:
.TP
.B o
-/etc/mail/spamassassin/sa-mimedefang.cf
+ at sysconfdir@/spamassassin/sa-mimedefang.cf
.TP
.B o
/etc/mail/spamassassin/local.cf
--- mimedefang-multiplexor.8.in.orig Wed May 15 17:08:14 2002
+++ mimedefang-multiplexor.8.in Sun Jun 2 21:52:09 2002
@@ -118,7 +118,7 @@
.TP
.B \-F \fIrules_path\fR
Specifies the path to the filter rules. By default,
-\fB/etc/mail/mimedefang-filter\fR is used. If you use the \fB\-F\fR
+\fB at sysconfdir@/mimedefang-filter\fR is used. If you use the \fB\-F\fR
option, its value is passed to the underlying Perl filter program
using \fB\-f\fR.
--- mimedefang.8.in.orig Thu May 23 19:12:52 2002
+++ mimedefang.8.in Sun Jun 2 22:13:54 2002
@@ -25,7 +25,7 @@
type. Typically, you should run \fBmimedefang\fR on the same computer
as \fBsendmail\fR. Therefore, you should use a UNIX-domain socket for
the connection type. The suggested value for the \fB\-p\fR switch is
-\fB/var/run/mimedefang.sock\fR.
+\fB at SPOOLDIR@/mimedefang.sock\fR.
.TP
.B \-n \fImax_filters\fR
Because each incoming e-mail message forks a new Perl process, you can
@@ -66,7 +66,7 @@
.TP
.B \-F \fIrules_path\fR
Specifies the path to the filter rules. By default,
-\fB/etc/mail/mimedefang-filter\fR is used. If you use the \fB\-F\fR
+\fB at sysconfdir@/mimedefang-filter\fR is used. If you use the \fB\-F\fR
option, its value is passed to the underlying Perl filter program
using \fB\-f\fR. If you are using \fBmimedefang-multiplexor\fR, this
option is ignored; you should use the multiplexor's \fB\-F\fR option
--- mimedefang.pl.8.in.orig Thu May 2 18:54:12 2002
+++ mimedefang.pl.8.in Sun Jun 2 21:54:05 2002
@@ -18,11 +18,11 @@
.TP
.B \-f \fIfilter\fR
Specifies the name of the file containing the filter. If this option is
-omitted, the default filter \fB/etc/mail/mimedefang-filter\fR is used.
+omitted, the default filter \fB at sysconfdir@/mimedefang-filter\fR is used.
.SH OPERATION
-\fBmimedefang.pl\fR evaluates the file \fB/etc/mail/mimedefang-filter\fR
+\fBmimedefang.pl\fR evaluates the file \fB at sysconfdir@/mimedefang-filter\fR
as a Perl fragment. This file should define the \fBfilter\fR procedure.
For each part of a MIME message, \fBmimedefang.pl\fR calls \fBfilter\fR and
disposes of the part as instructed by the filter. The various modes
@@ -31,7 +31,7 @@
.SH TESTING FILTERS
You are \fIstrongly\fR recommended to test your filter before installing
-it in \fB/etc/mail/mimedefang-filter\fR. To test the filter, save it
+it in \fB at sysconfdir@/mimedefang-filter\fR. To test the filter, save it
in a file (e.g. \fBtest-filter\fR) and run this command:
.nf
--- mimedefang.pl.in.orig Fri May 31 20:38:38 2002
+++ mimedefang.pl.in Sun Jun 2 21:43:59 2002
@@ -2348,7 +2348,7 @@
#***********************************************************************
sub main {
my($Filter);
- $Filter = '/etc/mail/mimedefang-filter';
+ $Filter = '@sysconfdir@/mimedefang-filter';
my($ip, $name, $sender);
# Check for "-f filter-file" option
@@ -3204,8 +3204,8 @@
my $config = shift;
unless ($config)
{
- if (-r "/etc/mail/spamassassin/sa-mimedefang.cf") {
- $config = "/etc/mail/spamassassin/sa-mimedefang.cf";
+ if (-r "@sysconfdir@/spamassassin/sa-mimedefang.cf") {
+ $config = "@sysconfdir@/spamassassin/sa-mimedefang.cf";
} elsif (-r "/etc/mail/spamassassin/local.cf") {
$config = "/etc/mail/spamassassin/local.cf";
} else {
Can you add it to the project? This will help to port mimedefang to
systems, where additional applications should keep their configuration
files in place, other than /etc/mail.
--
Best regards,
MSFU LAN Admin
Andrey mailto:andrey at mgul.ac.ru
http://www.mgul.ac.ru/~andrey
More information about the MIMEDefang
mailing list