[Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d

e-frog e-frog at gmx.de
Mon Aug 30 19:06:19 EEST 2010


On 30.08.2010 17:32, wrote Jerrale G:
>  On 8/27/2010 11:25 AM, e-frog wrote:
>> On 27.08.2010 17:16, wrote Jerrale G:
>>>   In the shell:
>>> ,doveadm(root): Error: User listing returned failure,doveadm: Error:
>>> Failed to iterate through some users
>>>
>>> In the log:
>>> dovecot: auth: Error: sql: Iterate query failed: Table 'mail.users'
>>> doesn't exist (using built-in default iterate_query: SELECT username,
>>> domain FROM users)
>>>
>>> Why is dovecot trying to "select username, domain from users" when the
>>> "service auth" is setup to "select homedir, maildir, sieve_dir, from
>>> MAILBOXES.... the same with the password query except for selecting
>>> password from mail.mailboxes.
>>>
>>> The expire dictionary is EXACTLY like the example you posted in the
>>> wiki2.
>>>
>>> I can't remember whether I posted this thread before or not; I remember
>>> writing it two days ago but I'm not sure if I sent it as I can't find it
>>> in this "mailing lists" folder.
>>>
>>> Jerrale G.
>>> SC Senior Admin
>>>
>> You need to adjust iterate_query setting in
>> /etc/dovecot/dovecot-sql.conf.ext to your needs
>>
>> See also:
>> http://wiki2.dovecot.org/Tools/Doveadm/Expunge?highlight=(iterate_query)
>>
> 
> 
> Could you explain the iterate_query in any kind of sql. I'm guessing to
> just use the query, correctly, that's failing as iterate_query= and put
> it in the service auth file which includes password_query and
> user_query. then, I'm guessing to add something like:
> 
> iteratedb {
> driver = sql
> args = /path/to/sql.conf
> }
> 
> The wiki2 only says:
> 
> "When the SQL userdb module is used make sure that the iterate_query
> setting in /etc/dovecot/dovecot-sql.conf.ext matches your database layout."
> 
> it should give an example query. I don't know if its wanting to list the
> fields or the contents of a field.
> 
> Thanks,
> 
> Jerrale G.
> SC Senior Admin

Uncomment the last line in /etc/dovecot/dovecot-sql.conf.ext and adjust
the query to your database layout. All doveadm needs is a list of usernames

# Query to get a list of all usernames.
iterate_query = SELECT username AS user FROM users

There is no need to touch any other file.





More information about the dovecot mailing list