"Stefan" == Stefan Neufeind <ste...@neufeind.net> writes:
Stefan> So my question: Has anybody got experience with maildrop,
Stefan> qmail, virtual domains (so not to have a seperate
Stefan> unix-user per domain) etc.? If yes, could you please gimme
Stefan> a short introduction how to integrate maildrop to fit
Stefan> these needs?
In one of my installations, this is my solution. Start 'qmail-start'
with special 'qmail-maildrop' wrapper (see below) instead of procmail
or './Maildir' etc:
/usr/sbin/qmail-start |/usr/sbin/qmail-maildrop
/usr/sbin/qmail-maildrop:
----- s n i p -----
#!/bin/sh
export MAILDIR=$PWD
export TMPHOMEDIR=$MAILDIR
export HOME=$MAILDIR
/usr/bin/preline /usr/bin/maildrop && exit 0
# check if maildrop returned EX_TEMPFAIL (75)
[ $? = 75 ] && exit 111
# otherwise return a permanent error
exit 100
----- s n i p -----
/etc/maildroprc:
----- s n i p -----
# Global maildrop filter file
# MAILDIR is set in the maildrop wrapper
# to the same as mail message store
import MAILDIR
DEFAULT="$MAILDIR"
DEFAULT_DEF="$MAILDIR"
# Just incase user don't have a shell
SHELL="/bin/sh"
# Mail file will be user and group writable
UMASK=007
MAILDIRQUOTA="0"
import HOME
import RECIPIENT
import HOST
import LOCAL
if ( $SIZE < 262144 )
{
xfilter "/usr/bin/spamc -f -u $RECIPIENT"
if (/^X-Spam-Level: SSSSSSSSSS*/)
{
# SPAM scored higher than 10, so let's just toss it!
to /dev/null
exit
}
if (/^X-Spam-Flag: *YES/)
{
to /var/mail/spam
exit
}
}
# Local variables:
# tab-width: 4
# End:
----- s n i p -----
The last 'to' entry should probably (I'm testing this now)
read:
to !spam...@domain.tld
This user is an ordinary pop/imap user with the mail directory
as '/var/mail/spam'...
Other than those two (tree) things, I can't remember if I did
anything special...