3 messages in net.sourceforge.lists.courier-usersRe: [courier-users] Possible to compi...
FromSent OnAttachments
Michael A MayoDec 20, 2004 3:03 pm 
Sam VarshavchikDec 20, 2004 3:29 pm 
Stefan HornburgDec 21, 2004 1:00 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] Possible to compile maildrop with support for virtual users?Actions...
From:Stefan Hornburg (rac@linuxia.de)
Date:Dec 21, 2004 1:00:39 am
List:net.sourceforge.lists.courier-users

On Mon, 20 Dec 2004 18:29:22 -0500 Sam Varshavchik <mrs@courier-mta.com> 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 = VUSER=$local_part@$domain:${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:$local_part}@${quote_mysql:$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