Page MenuHomeFreeBSD

Improve blacklistd support in mail/sendmail port
ClosedPublic

Authored by lidl on Dec 13 2017, 4:47 AM.
Tags
None
Referenced Files
F81698370: D13475.diff
Sat, Apr 20, 3:12 AM
F81689926: D13475.diff
Fri, Apr 19, 11:59 PM
F81657459: D13475.diff
Fri, Apr 19, 1:52 PM
Unknown Object (File)
Feb 25 2024, 5:26 AM
Unknown Object (File)
Feb 19 2024, 2:29 PM
Unknown Object (File)
Feb 19 2024, 2:29 PM
Unknown Object (File)
Feb 19 2024, 2:29 PM
Unknown Object (File)
Feb 19 2024, 2:17 PM
Subscribers

Details

Reviewers
dinoex
emaste
Summary

Rather than hacking the support into main.c, properly construct
a better diff against sendmail.

Now requires a configuration file option, or command line option to
enable blacklistd support, but this means the support can be
distributed in all binaries, and only activated when needed.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dinoex requested changes to this revision.Dec 16 2017, 6:49 AM

instead of hard define(`bldSOURCES') is sould be better to extend the the m4 macro in a seperate line,
else the given patch will break with new sendmail releases.

This revision now requires changes to proceed.Dec 16 2017, 6:49 AM

Since the blacklistd support now needs to be enabled at runtime,
it is safe to turn on support for it in all cases, so do that in the Makefile.

Adjust how blacklistd.c is added to the sendmail/Makefile.m4 file,
as requested in review.

Fixed an error where a non-blacklistd related change to Makefile.m4
was dropped in the previous version of the patch.

in case blacklist is not used, the extra calls to sm_io_getinfo are not covered my the #ifdef

fd = sm_io_getinfo( ... )

Is this intentional?

Pretty much, yes.

I didn't think it was worthwhile cluttering up the files with extra
#ifdef/#endif pairs around the allocation of the variable and
the setting of the variable.

Makefile
82–85

This cannot possibly work. You cannot change the content of OPTIONS_DEFAULT after including b.p.options.mk. (Well, you can change it, it simply will not do anything.)

Ok, I see where my testing lead me to believe this worked. Turns out the 'make config'
stage was picking up an options file that I did not believe existed.

Is there a way to alter the DEFAULT_OPTIONS such that they are different on
FreeBSD 11.x (and newer) compared to the settings for older releases?

There are no simple ways, no.

If blacklistd has is not supported before 11, what you can do is:

OPTIONS_EXCLUDE_FreeBSD_10= BLACKLISTD

Is FreeBSD10 the only other OS version that is still supported for building /usr/ports
and the only one that needs to be listed this way?

FreeBSD10 and FreeBSD11 are supported for building /usr/ports

so we can add to OPTIONS:DEFAULT and disabled it on FreeBSD10.

The build on FreeBSD10 still failed:

../../sendmail/sendmail.h:60:10: fatal error: 'blacklist.h' file not found
#include <blacklist.h>

^

1 error generated.

I had to skip the include in sendmail.h:
+#if USE_BLACKLIST
+#include <blacklist.h>
+#endif

I have a cleaned up patch in testing, but i conflicts with the recent smtputf8 commit.

The patch was merged and commited.

please close D13475
the patches have been merged.

This revision is now accepted and ready to land.Jan 15 2018, 12:48 PM