diff options
| author | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-20 01:21:08 +0000 |
|---|---|---|
| committer | Laurent Bercot <ska-skaware@skarnet.org> | 2026-05-20 01:21:08 +0000 |
| commit | 63c10ea49627209703d9160e3b47445f07b23f0e (patch) | |
| tree | 930c376277b41528c698a92580ed49a90a31374f | |
| parent | f68c2cb9874652bbdde21704c55905c673f1fa98 (diff) | |
| download | smtpd-starttls-proxy-63c10ea49627209703d9160e3b47445f07b23f0e.tar.gz | |
Prepare for 0.1.1.0; add --qmailrundir
| -rw-r--r-- | INSTALL | 6 | ||||
| -rw-r--r-- | NEWS | 7 | ||||
| -rwxr-xr-x | configure | 19 | ||||
| -rw-r--r-- | doc/index.html | 8 | ||||
| -rw-r--r-- | doc/upgrade.html | 9 | ||||
| -rw-r--r-- | package/configure-snippets/configure_case_lines | 3 | ||||
| -rw-r--r-- | package/configure-snippets/configure_expand_dirs | 2 | ||||
| -rw-r--r-- | package/configure-snippets/configure_generate_configh | 4 | ||||
| -rw-r--r-- | package/configure-snippets/configure_generate_make | 3 | ||||
| -rw-r--r-- | package/configure-snippets/configure_help_install | 3 | ||||
| -rw-r--r-- | package/configure-snippets/configure_help_options | 1 | ||||
| -rw-r--r-- | package/configure-snippets/configure_init_vars | 3 | ||||
| -rw-r--r-- | package/deps-build | 4 | ||||
| -rw-r--r-- | package/info | 2 | ||||
| -rw-r--r-- | src/qmail-remote/qmailr_tcpto.c | 4 | ||||
| -rw-r--r-- | src/qmail-remote/smtproutes.c | 18 |
16 files changed, 61 insertions, 35 deletions
@@ -6,9 +6,9 @@ Build Instructions - A POSIX-compliant C development environment - GNU make version 3.81 or later - - skalibs version 2.15.0.0 or later: https://skarnet.org/software/skalibs/ - - s6 version 2.15.0.0 or later: https://skarnet.org/software/s6/ - - s6-networking version 2.7.3.0 or later: https://skarnet.org/software/s6-networking/ + - skalibs version 2.15.0.1 or later: https://skarnet.org/software/skalibs/ + - s6 version 2.15.0.1 or later: https://skarnet.org/software/s6/ + - s6-networking version 2.8.0.0 or later: https://skarnet.org/software/s6-networking/ This software will run on any operating system that implements POSIX.1-2024, available at: @@ -1,5 +1,12 @@ Changelog for smtpd-starttls-proxy. +In 0.1.1.0 +---------- + + - Bugfixes. + - Support for --qmailrundir + + In 0.1.0.0 ---------- @@ -25,7 +25,8 @@ Fine tuning of the installation directories: --includedir=DIR C header files [PREFIX/include] --sysconfdir=DIR global configuration files [PREFIX/etc] --pkgconfdir=DIR pkg-config .pc files [PREFIX/lib/pkgconfig] - --qmaildir=DIR qmail installation directory [/var/qmail] + --qmaildir=QMAILDIR qmail installation directory [/var/qmail] + --qmailrundir=QMAILRUNDIR directory for run-time files [QMAILDIR/run] If no --prefix option is given, by default libdir (but not dynlibdir) will be /usr/lib, and includedir will be /usr/include. @@ -50,7 +51,6 @@ Optional features: --enable-pkgconfig Build and install .pc files for pkg-config [disabled] --enable-slashpackage[=ROOT] assume /package installation at ROOT [disabled] --enable-absolute-paths hardcode absolute BINDIR/foobar paths in binaries [disabled] - --with-qmail-home=DIR qmail installation directory [/var/qmail] --with-qmailr-ids=uid:gid qmail-remote user:group [qmailr:qmail] --enable-qmail-install setup qmail to use qmail-remote [disabled] EOF @@ -173,7 +173,8 @@ deplibpath='' vpaths='' vpathd='' build= -qmailhome=/var/qmail +qmaildir=/var/qmail +qmailrundir='$qmaildir/run' qmailrids=qmailr:qmail qmailinstall=false @@ -215,7 +216,8 @@ for arg ; do --disable-slashpackage) sproot= ; slashpackage=false ;; --enable-absolute-paths|--enable-absolute-paths=yes) abspath=true ;; --disable-absolute-paths|--enable-absolute-paths=no) abspath=false ;; - --qmaildir=*) qmailhome=${arg#*=} ;; + --qmaildir=*) qmaildir=${arg#*=} ;; + --qmailrundir=*) qmailrundir=${arg#*=} ;; --with-qmailr-ids=*) qmailrids=${arg#*=} ;; --enable-qmail-install|--enable-qmail-install=yes) qmailinstall=true ;; --disable-qmail-install|--enable-qmail-install=no) qmailinstall=false ;; @@ -247,7 +249,7 @@ fi # Expand installation directories stripdir prefix -for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysconfdir pkgconfdir sysdeps sproot qmailhome ; do +for i in exec_prefix dynlibdir libexecdir bindir libdir includedir sysconfdir pkgconfdir sysdeps sproot qmaildir qmailrundir ; do eval tmp=\${$i} eval $i=$tmp stripdir $i @@ -529,7 +531,8 @@ if $allpic ; then else echo "STATIC_LIBS_ARE_PIC :=" fi -echo "QMAIL_HOME := $qmailhome" +echo "QMAIL_HOME := $qmaildir" +echo "QMAIL_RUN := $qmailrundir" echo "QMAILR_IDS := $qmailrids" if $qmailinstall ; then echo 'INSTALL_QMAIL := 1' @@ -568,7 +571,9 @@ fi echo "#define ${package_macro_name}_LIBEXECPREFIX \"$libexecdir/\"" echo "#define ${package_macro_name}_SYSCONFPREFIX \"$sysconfdir/\"" echo "#undef ${package_macro_name}_QMAIL_HOME" -echo "#define ${package_macro_name}_QMAIL_HOME \"$qmailhome\"" +echo "#define ${package_macro_name}_QMAIL_HOME \"$qmaildir\"" +echo "#undef ${package_macro_name}_QMAIL_RUN" +echo "#define ${package_macro_name}_QMAIL_RUN \"$qmailrundir\"" echo echo "#endif" diff --git a/doc/index.html b/doc/index.html index 3121361..ee80fb5 100644 --- a/doc/index.html +++ b/doc/index.html @@ -43,11 +43,11 @@ SMTP client. <li> A POSIX-compliant system with a standard C development environment </li> <li> GNU make, version 3.81 or later </li> <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> version -2.15.0.0 or later. It's a build-time requirement. It's also a run-time +2.15.0.1 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the skalibs library. </li> <li> <a href="//skarnet.org/software/s6/">s6</a> version -2.15.0.0 or later. It's a build-time and run-time requirement. </li> +2.15.0.1 or later. It's a build-time and run-time requirement. </li> <li> <a href="//skarnet.org/software/s6-dns/">s6-dns</a> version 2.4.1.2 or later. It's a build-time requirement. It's also a run-time requirement if you link against the shared version of the s6-dns library. </li> @@ -66,8 +66,8 @@ if you link against the shared version of the s6-dns library. </li> <ul> <li> The current released version of smtpd-starttls-proxy is -<a href="smtpd-starttls-proxy-0.1.0.0.tar.gz">0.1.0.0</a>. -You can access its checksum <a href="smtpd-starttls-proxy-0.1.0.0.tar.gz.sha256">here</a>. </li> +<a href="smtpd-starttls-proxy-0.1.1.0.tar.gz">0.1.1.0</a>. +You can access its checksum <a href="smtpd-starttls-proxy-0.1.1.0.tar.gz.sha256">here</a>. </li> <li> You can checkout a copy of the <a href="//git.skarnet.org/cgi-bin/cgit.cgi/smtpd-starttls-proxy/">smtpd-starttls-proxy git repository</a>: diff --git a/doc/upgrade.html b/doc/upgrade.html index 6968ffa..372aed0 100644 --- a/doc/upgrade.html +++ b/doc/upgrade.html @@ -19,6 +19,15 @@ <h1> What has changed in smtpd-starttls-proxy </h1> +<h2> in 0.1.1.0 </h2> + +<ul> + <li> <a href="//skarnet.org/software/skalibs/">skalibs</a> +dependency bumped to 2.15.0.1 </li> + <li> <a href="//skarnet.org/software/s6/">s6</a> +dependency bumped to 2.15.0.1 </li> +</ul> + <h2> in 0.1.0.0 </h2> <ul> diff --git a/package/configure-snippets/configure_case_lines b/package/configure-snippets/configure_case_lines index abc541f..ce78996 100644 --- a/package/configure-snippets/configure_case_lines +++ b/package/configure-snippets/configure_case_lines @@ -1,4 +1,5 @@ - --qmaildir=*) qmailhome=${arg#*=} ;; + --qmaildir=*) qmaildir=${arg#*=} ;; + --qmailrundir=*) qmailrundir=${arg#*=} ;; --with-qmailr-ids=*) qmailrids=${arg#*=} ;; --enable-qmail-install|--enable-qmail-install=yes) qmailinstall=true ;; --disable-qmail-install|--enable-qmail-install=no) qmailinstall=false ;; diff --git a/package/configure-snippets/configure_expand_dirs b/package/configure-snippets/configure_expand_dirs index f9a8b46..48dec28 100644 --- a/package/configure-snippets/configure_expand_dirs +++ b/package/configure-snippets/configure_expand_dirs @@ -1 +1 @@ -qmailhome +qmaildir qmailrundir diff --git a/package/configure-snippets/configure_generate_configh b/package/configure-snippets/configure_generate_configh index d9bcacf..65353b6 100644 --- a/package/configure-snippets/configure_generate_configh +++ b/package/configure-snippets/configure_generate_configh @@ -1,3 +1,5 @@ echo "#undef ${package_macro_name}_QMAIL_HOME" -echo "#define ${package_macro_name}_QMAIL_HOME \"$qmailhome\"" +echo "#define ${package_macro_name}_QMAIL_HOME \"$qmaildir\"" +echo "#undef ${package_macro_name}_QMAIL_RUN" +echo "#define ${package_macro_name}_QMAIL_RUN \"$qmailrundir\"" diff --git a/package/configure-snippets/configure_generate_make b/package/configure-snippets/configure_generate_make index 83bdb9d..1c51b42 100644 --- a/package/configure-snippets/configure_generate_make +++ b/package/configure-snippets/configure_generate_make @@ -1,4 +1,5 @@ -echo "QMAIL_HOME := $qmailhome" +echo "QMAIL_HOME := $qmaildir" +echo "QMAIL_RUN := $qmailrundir" echo "QMAILR_IDS := $qmailrids" if $qmailinstall ; then echo 'INSTALL_QMAIL := 1' diff --git a/package/configure-snippets/configure_help_install b/package/configure-snippets/configure_help_install index 4ae3171..3a24c59 100644 --- a/package/configure-snippets/configure_help_install +++ b/package/configure-snippets/configure_help_install @@ -1,2 +1,3 @@ - --qmaildir=DIR qmail installation directory [/var/qmail] + --qmaildir=QMAILDIR qmail installation directory [/var/qmail] + --qmailrundir=QMAILRUNDIR directory for run-time files [QMAILDIR/run] diff --git a/package/configure-snippets/configure_help_options b/package/configure-snippets/configure_help_options index 769f3a2..680fc72 100644 --- a/package/configure-snippets/configure_help_options +++ b/package/configure-snippets/configure_help_options @@ -1,3 +1,2 @@ - --with-qmail-home=DIR qmail installation directory [/var/qmail] --with-qmailr-ids=uid:gid qmail-remote user:group [qmailr:qmail] --enable-qmail-install setup qmail to use qmail-remote [disabled] diff --git a/package/configure-snippets/configure_init_vars b/package/configure-snippets/configure_init_vars index 2a2dd1c..c8b1560 100644 --- a/package/configure-snippets/configure_init_vars +++ b/package/configure-snippets/configure_init_vars @@ -1,3 +1,4 @@ -qmailhome=/var/qmail +qmaildir=/var/qmail +qmailrundir='$qmaildir/run' qmailrids=qmailr:qmail qmailinstall=false diff --git a/package/deps-build b/package/deps-build index f2102a0..4ad4af6 100644 --- a/package/deps-build +++ b/package/deps-build @@ -1,4 +1,4 @@ -true true /package/prog/skalibs 2.15.0.0 libskarnet -true false /package/admin/s6 2.15.0.0 libs6 +true true /package/prog/skalibs 2.15.0.1 libskarnet +true false /package/admin/s6 2.15.0.1 libs6 true false /package/web/s6-dns 2.4.1.2 libs6dns true false /package/net/s6-networking 2.8.0.0 diff --git a/package/info b/package/info index 8c539c9..dc8e0ad 100644 --- a/package/info +++ b/package/info @@ -1,4 +1,4 @@ package=smtpd-starttls-proxy -version=0.1.0.0 +version=0.1.1.0 category=mail package_macro_name=SMTPD_STARTTLS_PROXY diff --git a/src/qmail-remote/qmailr_tcpto.c b/src/qmail-remote/qmailr_tcpto.c index c015d21..3f25a95 100644 --- a/src/qmail-remote/qmailr_tcpto.c +++ b/src/qmail-remote/qmailr_tcpto.c @@ -40,7 +40,7 @@ int qmailr_tcpto_match (char const *ip, int is6) { - char const *file = is6 ? SMTPD_STARTTLS_PROXY_QMAIL_HOME "/run/qmail-remote/tcpto6" : SMTPD_STARTTLS_PROXY_QMAIL_HOME "/queue/lock/tcpto" ; + char const *file = is6 ? SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/tcpto6" : SMTPD_STARTTLS_PROXY_QMAIL_HOME "/queue/lock/tcpto" ; uint32_t iplen = is6 ? 16 : 4 ; uint32_t width = iplen + 12 ; int r = 0 ; @@ -83,7 +83,7 @@ int qmailr_tcpto_match (char const *ip, int is6) int qmailr_tcpto_update (char const *ip, int is6, int problem) { - char const *file = is6 ? SMTPD_STARTTLS_PROXY_QMAIL_HOME "/run/qmail-remote/tcpto6" : SMTPD_STARTTLS_PROXY_QMAIL_HOME "/queue/lock/tcpto" ; + char const *file = is6 ? SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/tcpto6" : SMTPD_STARTTLS_PROXY_QMAIL_HOME "/queue/lock/tcpto" ; uint32_t iplen = is6 ? 16 : 4 ; uint32_t width = iplen + 12 ; uint32_t n ; diff --git a/src/qmail-remote/smtproutes.c b/src/qmail-remote/smtproutes.c index 9155000..f896b1c 100644 --- a/src/qmail-remote/smtproutes.c +++ b/src/qmail-remote/smtproutes.c @@ -176,19 +176,19 @@ static inline void smtproutes_compile (int fdr, int fdw) int smtproutes_init (smtproutes *routes) { - static char const *cdbfile = SMTPD_STARTTLS_PROXY_QMAIL_HOME "/run/qmail-remote/smtproutes.cdb" ; - static char const *lckfile = SMTPD_STARTTLS_PROXY_QMAIL_HOME "/run/qmail-remote/smtproutes.lock" ; + static char const *cdbfile = SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb" ; + static char const *lckfile = SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.lock" ; static char const *txtfile = SMTPD_STARTTLS_PROXY_QMAIL_HOME "/control/smtproutes" ; - static size_t const cdblen = sizeof(SMTPD_STARTTLS_PROXY_QMAIL_HOME "/run/qmail-remote/smtproutes.cdb") - 1 ; + static size_t const cdblen = sizeof(SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb") - 1 ; int fdl = openc_create(lckfile) ; - if (fdl == -1) qmailr_tempusys("open ", "run/qmail-remote/smtproutes.lock") ; - if (fd_lock(fdl, 1, 0) == -1) qmailr_tempusys("lock ", "run/qmail-remote/smtproutes.lock") ; + if (fdl == -1) qmailr_tempusys("open ", SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.lock") ; + if (fd_lock(fdl, 1, 0) == -1) qmailr_tempusys("lock ", SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.lock") ; int fdc = openc_read(cdbfile) ; if (fdc >= 0) { struct stat stc, str ; - if (fstat(fdc, &stc) == -1) qmailr_tempusys("fstat ", "run/qmail-remote/smtproutes.cdb") ; + if (fstat(fdc, &stc) == -1) qmailr_tempusys("fstat ", SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb") ; if (stat(txtfile, &str) == -1) { if (errno != ENOENT) qmailr_tempusys("fstat ", "control/smtproutes") ; @@ -221,7 +221,7 @@ int smtproutes_init (smtproutes *routes) } useit: - if (!cdb_init_fromfd(&routes->map, fdc)) qmailr_tempusys("mmap ", "run/qmail-remote/smtproutes.cdb") ; + if (!cdb_init_fromfd(&routes->map, fdc)) qmailr_tempusys("mmap ", SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb") ; fd_close(fdc) ; fd_close(fdl) ; return 1 ; @@ -236,10 +236,10 @@ int smtproutes_match (smtproutes const *routes, char const *s, stralloc *sa, siz { cdb_data data ; int r = cdb_find(&routes->map, &data, s, strlen(s)+1) ; - if (r == -1) qmailr_temp("Invalid run/qmail-remote/smtproutes.cdb") ; + if (r == -1) qmailr_temp("Invalid " SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb") ; if (!r) return 0 ; if (data.len < 3) return 0 ; - if (data.s[data.len - 1]) qmailr_temp("Invalid ", "run/qmail-remote/smtproutes.cdb") ; + if (data.s[data.len - 1]) qmailr_temp("Invalid " SMTPD_STARTTLS_PROXY_QMAIL_RUN "/qmail-remote/smtproutes.cdb") ; *pos = sa->len ; uint16_unpack_big(data.s, port) ; if (!stralloc_catb(sa, data.s + 2, data.len - 2)) dienomem() ; |
