[Bug 236605] mail/sendmail: additional blacklisting for frequent useless connections [patch]
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Sun Mar 17 17:13:20 UTC 2019
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236605
Bug ID: 236605
Summary: mail/sendmail: additional blacklisting for frequent
useless connections [patch]
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Only Me
Priority: ---
Component: Individual Port(s)
Assignee: dinoex at FreeBSD.org
Reporter: freebsd at oldach.net
Assignee: dinoex at FreeBSD.org
Flags: maintainer-feedback?(dinoex at FreeBSD.org)
Created attachment 202938
--> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=202938&action=edit
patch
In my maillog, I often observe hosts frequently contacting my sendmail without
issuing any reasonable command, like this for example:
Mar 17 03:02:04 nuc sm-mta[98005]: x2H21q18098005: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:02:15 nuc sm-mta[98132]: x2H2278J098132: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:02:27 nuc sm-mta[98166]: x2H22JfW098166: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:02:36 nuc sm-mta[98167]: x2H22SXD098167: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:02:44 nuc sm-mta[98168]: x2H22aUN098168: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:02:53 nuc sm-mta[98169]: x2H22if3098169: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:03:01 nuc sm-mta[98170]: x2H22rvQ098170: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:03:09 nuc sm-mta[98176]: x2H231fG098176: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:03:17 nuc sm-mta[98177]: x2H239Q3098177: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
Mar 17 03:03:26 nuc sm-mta[98211]: x2H23I3V098211: [221.227.107.69] did not
issue MAIL/EXPN/VRFY/ETRN during connection to IPv4
In some cases I have observed hundreds of such connection attempts before
giving up.
As we have blacklisting in the port, I was thinking to use that for calming
down such servers. However it appears this particular logic is not in the
blacklisting patch set yet.
The attached patch implements this. Admittedly it's kind of hackish as the "did
not issue" message is emitted only when sendmail's input file descriptor is
already closed, so we cannot use it for hand-over to blacklist() in the same
way as it's done for the other blacklist() calls. Therefore I'm dup()ing the
input fd early in the command loop for use by blacklist() and close the dup'ed
fd later.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-ports-bugs
mailing list