Mat Newman November 22 2017 20:29:59

A question came in from a customer today which I've heard a number of times recently, so I thought I'd share the quick resolution.

"The customer has a Domino SMTP mail relay server. They have are a lot of external applications using this Domino SMTP mail relay server to receive and deliver the email to users and mail-in databases. From the log in Domino SMTP mail relay server, it only shows the sender IP address info. The customer is asking is it possible to have the sender ID like email address in the log file?"

Short answer. Yes. It's Domino. It can do ANYTHING.

Two things you can do here - Increase the Router logging level, and increase the Session logging level.

Log_MailRouting

If you set the Router log level to 40 (maximum output), you get everything. Server Connected, IP Address, Sender, Recipient. Everything is captured and every SMTP session is identified (notice in the below sample, I have a mail monitor set up that checks whether my SMTP service is running "monitor.*.*.*", it does nothing other than connect on port 25, but you can see that even a "probe" is captured, even if nothing is delivered; The other is my IBM Protector server "windu.*.*.*" connecting and actually delivering a message. I should really write more about IBM Protector - It's BRILLIANT!).

Set Config Log_MailRouting=40

At the server console to configure this, and have it immediately take effect.

Note: you can also change this setting in the server configuration document, however it will not take effect immediately as it does by setting it using the Console command.

Open the Servers Configuration Document,

Router/SMTP Tab,

Advanced Tab,

Controls Tab,

Change the Logging Level value to 'Verbose'

TIP: Doing this will get rid of the "Router: notes.ini setting for Log_Mailrouting being used (note - this option may now be configured in a Server Configuration document)" appearing in the server console.

Log_Sessions

If you increase the Session log level to the option introduced back with 8.5.1, you get all of the information about a server/users connection: Name, Client Version Number, IP address and access type (eg: C=native client), This works on all versions of Domino after 8.5.1

Set Config Log_Sessions=2

At the server console to configure this, and have it immediately take effect.

Is there a way to correlate the message details (sender, recipient, ip address)?

This type of logging can help only if you are processing a small number of messages but the moment that you start having multiple concurrent connections you are unable to understand anything as there's no unique ID that match them together message by message.

Even adding the process_id/thread_id doesn't seem to be enough as those can be reused for multiple messages