Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d iterate_query LDAP
On Tue, 2010-08-31 at 14:48 -0700, Tomislav Mihalicek wrote: > >> Aug 31 10:03:35 cartman2 dovecot: auth: Fatal: > >> net_connect_unix(auth-worker) > >> failed: Permission denied Try: chmod 0755 /var/run/dovecot Also next Dovecot version will do that automatically.
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d iterate_query LDAP
i tried mail=user no help... below is a dovecot - n output so take a look please # 2.0.1 (c5111fb65b0b): /etc/dovecot/dovecot.conf # OS: Linux 2.6.26-2-amd64 x86_64 Debian 5.0.5 auth_debug = yes auth_default_realm = xnet.hr auth_verbose = yes base_dir = /var/run/dovecot/ default_client_limit = 2000 default_process_limit = 200 default_vsz_limit = 536870912 disable_plaintext_auth = no hostname = cartman.example.com lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes log_path = login_greeting = MihaMail 0.0.1 mail_debug = yes mail_gid = 10030 mail_location = maildir:~/Maildir:INDEX=~/index mail_plugins = expire quota zlib autocreate virtual fts fts_squat zlib acl imap_acl mail_privileged_group = vmail mail_uid = 10030 managesieve_notify_capability = mailto managesieve_sieve_capability = comparator-i;octet comparator-i;ascii-casemap fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date spamtest spamtestplus virustest passdb { args = /etc/dovecot/master-users driver = passwd-file master = yes pass = yes } passdb { args = /etc/dovecot/dovecot-ldap.conf.ext driver = ldap } plugin { auth_socket_path = /var/run/dovecot/auth-master autocreate = Drafts autocreate2 = Sent Items autocreate3 = Trash autocreate4 = Spam autosubscribe = Drafts autosubscribe2 = Sent Items autosubscribe3 = Trash autosubscribe4 = Spam expire = Trash 7 Trash/* 7 Spam 30 expire_altmove = * 10 expire_dict = proxy::expire mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename mail_log_fields = uid box msgid size quota = maildir:User quota quota_warning = storage=95%% quota-warning 95 %u quota_warning2 = storage=85%% quota-warning 85 %u quota_warning3 = messages=95%% quota-warning 95 %u quota_warning4 = messages=85%% quota-warning 85 %u sieve = ~/dovecot.sieve sieve_dir = ~/sieve sieve_global_path = /etc/dovecot/sieve/default.sieve zlib_save = bz2 zlib_save_level = 9 } postmaster_address = postmas...@example.com protocols = imap pop3 lmtp sieve sendmail_path = /usr/lib/sendmail service auth { unix_listener auth-userdb { group = vmail mode = 0600 user = vmail } user = $default_internal_user } service dict { unix_listener dict { group = vmail mode = 0600 user = vmail } } service imap-login { inet_listener imap { port = 143 } process_min_avail = 2 service_count = 1 vsz_limit = 134217728 } service imap { process_limit = 1024 vsz_limit = 536870912 } service lmtp { unix_listener /var/spool/postfix-virus/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } unix_listener /var/spool/postfix/private/dovecot-lmtp { group = postfix mode = 0660 user = postfix } } service managesieve-login { inet_listener sieve { port = 2000 } } service pop3-login { inet_listener pop3 { port = 110 } } service pop3 { process_limit = 1024 } service quota-warning { executable = script /usr/local/bin/quota-warning.sh unix_listener quota-warning { mode = 0666 user = vmail } user = dovecot } ssl_cert = > On Tue, 2010-08-31 at 01:09 -0700, Tomislav Mihalicek wrote: >> >> iterate_attrs = mail=%u > > This isn't right. You probably want mail=user > >> Aug 31 10:03:35 cartman2 dovecot: auth: Fatal: >> net_connect_unix(auth-worker) >> failed: Permission denied > > I guess you've changed some default permission settings related to auth > processes. doveconf -n output would help giving the right answer, but > you should look into auth-worker service's unix_listener. > > > > -- View this message in context: http://old.nabble.com/doveadm-expunge--A-mailbox-Trash-savedbefore-30d-iterate_query-LDAP-tp29580393p29588020.html Sent from the Dovecot mailing list archive at Nabble.com.
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d iterate_query LDAP
On Tue, 2010-08-31 at 01:09 -0700, Tomislav Mihalicek wrote: > > iterate_attrs = mail=%u This isn't right. You probably want mail=user > Aug 31 10:03:35 cartman2 dovecot: auth: Fatal: net_connect_unix(auth-worker) > failed: Permission denied I guess you've changed some default permission settings related to auth processes. doveconf -n output would help giving the right answer, but you should look into auth-worker service's unix_listener.
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
On Mon, 2010-08-30 at 12:31 -0400, Jerrale G wrote: > > > Timo or another admin needs to add this in the wiki. I know it is in the > example sql config file, which is where I got it > (/usr/share/doc/dovecot/example/dovecot-sql.conf.ext) but it is more > convenient in the wiki. Well, the doveadm pages in wiki do mention it in -A parameter. I added it now to http://wiki2.dovecot.org/AuthDatabase/SQL and added note/links to http://wiki2.dovecot.org/Plugins/Expire > I also added the same maildir parameters from the user_query in case the > iterate_query needed to know where the maildir is: > CONCAT('/home/mail/', mailboxes.domain, '/', mailboxes.username, > '/mail/') AS maildir That's not necessary. It does a userdb lookup for each user anyway.
[Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d iterate_query LDAP
hi everyone after doing this in shell #/usr/local/dovecot-2.0.1/bin/doveadm expunge -u tmihal mailbox INBOX savedbefore 1d everything is working as it should but ... #/usr/local/dovecot-2.0.1/bin/doveadm expunge -A mailbox INBOX savedbefore 1d doveadm(root): Error: userdb list: Disconnected unexpectedly doveadm: Error: Failed to iterate through some users #cat /etc/dovecot2/dovecot-ldap.conf tls = no hosts = blah ldap_version= 3 auth_bind = no dn = blah.blah dnpass = blah scope = onelevel deref = never pass_attrs = userPassword=password default_pass_scheme = CRYPT user_attrs = mail=%u,homeDirectory=home,mailQuotaSize=quota_rule=*:bytes=%$,mailQuotaCount=quota_rule2=*:messages=%$ base= ou=accounts,dc=xnet,dc=hr user_filter = (&(objectClass=qmailUser)(accountStatus=enabled)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(mailAlternateAddress=%u))) pass_filter = (&(objectClass=qmailUser)(accountStatus=enabled)(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(mailAlternateAddress=%u))) # Attributes and filter to get a list of all users iterate_attrs = mail=%u iterate_filter = (objectClass=qmailUser) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: master in: LIST 1 Aug 31 10:03:35 cartman2 dovecot: auth: Fatal: net_connect_unix(auth-worker) failed: Permission denied Aug 31 10:03:35 cartman2 dovecot: auth: Debug: Loading modules from directory: /usr/local/dovecot-2.0.1/lib/dovecot/auth Aug 31 10:03:35 cartman2 dovecot: auth: Debug: passwd-file /etc/dovecot/passwd.masterusers: Read 1 users Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17731) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17729) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17734) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17735) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17737) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17739) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17742) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17741) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17740) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17730) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17738) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17733) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17743) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17728) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17736) Aug 31 10:03:35 cartman2 dovecot: auth: Debug: auth client connected (pid=17732) any clues? -- View this message in context: http://old.nabble.com/doveadm-expunge--A-mailbox-Trash-savedbefore-30d-iterate_query-LDAP-tp29580393p29580393.html Sent from the Dovecot mailing list archive at Nabble.com.
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
On 8/30/2010 12:06 PM, e-frog wrote: 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. Thanks efrog, Timo or another admin needs to add this in the wiki. I know it is in the example sql config file, which is where I got it (/usr/share/doc/dovecot/example/dovecot-sql.conf.ext) but it is more convenient in the wiki. I also added the same maildir parameters from the user_query in case the iterate_query needed to know where the maildir is: CONCAT('/home/mail/', mailboxes.domain, '/', mailboxes.username, '/mail/') AS maildir Jerrale G. SC Senior Admin
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
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.
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
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
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
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 Jerrale G. SC Senior Admin
Re: [Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
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)
[Dovecot] doveadm expunge -A mailbox Trash savedbefore 30d
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