You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
713 B
20 lines
713 B
# Dovecot LDA delivery
|
|
{
|
|
# vim: ft=perl:
|
|
use esmith::ConfigDB;
|
|
my $cdb = esmith::ConfigDB->open_ro || die "Couldn't open ConfigDB\n";
|
|
my $sieve = $cdb->get('sieve');
|
|
my $usersieve = $props{Sieve} || 'enabled';
|
|
my $globalsieve = ($sieve) ? ($sieve->prop('status') || 'disabled') : 'disabled';
|
|
|
|
if (($usersieve ne 'enabled') || ($globalsieve ne 'enabled')){
|
|
$OUT .= "# Sieve is disabled\n";
|
|
}
|
|
elsif ($props{EmailForward} !~ /^(local|both)$/) {
|
|
$OUT .= "# No local delivery (Dovecot LDA)\n";
|
|
}
|
|
else{
|
|
$OUT .= '| /var/qmail/bin/preline -f /usr/libexec/dovecot/dovecot-lda -a "$RECIPIENT"; if [ $? -ne 0 ] ; then exit -1; else exit 99; fi;';
|
|
}
|
|
}
|
|
|
|
|