[Dovecot] fts squat -> webmail, fastcgi timeout: SOLR the answer?

Stefan Foerster cite+dovecot-users at incertum.net
Wed Feb 10 22:47:24 EET 2010


* Steffen Kaiser <skdovecot at smail.inf.fh-brs.de>:
> On Wed, 10 Feb 2010, mailinglists at belfin.ch wrote:
>> Does solr allow user-offline indexing (no user interaction needed to kick
>> on indexing) ?
>
> You can talk IMAP directly as user:
>
> setuid user:group
> export USER=user
> export HOME=/home/path/user
> /usr/sbin/dovecot --exec-mail imap

w00t, that's neat! So, if "some_command" provided me with a list of
usernames and their respective home directories I could isssue
something like:

some_command | while read USER HOME; do
    export USER
    export HOME
    echo ". list * *" | /usr/sbin/dovecot --exec-mail imap | \
      awk '($2 == "LIST"){print $5}' | while read mailbox
    do
        cat << EOF  | /usr/sbin/dovecot --exec-mail imap
. select $mailbox
. search text foo
. search body foo
EOF
    done > /dev/null
done

Well, perhaps not exactly that (hi @ fork(2)!), but something along
these lines. Could I? (Oh, please please please say "yes!")


Stefan


More information about the dovecot mailing list