1

Topic: Last login for SMTP

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): latest
- Deployed with iRedMail Easy or the downloadable installer? installer
- Linux/BSD distribution name and version: n/a
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): n/a
- Web server (Apache or Nginx): n/a
- Manage mail accounts with iRedAdmin-Pro? yes
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

Hello Zhang,

IMAP and POP3 last login is great to clean old/unused mailboxes.

In our case we use many mailboxes for email sending only (SMTP Auth).
Are these login times logged as well?

AFAIK "last login" feature is pure dovecot.

SMTP last login will be required to be done via postfix.

Any thoughts on that?

Best regards,

Bernhard

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: Last login for SMTP

SMTP login is done by Postfix, although it uses Dovecot as SASL AUTH server.
I have no idea how to log this right now.

3

Re: Last login for SMTP

you could write some script to monitor the maillog and look for when a connection was made from particular users. For example when I send with Roundcube:
Jun 15 10:47:02 recmail20qa postfix/submission/smtpd[19810]: 49lvLG2Rnkz3Y: client=localhost.localdomain[127.0.0.1], sasl_method=LOGIN, sasl_username=postmaster@domain.com
and mail client:
Jun 15 10:54:34 corpmail09qa postfix/submission/smtpd[6487]: 49lvVy1Y4qz6G: client=MyHost.MyDomain.com[69.22.22.22], sasl_method=PLAIN, sasl_username=paulc@MyDomain.com