[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#217452: mailfilter: installing under Debian



Package: mailfilter
Version: 0.5.2-1
Severity: wishlist
Tags: patch

Judging by my own experience and posts on debian-user, it is not
obvious how to set up mailfilter properly on Debian.  It would be good
to document this, or even to add it to the setup scripts.  I am not
sure to what extent it is safe to automate, but I have provided some
suggestions that might be good to add to README.Debian:

Under a typical Debian setup, you want to trigger mailfilter before
every run of fetchmail.  Since fetchmail ordinarily runs as user
fetchmail, mailfilter will too.  It needs to be able to find and read
its configuration file as this user, and write to its log file.  Here
is one way to accomplish this:

1) Create the directory /var/log/mailfilter and do chown
fetchmail:nogroup on it.
2) Create /etc/mailfilterrc and do chown fetchmail:nogroup on it.
3) In mailfilterrc you need to specify
LOGFILE=/var/log/mailfilter/mailfilterlog
You will also need to setup server/user/pass/protocol/port and other
options, as suggested in other mailfilter documentation.
4) In /etc/fetchmailrc specify
preconnect "mailfilter --mailfilterrc=/etc/mailfilterrc" as one of the
options in your poll section.
5) To keep your logs from growing infinitely, create
/etc/logrotate.d/mailfilter with the following text:
---------------------------------------------------
# This is not a package script.
# Created by Ross Boylan 2-Oct-2003
# 23-Oct-2003 use /var/log/mailfilter

# mailfilter may be running while this runs
# and there is no good way to turn it off
# so we use delaycompress

/var/log/mailfilter/mailfilterlog {
	weekly
	rotate 4
	size=500k
	compress
	delaycompress
}
-------------------------------------------------

Notes:
1. fetchmail's home directory is /var/run/fetchmail.  You can not use
it, because /var/run gets cleaned out on system reboot.

2. It may be possible to put the log files in /var/log.  However, if
mailfilter ever attempts to create a file in that directory it will
fail.  I'm not sure if logrotate can reliably create a file,
particularly with the delaycompress option.  I also don't know if
mailfilter will use the file, or attempt to open other files in the
same directory.  So I created a subdirectory that would allow write
access for mailfilter.

-- System Information:
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux wheat 2.4.21advncdfs #1 Wed Sep 17 22:06:42 PDT 2003 i686
Locale: LANG=en_US, LC_CTYPE=en_US

Versions of packages mailfilter depends on:
ii  debconf                    1.3.15        Debian configuration management sy
ii  libc6                      2.3.2-7       GNU C Library: Shared libraries an
ii  libgcc1                    1:3.3.2-0pre5 GCC support library
ii  libstdc++5                 1:3.3.2-0pre5 The GNU Standard C++ Library v3

-- debconf information:
* mailfilter/config: 




Reply to: