-1

I am working on a Dovecot server. My main purpose is to count number of users who checks their e-mail daily. How can i count number of Imap connections? I am new to these things by the way.

orbeffect
  • 3
  • 2
  • Do you want a snapshot, or a daily map, or a peak number? You are also aware that IMAP connections remain "open", unless something interupts them? – NickW Nov 12 '13 at 12:16
  • I am open to all analysis. I am aware of that thing. I looked at dovecot.log and imap connections recurring every minute. – orbeffect Nov 12 '13 at 12:30
  • What research have you done so far? – sgtbeano Nov 12 '13 at 12:35
  • You may write a script to parse dovecot logs and find the unique users within a certain timeframe (eg 1 day). This is in a similar way we parse sometimes apache logs to find unique addresses. – manjiki Nov 12 '13 at 12:38
  • The log file is a great place to start, running cut to filter out the important columns, then sorting with `unique -c` would at least give you an idea of how many individual connections from unique people you are getting. – NickW Nov 12 '13 at 12:38

1 Answers1

1

On my RHEL6 box the dovecot IMAP logins are logged in /var/log/maillog.

Easy sailing from there if you want to write your own scripts.

Installing logwatch and the dovecot extension from here should result in a daily message to root like this one:

--------------------- Dovecot Begin ------------------------ 
 Dovecot IMAP and POP3 Successful Logins: 4395
 Dovecot disconnects: 4365 
 ---------------------- Dovecot End ------------------------- 
HBruijn
  • 77,029
  • 24
  • 135
  • 201
  • My IMAP logins are in dovecot.log so i cant see Dovecot section in Logwatch. Which .conf file should i look for? – orbeffect Nov 13 '13 at 09:43
  • add your custom logfile to /etc/logwatch/conf/logwatch.conf with `Logfile = /path/to/dovecot.log` – HBruijn Nov 13 '13 at 11:28