Add-ons for Mercury
SmtpEvt event daemon for MercuryS

This is an event daemon for Mercury. An event daemon has the ability to interact closely with Mercury modules, in this case the SMTP server module, and change the way a message is processed.
The SmtpEvt daemon is based on the previous RcptEvt and RcptCheck daemons but has some added functionality.
In most cases it's probably a good strategy to leave the option "Accept mail for invalid local addresses" unchecked in MercuryS configuration and have the SMTP server refuse deliveries for non-existent local mailboxes. Still there may be circumstances where you prefer to receive mail even if for instance the recipients address has been slightly misspelled (which is why the option exists, obviously).
The SmtpEvt daemon will attempt to combine the information known by MercuryS before the message body is received to reject messages for non-existent local mailboxes that most likely are junk. It will check for X-Blocked headers added by blacklists and sending characteristics often used by spam bots, and will see if the message is a notification (delivery failure notifications to non-existent mailboxes are presumably never worth receiving).
Testing has shown that this actually works surprisingly well. The daemon itself is very lightweight and should not increase system load noticeably. Still, I would not recommend using it in production unless you have first verified that it behaves satisfactorily in your environment.
To install it, copy SmtpEvt.dll to the Mercury directory and add the following line to the [Daemons] section of DAEMON.INI: SmtpEvent = smtpevt.dll
Additional features:


  • The daemon has the option to block messages with a bad local sender address. If a MAIL FROM command with an address that belongs to a local domain is issued the daemon will check if the mailbox exists. If not, the connection will be terminated. If 5 such messages are received within 5 minutes the host will be added to the short-term blacklist.
  • If a message with identical MAIL FROM and RCPT TO is found it will receive an informational header saying "X-Identical: From and Rcpt identical". If the sender is on a blacklist the connection will instead be terminated.
  • The daemon will watch out for mass mailings with big attachments from local users that will be likely to put the server under heavy load. If the number of recipients is too high and the message is too large the message will be refused.
  • Check Subject header for spam indicators that you have added to a list. If there is a match and the message is either for a bad local recipient or the host IP is a DNSBL hit the session is terminated and the host is added to short-term blacklist. To enable the configuration dialog for this feature please add the following line to the [Daemon_Config] section of DAEMON.INI: SmtpEvent = smtpevt.dllFile updated March 2019.

SmtpEvt.zip


This is an event daemon for Mercury. An event daemon has the ability to interact closely with Mercury modules, in this case the SMTP server module, and change the way a message is processed. The SmtpEvt daemon is based on the previous RcptEvt and RcptCheck daemons but has some added functionality. In most cases it's probably a good strategy to leave the option "Accept mail for invalid local addresses" unchecked in MercuryS configuration and have the SMTP server refuse deliveries for non-existent local mailboxes. Still there may be circumstances where you prefer to receive mail even if for instance the recipients address has been slightly misspelled (which is why the option exists, obviously). The SmtpEvt daemon will attempt to combine the information known by MercuryS before the message body is received to reject messages for non-existent local mailboxes that most likely are junk. It will check for X-Blocked headers added by blacklists and sending characteristics often used by spam bots, and will see if the message is a notification (delivery failure notifications to non-existent mailboxes are presumably never worth receiving). Testing has shown that this actually works surprisingly well. The daemon itself is very lightweight and should not increase system load noticeably. Still, I would not recommend using it in production unless you have first verified that it behaves satisfactorily in your environment. To install it, copy SmtpEvt.dll to the Mercury directory and add the following line to the [Daemons] section of  DAEMON.INI: SmtpEvent = smtpevt.dll Additional features: - The daemon has the option to block messages with a bad local sender address. If a MAIL FROM command with an address that belongs to a local domain is issued the daemon will check if the mailbox exists. If not, the connection will be terminated. If 5 such messages are received within 5 minutes the host will be added to the short-term blacklist. - If a message with identical MAIL FROM and RCPT TO is found it will receive an informational header saying "X-Identical: From and Rcpt identical". If the sender is on a blacklist the connection will instead be terminated. - The daemon will watch out for mass mailings with big attachments from local users that will be likely to put the server under heavy load. If the number of recipients is too high and the message is too large the message will be refused.  - Check Subject header for spam indicators that you have added to a list. If there is a match and the message is either for a bad local recipient or the host IP is a DNSBL hit the session is terminated and the host is added to short-term blacklist. To enable the configuration dialog for this feature please add the following line to the [Daemon_Config] section of DAEMON.INI: SmtpEvent = smtpevt.dll File updated March 2019. [SmtpEvt.zip](serve/attachment&path=60fa14eb97984)
edited Jul 23 '21 at 2:04 am
live preview
enter atleast 10 characters
WARNING: You mentioned %MENTIONS%, but they cannot see this message and will not be notified
Saving...
Saved
With selected deselect posts show selected posts
All posts under this topic will be deleted ?
Pending draft ... Click to resume editing
Discard draft