David Warden
2010-Dec-21 19:55 UTC
[Dovecot] doveadm "-S <socket_path>" option enabled in 2.0.8?
I apologize if this is a stupid question but I just compiled 2.0.8 and am trying to use doveadm to get the quota for a user using the -S <socket_path> option because I have different options for the various local IPs that dovecot listens on. For example, my default quota is filesystem (NFS rquota) and I can get that by doing: doveadm quota get -u warden which tells me: Quota name Type Value Limit % User quota STORAGE 1313476 1766400 74 But when I try to get my quota on a different local IP using the -S flag to doveadm: doveadm quota get -u warden -S 137.238.2.244:143 I am told: get: invalid option -- S The strange thing is doveadm's usage says that the -S option is valid for quite a few commands and in the man pages for those commands it looks like they should work for the way I'm calling doveadm. In the 2.0.8 source I also see code that looks like it should be parsing the -S flag. I can telnet to 127.0.0.1:143 and do ". getquotaroot inbox" which gives me the same information as "doveadm quota get -u warden" and I can telnet to 137.238.2.244:143 and ". getquotaroot inbox" also tells me my quota, but I'm hoping to use doveadm to periodically recalc my Maildir++ quota and update the squat FTS indexes and for that to happen doveadm needs to be able to be told what local IP address/port to connect to (I think). Here's my doveconf -n: # 2.0.8: /etc/dovecot/dovecot.conf # OS: Linux 2.6.18-194.26.1.0.1.el5 x86_64 Red Hat Enterprise Linux Server release 5.5 (Tikanga) nfs auth_cache_size = 10 M auth_master_user_separator = * auth_mechanisms = plain login auth_username_format = %Ln deliver_log_format = msgid="%m" subject="%s" from="%f" size=%p result="%$" first_valid_uid = 0 lda_mailbox_autocreate = yes lda_mailbox_autosubscribe = yes login_log_format_elements = user=%u method=%m rip=%r lip=%l lport=%a mpid=%e encryption=%c mail_location = maildir:/home/%Lu/Maildir:CONTROL=/Mail/mailhome/%Lu/.dovecot:INDEX=/Mail/mailhome/%Lu/.dovecot mail_log_prefix = "service=%s user=%u rip=%r lip=%l " mail_nfs_storage = yes mail_plugins = zlib quota mail_log notify fts fts_squat managesieve_notify_capability = mailto managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date mbox_write_locks = fcntl namespace { inbox = yes location = prefix = INBOX. separator = . type = private } passdb { args = /etc/dovecot/passwd.masterusers driver = passwd-file master = yes } passdb { args = cache_key=%u dovecot driver = pam } plugin { autocreate = Trash autocreate2 = Drafts autocreate3 = Sent autosubscribe = Trash autosubscribe2 = Drafts autosubscribe3 = Sent fts = squat mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append mail_log_fields = uid box msgid size from subject flags mail_log_group_events = yes quota = fs:User quota quota_exceeded_message = Quota exceeded (mailbox for user is full). Please see http://go.geneseo.edu/emailoverquota for help deleting messages while over quota. sieve = /Mail/mailhome/%Lu/.filter.sieve sieve_dir = /Mail/mailhome/%Lu/.sievedir } postmaster_address = postmaster at geneseo.edu protocols = imap pop3 sieve quota_full_tempfail = yes service managesieve-login { inet_listener sieve { port = 4190 } } ssl_cert = </etc/pki/dovecot/certs/dovecot.pem ssl_key = </etc/pki/dovecot/private/dovecot.pem userdb { driver = passwd } verbose_proctitle = yes protocol lmtp { mail_plugins = zlib quota mail_log notify fts fts_squat sieve } protocol lda { mail_plugins = zlib quota mail_log notify fts fts_squat sieve zlib } protocol imap { imap_logout_format = bytes(in/out)=%i/%o mail_max_userip_connections = 50 mail_plugins = zlib quota mail_log notify fts fts_squat quota imap_quota autocreate imap_zlib fts fts_squat } protocol sieve { managesieve_logout_format = bytes(in/out)=%i/%o } protocol pop3 { pop3_client_workarounds = outlook-no-nuls oe-ns-eoh pop3_logout_format = bytes(in/out)=%i/%o, top=%t/%p, retr=%r/%b, del=%d/%m, mailbox-size=%s pop3_uidl_format = UID%u-%v } local 137.238.2.244 { mail_location = maildir:/Mail/mailhome/$Lu/mailtest/Maildir:CONTROL=/Mail/mailhome/%Lu/mailtest/.dovecot2-control:INDEX=/Mail/mailhome/%Lu/mailtest/.dovecot2-index namespace { location = prefix = } plugin { quota = maildir:User quota quota_rule = *:storage=200M quota_rule2 = Trash:storage=+50M zlib_save = gz zlib_save_level = 6 } } local 137.238.1.1 { protocol imap { ssl_cert = </etc/pki/tls/certs/imaps.geneseo.edu.crt ssl_key = </etc/pki/tls/private/imaps.geneseo.edu.key } } local 137.238.2.244 { protocol imap { ssl_cert = </etc/pki/tls/certs/mailtest.geneseo.edu.crt ssl_key = </etc/pki/tls/private/mailtest.geneseo.edu.key } } local 137.238.1.1 { protocol pop3 { ssl_cert = </etc/pki/tls/certs/imaps.geneseo.edu.crt ssl_key = </etc/pki/tls/private/imaps.geneseo.edu.key } } local 137.238.2.244 { protocol pop3 { ssl_cert = </etc/pki/tls/certs/mailtest.geneseo.edu.crt ssl_key = </etc/pki/tls/private/mailtest.geneseo.edu.key } }
David Warden
2010-Dec-21 20:21 UTC
[Dovecot] doveadm "-S <socket_path>" option enabled in 2.0.8?
On Dec 21, 2010, at 3:13 PM, Alex Baule wrote:> Its a UNIX Socket , not a TCP socket. > > So, it's be a local unix socket, like postgres do. > >Ah, in that case it looks like the docs need to be updated because the man pages and the wiki contain documentation that indicates TCP sockets should work: (from man doveadm-quota) -S socket_path The option's argument is either an absolute path to a local UNIX domain socket, or a hostname and port (hostname:port), in order to connect a remote host via a TCP socket. This allows an administrator to execute doveadm(1) mail commands through the given socket.> > 2010/12/21 David Warden <warden at geneseo.edu> > I apologize if this is a stupid question but I just compiled 2.0.8 and am trying to use doveadm to get the quota for a user using the -S <socket_path> option because I have different options for the various local IPs that dovecot listens on. > > For example, my default quota is filesystem (NFS rquota) and I can get that by doing: > > doveadm quota get -u warden > > which tells me: > > Quota name Type Value Limit % > User quota STORAGE 1313476 1766400 74 > > But when I try to get my quota on a different local IP using the -S flag to doveadm: > > doveadm quota get -u warden -S 137.238.2.244:143 > > I am told: > > get: invalid option -- S > > The strange thing is doveadm's usage says that the -S option is valid for quite a few commands and in the man pages for those commands it looks like they should work for the way I'm calling doveadm. In the 2.0.8 source I also see code that looks like it should be parsing the -S flag. > > I can telnet to 127.0.0.1:143 and do ". getquotaroot inbox" which gives me the same information as "doveadm quota get -u warden" and I can telnet to 137.238.2.244:143 and ". getquotaroot inbox" also tells me my quota, but I'm hoping to use doveadm to periodically recalc my Maildir++ quota and update the squat FTS indexes and for that to happen doveadm needs to be able to be told what local IP address/port to connect to (I think). > > Here's my doveconf -n: > > # 2.0.8: /etc/dovecot/dovecot.conf > # OS: Linux 2.6.18-194.26.1.0.1.el5 x86_64 Red Hat Enterprise Linux Server release 5.5 (Tikanga) nfs > auth_cache_size = 10 M > auth_master_user_separator = * > auth_mechanisms = plain login > auth_username_format = %Ln > deliver_log_format = msgid="%m" subject="%s" from="%f" size=%p result="%$" > first_valid_uid = 0 > lda_mailbox_autocreate = yes > lda_mailbox_autosubscribe = yes > login_log_format_elements = user=%u method=%m rip=%r lip=%l lport=%a mpid=%e encryption=%c > mail_location = maildir:/home/%Lu/Maildir:CONTROL=/Mail/mailhome/%Lu/.dovecot:INDEX=/Mail/mailhome/%Lu/.dovecot > mail_log_prefix = "service=%s user=%u rip=%r lip=%l " > mail_nfs_storage = yes > mail_plugins = zlib quota mail_log notify fts fts_squat > managesieve_notify_capability = mailto > managesieve_sieve_capability = fileinto reject envelope encoded-character vacation subaddress comparator-i;ascii-numeric relational regex imap4flags copy include variables body enotify environment mailbox date > mbox_write_locks = fcntl > namespace { > inbox = yes > location > prefix = INBOX. > separator = . > type = private > } > passdb { > args = /etc/dovecot/passwd.masterusers > driver = passwd-file > master = yes > } > passdb { > args = cache_key=%u dovecot > driver = pam > } > plugin { > autocreate = Trash > autocreate2 = Drafts > autocreate3 = Sent > autosubscribe = Trash > autosubscribe2 = Drafts > autosubscribe3 = Sent > fts = squat > mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename flag_change append > mail_log_fields = uid box msgid size from subject flags > mail_log_group_events = yes > quota = fs:User quota > quota_exceeded_message = Quota exceeded (mailbox for user is full). Please see http://go.geneseo.edu/emailoverquota for help deleting messages while over quota. > sieve = /Mail/mailhome/%Lu/.filter.sieve > sieve_dir = /Mail/mailhome/%Lu/.sievedir > } > postmaster_address = postmaster at geneseo.edu > protocols = imap pop3 sieve > quota_full_tempfail = yes > service managesieve-login { > inet_listener sieve { > port = 4190 > } > } > ssl_cert = </etc/pki/dovecot/certs/dovecot.pem > ssl_key = </etc/pki/dovecot/private/dovecot.pem > userdb { > driver = passwd > } > verbose_proctitle = yes > protocol lmtp { > mail_plugins = zlib quota mail_log notify fts fts_squat sieve > } > protocol lda { > mail_plugins = zlib quota mail_log notify fts fts_squat sieve zlib > } > protocol imap { > imap_logout_format = bytes(in/out)=%i/%o > mail_max_userip_connections = 50 > mail_plugins = zlib quota mail_log notify fts fts_squat quota imap_quota autocreate imap_zlib fts fts_squat > } > protocol sieve { > managesieve_logout_format = bytes(in/out)=%i/%o > } > protocol pop3 { > pop3_client_workarounds = outlook-no-nuls oe-ns-eoh > pop3_logout_format = bytes(in/out)=%i/%o, top=%t/%p, retr=%r/%b, del=%d/%m, mailbox-size=%s > pop3_uidl_format = UID%u-%v > } > local 137.238.2.244 { > mail_location = maildir:/Mail/mailhome/$Lu/mailtest/Maildir:CONTROL=/Mail/mailhome/%Lu/mailtest/.dovecot2-control:INDEX=/Mail/mailhome/%Lu/mailtest/.dovecot2-index > namespace { > location > prefix > } > plugin { > quota = maildir:User quota > quota_rule = *:storage=200M > quota_rule2 = Trash:storage=+50M > zlib_save = gz > zlib_save_level = 6 > } > } > local 137.238.1.1 { > protocol imap { > ssl_cert = </etc/pki/tls/certs/imaps.geneseo.edu.crt > ssl_key = </etc/pki/tls/private/imaps.geneseo.edu.key > } > } > local 137.238.2.244 { > protocol imap { > ssl_cert = </etc/pki/tls/certs/mailtest.geneseo.edu.crt > ssl_key = </etc/pki/tls/private/mailtest.geneseo.edu.key > } > } > local 137.238.1.1 { > protocol pop3 { > ssl_cert = </etc/pki/tls/certs/imaps.geneseo.edu.crt > ssl_key = </etc/pki/tls/private/imaps.geneseo.edu.key > } > } > local 137.238.2.244 { > protocol pop3 { > ssl_cert = </etc/pki/tls/certs/mailtest.geneseo.edu.crt > ssl_key = </etc/pki/tls/private/mailtest.geneseo.edu.key > } > } > >
Timo Sirainen
2010-Dec-30 11:52 UTC
[Dovecot] doveadm "-S <socket_path>" option enabled in 2.0.8?
On Tue, 2010-12-21 at 14:55 -0500, David Warden wrote:> But when I try to get my quota on a different local IP using the -S flag to doveadm: > > doveadm quota get -u warden -S 137.238.2.244:143The purpose of -S is completely different. It's about connecting to another doveadm instance. There's currently no way to set IP for doveadm queries. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 198 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20101230/0732896d/attachment-0002.bin>
Kelsey Cummings
2011-Jun-01 23:59 UTC
[Dovecot] doveadm "-S <socket_path>" option enabled in 2.0.8?
On Thu, Dec 30, 2010 at 01:52:53PM +0200, Timo Sirainen wrote:> On Tue, 2010-12-21 at 14:55 -0500, David Warden wrote: > > > But when I try to get my quota on a different local IP using the -S flag to doveadm: > > > > doveadm quota get -u warden -S 137.238.2.244:143 > > The purpose of -S is completely different. It's about connecting to > another doveadm instance. There's currently no way to set IP for doveadm > queries.Just to bump an old thread. Timo, I think this would be a great feature to add. It would allow people to pull stats (and system health) directly out of dovecot rather than having to run agents on the dovecot servers to get the info into some other transport like SNMP. -- Kelsey Cummings - kgc at corp.sonic.net sonic.net, inc. System Architect 2260 Apollo Way 707.522.1000 Santa Rosa, CA 95407