Allow disabling logging for specific source IPs

This commit is contained in:
Andris Reinman 2017-10-12 16:05:22 +03:00
parent 69bc32db6e
commit 75f9420c3c
2 changed files with 2 additions and 2 deletions

View file

@ -237,7 +237,7 @@ class IMAPServer extends EventEmitter {
if (params[1]) {
socketOptions.remoteAddress = params[1].trim().toLowerCase();
socketOptions.ignore = this.options.ignoredHosts && this.options.ignoredHosts.includes(socket.remoteAddress);
socketOptions.ignore = this.options.ignoredHosts && this.options.ignoredHosts.includes(socketOptions.remoteAddress);
if (!socketOptions.ignore) {
this.logger.info(

View file

@ -294,7 +294,7 @@ class POP3Server extends EventEmitter {
if (params[1]) {
socketOptions.remoteAddress = params[1].trim().toLowerCase();
socketOptions.ignore = this.options.ignoredHosts && this.options.ignoredHosts.includes(socket.remoteAddress);
socketOptions.ignore = this.options.ignoredHosts && this.options.ignoredHosts.includes(socketOptions.remoteAddress);
if (!socketOptions.ignore) {
this.logger.info(