[Dovecot] doveadm who

Timo Sirainen tss at iki.fi
Fri Oct 23 03:43:45 EEST 2009


Pascal Volk suggested this, and it was pretty quick to implement for
Dovecot v2.0. Ideas welcome how to improve it, or if it's already
perfect :)

The first line is written to stderr, so |sort can be used:

# doveadm who|sort 
username                        # (ips) (pids)
timo                            1 (127.0.0.1) (2457)
tss                             2 (127.0.0.1) (617 1345)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)

# doveadm who|sort -k2 -nr
username                        # (ips) (pids)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)
tss                             2 (127.0.0.1) (617 1345)
timo                            1 (127.0.0.1) (2457)

You can filter connections:

# doveadm who 127.0.0.2
username                        # (ips) (pids)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)

# doveadm who 127.0.0.0/24
username                        # (ips) (pids)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)
timo                            1 (127.0.0.1) (2457)
tss                             2 (127.0.0.1) (617 1345)

# doveadm who tss
username                        # (ips) (pids)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)
tss                             2 (127.0.0.1) (617 1345)

# doveadm who tss 127.0.0.1
username                        # (ips) (pids)
tss2                            2 (127.0.0.2 127.0.0.1) (2392 2799)
tss                             2 (127.0.0.1) (617 1345)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://dovecot.org/pipermail/dovecot/attachments/20091022/d0d48840/attachment.bin 


More information about the dovecot mailing list