<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/xhtml; charset=utf-8">
</head>
<body>
<div style="font-family:sans-serif"><div style="white-space:normal">
<p dir="auto">Hi there,</p>
<p dir="auto">For an email proxying setup using the open source version of Nginx, I have a configuration stanza along these lines:</p>
<pre style="background-color:#E4E4E4; border:thin solid gray; margin-left:15px; margin-right:15px; max-width:90vw; overflow-x:auto; padding:5px" bgcolor="#E4E4E4"><code>⋮
mail {
server_name mail.DOMAIN;
auth_http 127.0.0.1:8080/auth;
proxy_pass_error_message on;
imap_capabilities "IMAP4rev1" "UIDPLUS";
imap_auth login plain;
server {
protocol imap;
proxy on;
ssl on;
ssl_certificate ⋯;
ssl_certificate_key ⋯;
listen [::]:993 ssl;
listen 993 ssl;
}
⋮
}
⋮
</code></pre>
<p dir="auto">Proxying and authentication works as advertised, no issues. However, I've been unable to locate any piece of documentation indicating how to produce a suitable access log message (ie, a log tying the mail client with the backend server its connection was sent to). I've tried the <code>access_log</code> / <code>error_log</code> directives at various places in the configuration, to no avail.</p>
<p dir="auto">HTTP/HTTPS logging works as usual.</p>
<p dir="auto">Given how I've not seen any mention to logging in the various documents that describe SMTP/IMAP/POP proxying, I believe the functionality for this does not currently exist. This logging is very important for troubleshooting and support.</p>
<p dir="auto">Is there something I'm overlooking? If indeed the functionality doesn't exist, would it be possible for me to write and contribute the code required to add said logging?</p>
<p dir="auto">Thanks in advance.</p>
<p dir="auto">-lem</p>
</div>
</div>
</body>
</html>