How to get a list of Dovecot IMAP users

265

To get a list of logins:

cat /var/log/mail.log | grep imap-login 

Now we need to cut it down to something a little more useable -- filter out the username, and eliminate duplicates:

cat /var/log/mail.log | grep imap-login:\ Login | sed -e 's/.*Login: user=<\(.*\)>, method=.*/\1/g' | sort | uniq

This gets the imap logins that complete (supply a name), uses sed with a regex to cut out the name, sorts it and then takes the unique names.

Share:
265

Related videos on Youtube

rzepsn
Author by

rzepsn

Updated on September 18, 2022

Comments

  • rzepsn
    rzepsn almost 2 years

    What does "element" selector in Primefaces CSS mean/do? And how to access it, change css rules inside it?.

    please check this image for details

    Background: I am trying to change width of PrimeFaces element, selectOneMenu for example, but what seems to be blocking me is style rule inside element{}- min-width in my case. I would like to override it in custom css or with style attribute but don't know how to access it.

    I've unsuccessfully tried:

    • p:selectOneMenu style="min-width:100px"
    • applying styleClass
  • Colt McCormack
    Colt McCormack over 11 years
    Thank you! So much cleaner than the PHP script I wrote to do it. I REALLY need to learn how to use regex without just googling ten million different things until something works.
  • TerraElise
    TerraElise over 7 years
    @AgnesR great! Mark answer as accepted if you can. Best of luck!