1 (edited by gotan_bl 2021-01-15 02:57:19)

Topic: Nginx (roundcube) $remote_user in access.log

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.3.2
- Deployed with iRedMail Easy or the downloadable installer?downlodable installer
- Linux/BSD distribution name and version: CentOS7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
I want that in my Nginx access.log have information about remote_user who is accessing my web server via Roundcube Webmail(version 1.4.9).

Example of log:

IP_ADDRESS - - [14/Jan/2021:19:43:54 +0100] "POST /mail/?_task=mail&_action=refresh HTTP/2.0" 200 138 "https://DOMAIN/mail/?_task=mail&_mbox=INBOX" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

This is standard Nginx predifined combined log

$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent"

I want to see $remote_user field to be $imap_user who is logged via Rouncube Webmail.
Does it possible to map $remote_user -> $imap_user in Nginx setup?

Wanted log:

IP_ADDRESS - USER [14/Jan/2021:19:43:54 +0100] "POST /mail/?_task=mail&_action=refresh HTTP/2.0" 200 138 "https://DOMAIN/mail/?_task=mail&_mbox=INBOX" "Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Firefox/78.0"

----

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

2

Re: Nginx (roundcube) $remote_user in access.log

Didn't try this before, i'm afraid that you're on your own.