[Dovecot] Expire plugin per domain

Jose Luis Marin Perez jolumape_al at hotmail.com
Tue Oct 20 23:43:58 EEST 2009


Hi Timo,

I copied vchkpw-wrapper.sh as userdb.sh, being as follows:

userdb.sh

#!/bin/bash

DOMAIN=`echo $VPOPUSER|sed s/^.*@//`

if [ "$DOMAIN" = "operaciones.qnet.com.pe" ]; then
  export USERDB_AUTOCREATE=INBOX.Spam
  export USERDB_AUTOSUBSCRIBE=INBOX.Spam
  export USERDB_EXPIRE="INBOX.Spam 1 INBOX.Spam.* 1"
  export USERDB_EXPIRE_DICT="proxy::expire"
  export EXTRA="USERDB_AUTOCREATE USERDB_AUTOSUBSCRIBE USERDB_EXPIRE USERDB_EXPIRE_DICT"
fi

unset USER
exec $*

When I run the command /usr/local/sbin/dovecot --exec-mail ext /usr/local/bin/expire-tool.sh --test

 I get the same error message

Fatal: expire and expire_altmove settings not set

expire-tool.sh

#!/bin/bash
MAIL_PLUGINS=${MAIL_PLUGINS//imap_quota/}
MAIL_PLUGINS=${MAIL_PLUGINS//mail_log/}
/usr/local/libexec/dovecot/expire-tool $1

dovecot --build-options
Build options: ioloop=epoll notify=dnotify ipv6 openssl
Mail storages: cydir dbox maildir mbox raw shared
SQL drivers: mysql
Passdb: checkpassword pam passwd passwd-file shadow sql
Userdb: nss passwd passwd-file prefetch sql static

What's wrong?

Thanks 

Jose Luis

dovecot -n

# 1.2.6: /usr/local/etc/dovecot.conf
# OS: Linux 2.6.9-67.0.15.plus.c4smp i686 CentOS release 4.6 (Final)
log_path: /var/log/dovecot.log
listen: *:10143
ssl_listen: *:10943
disable_plaintext_auth: no
login_dir: /usr/local/var/run/dovecot/login
login_executable: /usr/local/libexec/dovecot/imap-login
first_valid_uid: 89
last_valid_uid: 89
first_valid_gid: 89
last_valid_gid: 89
mail_uid: 89
mail_gid: 89
mail_location: maildir:~/Maildir
mail_debug: yes
mail_plugins: quota imap_quota expire mail_log autocreate
namespace:
  type: private
  separator: .
  prefix: INBOX.
  inbox: yes
  list: yes
  subscriptions: yes
lda:
  postmaster_address: postmaster at example.com
auth default:
  debug: yes
  passdb:
    driver: checkpassword
    args: /usr/vpopmail/bin/vchkpw /usr/local/bin/vchkpw-wrapper.sh
  userdb:
    driver: prefetch
  userdb:
    driver: checkpassword
    args: /usr/local/bin/userdb.sh
  socket:
    type: listen
    master:
      path: /usr/local/var/run/dovecot/auth-master
      mode: 384
      user: vpopmail
      group: vchkpw
plugin:
  quota: maildir
  quota_rule: ?:storage=0
  quota_rule2: Trash:ignore
  mail_log_events: delete undelete expunge copy mailbox_delete
  mail_log_group_events:
  mail_log_fields: uid box msgid size
dict:
  expire: mysql:/usr/local/etc/dovecot-dict-expire.conf



> Subject: Re: [Dovecot] Expire plugin per domain
> From: tss at iki.fi
> To: jolumape_al at hotmail.com
> CC: dovecot at dovecot.org
> Date: Tue, 20 Oct 2009 16:25:29 -0400
> 
> On Tue, 2009-10-20 at 10:00 -0500, Jose Luis Marin Perez wrote:
> >  My problem is that I have no idea how to create the userdb.sh 
> 
> From my previous mail:
> 
> > Then create /usr/local/bin/userdb.sh which does more or less what the
> > vchkpw-wrapper.sh does, except since it doesn't call vchkpw itself,
> > it'll need to get the username from $USER instead of $VPOPUSER.
> > 
> > http://wiki.dovecot.org/AuthDatabase/CheckPassword#Checkpassword_as_userdb explains this extension.
> 
> So start with copy&pasting your vchkpw-wrapper.sh.
> 
 		 	   		  
_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


More information about the dovecot mailing list