On Mon, 20 Dec 2004 18:29:22 -0500
Sam Varshavchik <[EMAIL PROTECTED]> wrote:
> Michael A Mayo writes:
>
> > Is it possible to compile the version of maildrop that comes with
> > courier so that it supports "maildrop -d" delivery to virtual
> > mailboxes?
> >
> > I ask because courier-esmtpd is not the only mail source on my system;
> > I also use getmail/fetchmail and spam filtering. It would be easier
> > if each program did not have to determine whether each account is
> > system or virtual then manually feed maildrop the required
> > environment variables.
>
> The version of maildrop that's part of the Courier tree relies on Courier to
> obtain account information before invoking maildrop.
That's true. It makes still sense to run "maildrop -d" for virtual accounts
if you are able to pass environment variables to maildrop.
Example:
Exim 3:
virtual_user_drop:
driver = pipe
command = /usr/bin/maildrop -d virtmail
environment = [EMAIL PROTECTED]:${lookup mysql{select
concat('VDIR=',maildir,':VAWAY=',absence_active,':VAWAYFROM=',UNIX_TIMESTAMP(absence_from),':VAWAYTO=',UNIX_TIMESTAMP(absence_to),':VAWAYSUBJECT=',absence_subject)
from users where username='${quote_mysql:[EMAIL PROTECTED]:$domain}'}{$value}}
user = virtmail
Maildrop:
import VUSER
import VAWAY
import VAWAYSUBJECT
import VAWAYFROM
import VAWAYTO
if ($VAWAY == 1 && ! (/^List-Id:/ || /^Precedence: list/))
{
NOW=`date +%s`
if ($VAWAYFROM < $NOW && $NOW < $VAWAYTO)
{
SUBJECT="-s '$VAWAYSUBJECT'"
exception {
`test -f $VDIR/auto.txt || /usr/sbin/upd_autoresponse
$VUSER > $VDIR/auto.txt`
cc "|/usr/bin/mailbot -t $VDIR/auto.txt -d
$VDIR/auto.db -A 'From: $VUSER' $SUBJECT /usr/sbin/exim -t ''"
}
}
}
Ciao
Racke
--
LinuXia Systems => http://www.linuxia.de/
Expert Interchange Consulting and System Administration
ICDEVGROUP => http://www.icdevgroup.org/
Interchange Development Team
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
courier-users mailing list
[email protected]
Unsubscribe: https://lists.sourceforge.net/lists/listinfo/courier-users