summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--conf-break9
-rw-r--r--conf-cc18
-rw-r--r--conf-groups5
-rw-r--r--conf-idn28
-rw-r--r--conf-ids15
-rw-r--r--conf-ld11
-rw-r--r--conf-man7
-rw-r--r--conf-patrn6
-rw-r--r--conf-qlibs3
-rw-r--r--conf-spawn6
-rw-r--r--conf-split15
-rw-r--r--conf-ucspissl3
-rw-r--r--conf-users15
-rw-r--r--man/meson.build110
-rw-r--r--meson.build24
-rw-r--r--meson.options36
-rw-r--r--src/Makefile1521
-rw-r--r--src/auto-gid.c48
-rw-r--r--src/auto-int.c38
-rw-r--r--src/auto-int8.c38
-rw-r--r--src/auto-str.c44
-rw-r--r--src/auto-uid.c48
-rw-r--r--src/direntry.h18
-rw-r--r--src/direntry.h28
-rw-r--r--src/fifo.c4
-rw-r--r--src/fmtqfn.c6
-rw-r--r--src/fork.h17
-rw-r--r--src/fork.h27
-rw-r--r--src/hier.c11
-rw-r--r--src/include/fehsqm-config.h.in32
-rw-r--r--src/include/meson.build64
-rw-r--r--src/ipme.c7
-rw-r--r--src/it-analog=d25
-rw-r--r--src/it-base=d10
-rw-r--r--src/it-clients=d4
-rw-r--r--src/it-control=d5
-rw-r--r--src/it-dkim=d2
-rw-r--r--src/it-dns=d10
-rw-r--r--src/it-forward=d8
-rw-r--r--src/it-log=d4
-rw-r--r--src/it-mbox=d9
-rw-r--r--src/it-pam=d4
-rw-r--r--src/it-pop=d2
-rw-r--r--src/it-queue=d5
-rw-r--r--src/it-server=d3
-rw-r--r--src/it-setup=d4
-rw-r--r--src/it-srs=d2
-rw-r--r--src/it-user=d4
-rw-r--r--src/it=d16
-rw-r--r--src/meson.build536
-rw-r--r--src/newaliases.c7
-rw-r--r--src/newinclude.c7
-rw-r--r--src/qbiff.c6
-rw-r--r--src/qmail-authuser.c26
-rw-r--r--src/qmail-badloadertypes.c6
-rw-r--r--src/qmail-badmimetypes.c6
-rw-r--r--src/qmail-clean.c8
-rw-r--r--src/qmail-dksign.c7
-rw-r--r--src/qmail-dkverify.c7
-rw-r--r--src/qmail-getpw.c7
-rw-r--r--src/qmail-inject.c7
-rw-r--r--src/qmail-local.c6
-rw-r--r--src/qmail-lspawn.c9
-rw-r--r--src/qmail-mfrules.c6
-rw-r--r--src/qmail-newmrh.c6
-rw-r--r--src/qmail-newu.c6
-rw-r--r--src/qmail-pw2u.c9
-rw-r--r--src/qmail-qmaint.c11
-rw-r--r--src/qmail-qmqpc.c7
-rw-r--r--src/qmail-qmqpd.c7
-rw-r--r--src/qmail-qmtpd.c7
-rw-r--r--src/qmail-qread.c7
-rw-r--r--src/qmail-queue.c9
-rw-r--r--src/qmail-recipients.c6
-rw-r--r--src/qmail-remote.c7
-rw-r--r--src/qmail-rspawn.c7
-rw-r--r--src/qmail-send.c7
-rw-r--r--src/qmail-showctl.c15
-rw-r--r--src/qmail-smtpam.c7
-rw-r--r--src/qmail-smtpd.c7
-rw-r--r--src/qmail-start.c6
-rw-r--r--src/qmail-tcpok.c6
-rw-r--r--src/qmail-tcpto.c7
-rw-r--r--src/qmail-todo.c7
-rw-r--r--src/qmail-vmailuser.c7
-rw-r--r--src/qmail.c6
-rw-r--r--src/readsubdir.c6
-rw-r--r--src/select.h18
-rw-r--r--src/select.h213
-rw-r--r--src/sendmail.c6
-rw-r--r--src/spawn.c10
-rw-r--r--src/srsforward.c7
-rw-r--r--src/srsreverse.c7
-rw-r--r--src/trycpp.c9
-rw-r--r--src/trycrypt.c4
-rw-r--r--src/trydnsresolv.c4
-rw-r--r--src/trydrent.c8
-rw-r--r--src/tryflock.c8
-rw-r--r--src/tryidn2.c6
-rw-r--r--src/trylsock.c4
-rw-r--r--src/trymkffo.c7
-rw-r--r--src/trynpbg1.c25
-rw-r--r--src/tryqlibs.c6
-rw-r--r--src/tryrsolv.c6
-rw-r--r--src/trysalen.c11
-rw-r--r--src/trysgact.c10
-rw-r--r--src/trysgprm.c10
-rw-r--r--src/tryshadow.c4
-rw-r--r--src/tryshsgr.c15
-rw-r--r--src/tryslib.c4
-rw-r--r--src/tryspnam.c9
-rw-r--r--src/trysysel.c13
-rw-r--r--src/trysyslog.c9
-rw-r--r--src/tryulong32.c39
-rw-r--r--src/tryuserpw.c9
-rw-r--r--src/tryutmp.c8
-rw-r--r--src/tryvfork.c4
-rw-r--r--src/trywaitp.c7
118 files changed, 1078 insertions, 2332 deletions
diff --git a/conf-break b/conf-break
deleted file mode 100644
index 2cfacf5..0000000
--- a/conf-break
+++ /dev/null
@@ -1,9 +0,0 @@
--
-
-# This character is the user-ext delimiter. The default delimiter is -,
-# meaning that user joe controls joe-anything. Some system administrators
-# prefer + or =.
-
-# You can override this choice at run time with the qmail-users mechanism.
-
-# Multicharacter delimiters are not permitted.
diff --git a/conf-cc b/conf-cc
deleted file mode 100644
index 605c327..0000000
--- a/conf-cc
+++ /dev/null
@@ -1,18 +0,0 @@
-cc -O2 -Wall -Wno-narrowing -Iinclude -I`head -1 ../conf-qlibs`/include `head -1 ../conf-ssl`
-
-# This will work for both i386 and AMD64 architecture enabling INET6 support.
-# IDN2 support is NOT enabled by default. You do not have 'libidns2' installed and set: -DIDN2
-
-# For obfuscation, you can hide the virtual user's local part for VERP addresses; inappropriate for VPOPMAIL:
-
-cc -O2 -Wall -Wno-narrowing -Iinclude -I`head -1 ../conf-qlibs`/include `head -1 ../conf-ssl` -DHIDEVIRTUALUSER
-
-# qmail-remote will bounce mails immediately, if no DNS record is found; or mail may stay in the queue until it expires:
-
-cc -O2 -Wall -Wno-narrowing -Iinclude -I`head -1 ../conf-qlibs`/include `head -1 ../conf-ssl` -DDEFERREDBOUNCES
-
-# security might be enhanced, using the following compiler flags:
-
-cc -Wall -pipe -z relro -z now -pie -fPIE -fstack-protector-all -D_FORTIFY_SOURCE=2 -O2 -DIDN2
-
-# This is for gcc and with strong security in mind.
diff --git a/conf-groups b/conf-groups
deleted file mode 100644
index 77353b5..0000000
--- a/conf-groups
+++ /dev/null
@@ -1,5 +0,0 @@
-sqmail
-nofiles
-
-# The s/qmail groups: sqmail is used for binary and man files;
-# nofiles for auxiliary files.
diff --git a/conf-idn2 b/conf-idn2
deleted file mode 100644
index 5d45d02..0000000
--- a/conf-idn2
+++ /dev/null
@@ -1,8 +0,0 @@
--L /usr/local/lib
-
-# On Linux system, an 'empty' line is fine.
-
--L /usr/local/lib
-
-# In case, the libidn2 is residing elsewhere,
-# (eg. FreeBSD) you need to include the path.
diff --git a/conf-ids b/conf-ids
deleted file mode 100644
index 48a98f8..0000000
--- a/conf-ids
+++ /dev/null
@@ -1,15 +0,0 @@
-# sqmail Unix group-ids and user-ids
-# Change ids on your own behalf;
-# sqmail user names require change of conf-users in addition
-#
-2108:nofiles:sqmail group for auxiliar files:
-2109:sqmail:sqmail group for binary files:
-#
-7790:alias:sqmail Alias user:nofiles:alias
-7791:qmaild:sqmail Daemon user:nofiles
-7792:qmaill:sqmail Log user:nofiles
-7793:qmailp:sqmail Password user:nofiles
-7794:qmailq:sqmail Queue user:sqmail:queue
-7795:qmailr:sqmail Remote user:sqmail
-7796:qmails:sqmail Send user:sqmail
-7797:sqmtls:sqmail TLS user:nofiles:ssl
diff --git a/conf-ld b/conf-ld
deleted file mode 100644
index 0ce8ac7..0000000
--- a/conf-ld
+++ /dev/null
@@ -1,11 +0,0 @@
-cc -s -m64
-
-cc -s -z noexecstack -m64
-
-# This is for AMD64 architecture; use else:
-
-cc -s
-
-# This will be used to link .o files into an executable.
-
-# Note: UCSPI-SSL's conf-ld needs to use the same architecture!
diff --git a/conf-man b/conf-man
deleted file mode 100644
index bbb5a1a..0000000
--- a/conf-man
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-# Here, the location of the s/qmail man pages can be specified.
-# If this line is empty (or dir invalid), the default is taken
-# from manpath.
-# Typical directories -- /usr/local/man, /usr/share/man -- are
-# considered automatically; except for OpenBSD.
diff --git a/conf-patrn b/conf-patrn
deleted file mode 100644
index 3c62a89..0000000
--- a/conf-patrn
+++ /dev/null
@@ -1,6 +0,0 @@
-002
-
-# These stat bits are not allowed in ~ and ~/.qmail. On most systems, the
-# default umask is 022 or 077, so 022 will work here.
-
-# Note that ~ftp, ~www, ~uucp, etc. should be owned by root.
diff --git a/conf-qlibs b/conf-qlibs
deleted file mode 100644
index 325b721..0000000
--- a/conf-qlibs
+++ /dev/null
@@ -1,3 +0,0 @@
-/usr/local/qlibs
-
-# This is the path to your qlibs directory (-I not required here)
diff --git a/conf-spawn b/conf-spawn
deleted file mode 100644
index 35950a3..0000000
--- a/conf-spawn
+++ /dev/null
@@ -1,6 +0,0 @@
-120
-
-# This is a silent concurrency limit. You can't set it above 1024.
-# On some systems you can't set it above 124 or you need to adjust
-# kernel parameters.
-# s/qmail will refuse to compile if the limit is too high.
diff --git a/conf-split b/conf-split
deleted file mode 100644
index 45989a9..0000000
--- a/conf-split
+++ /dev/null
@@ -1,15 +0,0 @@
-23
-
-# This is the queue subdirectory split.
-
-127
-
-# This can ben benefial for a server handling 100k messages/day.
-
-521
-
-# This helps for ~ 500k messages/day.
-
-1223
-
-# You should think about splitting your service.
diff --git a/conf-ucspissl b/conf-ucspissl
deleted file mode 100644
index 024382d..0000000
--- a/conf-ucspissl
+++ /dev/null
@@ -1,3 +0,0 @@
-/package/host/superscript.com/net/ucspi-ssl
-
-# Define here the path to UCSPI-SSL
diff --git a/conf-users b/conf-users
deleted file mode 100644
index 42a5276..0000000
--- a/conf-users
+++ /dev/null
@@ -1,15 +0,0 @@
-alias
-qmaild
-qmaill
-root
-qmailp
-qmailq
-qmailr
-qmails
-
-# The s/qmail system is heavily partitioned for security; it does almost
-# nothing as root (except for authentication based on PAMs).
-
-# The first eight lines of this file are the alias user, the daemon user,
-# the log user, the owner of miscellaneous files such as binaries, the
-# passwd user, the queue user, the remote user, and the send user.
diff --git a/man/meson.build b/man/meson.build
new file mode 100644
index 0000000..8e680cf
--- /dev/null
+++ b/man/meson.build
@@ -0,0 +1,110 @@
+man1 = [
+ 'bouncesaying.1',
+ 'columnt.1',
+ 'condredirect.1',
+ 'except.1',
+ 'fastforward.1',
+ 'forward.1',
+ 'maildir2mbox.1',
+ 'maildirmake.1',
+ 'maildirwatch.1',
+ 'mailsubj.1',
+ 'matchup.1',
+ 'newaliases.1',
+ 'newinclude.1',
+ 'preline.1',
+ 'printforward.1',
+ 'printmaillist.1',
+ 'qbiff.1',
+ 'qreceipt.1',
+ 'setforward.1',
+ 'setmaillist.1',
+ 'srsforward.1',
+ 'xqp.1',
+ 'xrecipient.1',
+ 'xsender.1',
+]
+
+man3 = ['datetime.3']
+
+man5 = [
+ 'addresses.5',
+ 'envelopes.5',
+ 'maildir.5',
+ 'mbox.5',
+ 'qmail-header.5',
+ 'qmail-log.5',
+ 'tai64nfrac.5',
+ 'tcp-environ.5',
+]
+
+man7 = ['forgeries.7']
+
+man8 = [
+ 'dnscname.8',
+ 'dnsfq.8',
+ 'dnsip.8',
+ 'dnsmxip.8',
+ 'dnsptr.8',
+ 'dnstlsa.8',
+ 'dnstxt.8',
+ 'hostname.8',
+ 'ipmeprint.8',
+ 'qmail-clean.8',
+ 'qmail-command.8',
+ 'qmail-dkim.8',
+ 'qmail-dkverify.8',
+ 'qmail-inject.8',
+ 'qmail-local.8',
+ 'qmail-lspawn.8',
+ 'qmail-mrtg.8',
+ 'qmail-pop3d.8',
+ 'qmail-popup.8',
+ 'qmail-postgrey.8',
+ 'qmail-qmaint.8',
+ 'qmail-qmqpc.8',
+ 'qmail-qmqpd.8',
+ 'qmail-qmtpd.8',
+ 'qmail-qread.8',
+ 'qmail-qstat.8',
+ 'qmail-queue.8',
+ 'qmail-remote.8',
+ 'qmail-rspawn.8',
+ 'qmail-showctl.8',
+ 'qmail-smtpam.8',
+ 'qmail-smtpd.8',
+ 'qmail-start.9',
+ 'qmail-tcpok.8',
+ 'qmail-tcpto.8',
+ 'qmail-todo.8',
+ 'spfquery.8',
+ 'splogger.8',
+]
+
+man9 = [
+ 'dot-qmail.9',
+ 'qmail-authuser.9',
+ 'qmail-badloadertypes.9',
+ 'qmail-badmimetypes.9',
+ 'qmail-control.9',
+ 'qmail-dksign.9',
+ 'qmail-getpw.9',
+ 'qmail-limits.9',
+ 'qmail-mfrules.9',
+ 'qmail-newmrh.9',
+ 'qmail-newu.9',
+ 'qmail-pw2u.9',
+ 'qmail-recipients.9',
+ 'qmail-send.9',
+ 'qmail-users.9',
+ 'qmail-vmailuser.9',
+ 'sqmail.9',
+ 'srsreverse.9',
+]
+
+install_man(man1)
+install_man(man3)
+install_man(man5)
+install_man(man7)
+install_man(man8)
+install_man(man9)
diff --git a/meson.build b/meson.build
new file mode 100644
index 0000000..3354e80
--- /dev/null
+++ b/meson.build
@@ -0,0 +1,24 @@
+project('sqmail', 'c', 'cpp',
+ meson_version : '>=1.3',
+ version : '4.2.29a',
+ default_options : ['c_std=gnu99', 'cpp_std=c++11'])
+
+qlibs_dep = dependency('qlibs', fallback : ['fehQlibs', 'qlibs_dep'])
+dnsresolv_dep = dependency('dnsresolv', fallback : ['fehQlibs', 'qlibs_dnsresolv_dep'])
+
+if get_option('build-clients') or get_option('build-pam')
+ ucspissl_dep = dependency('ucspissl', fallback : ['ucspi-ssl', 'ucspissl_dep'],
+ default_options : ['lib-only=true'])
+else
+ ucspissl_dep = disabler()
+endif
+
+crypt_dep = dependency('libcrypt')
+
+idn2_dep = dependency('libidn2', required : get_option('idn2'))
+
+ssl_dep = dependency('libssl', version : '>=1.1')
+crypto_dep = dependency('libcrypto')
+
+subdir('src')
+subdir('man')
diff --git a/meson.options b/meson.options
new file mode 100644
index 0000000..e09ee36
--- /dev/null
+++ b/meson.options
@@ -0,0 +1,36 @@
+option('idn2', type : 'feature', description : 'Use IDN2 in qmail-remote')
+
+option('build-user', type : 'boolean', value : true)
+option('build-srs', type : 'boolean', value : true)
+option('build-server', type : 'boolean', value : true)
+option('build-queue', type : 'boolean', value : true)
+option('build-pam', type : 'boolean', value : true)
+option('build-log', type : 'boolean', value : true)
+option('build-control', type : 'boolean', value : true)
+option('build-forward', type : 'boolean', value : true)
+option('build-setup', type : 'boolean', value : true)
+option('build-pop', type : 'boolean', value : true)
+option('build-dns', type : 'boolean', value : true)
+option('build-dkim', type : 'boolean', value : true)
+option('build-clients', type : 'boolean', value : true)
+option('build-mbox', type : 'boolean', value : true)
+option('build-base', type : 'boolean', value : true)
+option('build-analog', type : 'boolean', value : true)
+
+option('break', type : 'string', value : '-')
+option('patrn', type : 'string', value : '002')
+option('spawn', type : 'integer', value : 120)
+option('split', type : 'combo', choices : ['23', '127', '521', '1223'],
+ description : 'This is the queue subdirectory split.')
+
+option('nofiles', type : 'integer', value : 2108, description : 'sqmail group for auxiliar files')
+option('sqmail', type : 'integer', value : 2109, description : 'sqmail group for binary files')
+
+option('alias', type : 'integer', value : 7790, description : 'sqmail Alias user:nofiles:alias')
+option('qmaild', type : 'integer', value : 7791, description : 'sqmail Daemon user:nofiles')
+option('qmaill', type : 'integer', value : 7792, description : 'sqmail Log user:nofiles')
+option('qmailp', type : 'integer', value : 7793, description : 'sqmail Password user:nofiles')
+option('qmailq', type : 'integer', value : 7794, description : 'sqmail Queue user:sqmail:queue')
+option('qmailr', type : 'integer', value : 7795, description : 'sqmail Remote user:sqmail')
+option('qmails', type : 'integer', value : 7796, description : 'sqmail Send user:sqmail')
+option('sqmtls', type : 'integer', value : 7797, description : 'sqmail TLS user:nofiles:ssl')
diff --git a/src/Makefile b/src/Makefile
deleted file mode 100644
index 8509761..0000000
--- a/src/Makefile
+++ /dev/null
@@ -1,1521 +0,0 @@
-# Don't edit Makefile! Use ../conf-* for configuration.
-
-SHELL=/bin/sh
-
-default: \
-it-analog it-base it-clients it-control it-dns \
-it-forward it-log it-mbox it-pam it-pop it-queue \
-it-user it-setup it-server it-srs it-dkim
-
-auto-ccld.sh: \
-../conf-cc ../conf-ld warn-auto.sh
- ( cat warn-auto.sh; \
- echo CC=\'`head -1 ../conf-cc`\'; \
- echo LD=\'`head -1 ../conf-ld`\' \
- ) > auto-ccld.sh
-
-auto-gid: \
-load auto-gid.o qlibs.lib
- ./load auto-gid `cat qlibs.lib`
-
-auto-gid.o: \
-compile auto-gid.c
- ./compile auto-gid.c
-
-auto-int: \
-load auto-int.o qlibs.lib
- ./load auto-int `cat qlibs.lib`
-
-auto-int.o: \
-compile auto-int.c
- ./compile auto-int.c
-
-auto-int8: \
-load auto-int8.o qlibs.lib
- ./load auto-int8 `cat qlibs.lib`
-
-auto-int8.o: \
-compile auto-int8.c
- ./compile auto-int8.c
-
-auto-str: \
-load auto-str.o qlibs.lib
- ./load auto-str `cat qlibs.lib`
-
-auto-str.o: \
-compile auto-str.c
- ./compile auto-str.c
-
-auto-uid: \
-load auto-uid.o qlibs.lib
- ./load auto-uid `cat qlibs.lib`
-
-auto-uid.o: \
-compile auto-uid.c
- ./compile auto-uid.c
-
-auto_break.c: \
-auto-str ../conf-break
- ./auto-str auto_break \
- "`head -1 ../conf-break`" > auto_break.c
-
-auto_break.o: \
-compile auto_break.c
- ./compile auto_break.c
-
-auto_patrn.c: \
-auto-int8 ../conf-patrn
- ./auto-int8 auto_patrn `head -1 ../conf-patrn` > auto_patrn.c
-
-auto_patrn.o: \
-compile auto_patrn.c
- ./compile auto_patrn.c
-
-auto_qmail.c: \
-auto-str ../conf-home
- ./auto-str auto_qmail `head -1 ../conf-home` > auto_qmail.c
-
-auto_qmail.o: \
-compile auto_qmail.c
- ./compile auto_qmail.c
-
-auto_spawn.c: \
-auto-int ../conf-spawn
- ./auto-int auto_spawn `head -1 ../conf-spawn` > auto_spawn.c
-
-auto_spawn.o: \
-compile auto_spawn.c
- ./compile auto_spawn.c
-
-auto_split.c: \
-auto-int ../conf-split
- ./auto-int auto_split `head -1 ../conf-split` > auto_split.c
-
-auto_split.o: \
-compile auto_split.c
- ./compile auto_split.c
-
-auto_uids.c: \
-auto-uid auto-gid ../conf-users ../conf-groups
- ( ./auto-uid auto_uida `head -1 ../conf-users` \
- &&./auto-uid auto_uidd `head -2 ../conf-users | tail -1` \
- &&./auto-uid auto_uidl `head -3 ../conf-users | tail -1` \
- &&./auto-uid auto_uido `head -4 ../conf-users | tail -1` \
- &&./auto-uid auto_uidp `head -5 ../conf-users | tail -1` \
- &&./auto-uid auto_uidq `head -6 ../conf-users | tail -1` \
- &&./auto-uid auto_uidr `head -7 ../conf-users | tail -1` \
- &&./auto-uid auto_uids `head -8 ../conf-users | tail -1` \
- &&./auto-gid auto_gidq `head -1 ../conf-groups` \
- &&./auto-gid auto_gidn `head -2 ../conf-groups | tail -1` \
- ) > auto_uids.c.tmp && mv auto_uids.c.tmp auto_uids.c
-
-auto_uids.o: \
-compile auto_uids.c
- ./compile auto_uids.c
-
-auto_usera.c: \
-auto-str ../conf-users
- ./auto-str auto_usera `head -1 ../conf-users` > auto_usera.c
-
-auto_usera.o: \
-compile auto_usera.c
- ./compile auto_usera.c
-
-base64.o: \
-compile base64.c
- ./compile base64.c
-
-md5c.o : \
-compile md5c.c
- ./compile md5c.c
-
-hmac_md5.o : \
-compile hmac_md5.c
- ./compile hmac_md5.c
-
-bouncesaying: \
-load bouncesaying.o qlibs.lib
- ./load bouncesaying `cat qlibs.lib`
-
-bouncesaying.o: \
-compile bouncesaying.c
- ./compile bouncesaying.c
-
-chkshsgr: \
-load chkshsgr.o
- ./load chkshsgr
-
-chkshsgr.o: \
-compile chkshsgr.c
- ./compile chkshsgr.c
-
-chkspawn: \
-load chkspawn.o auto_spawn.o qlibs.lib
- ./load chkspawn auto_spawn.o `cat qlibs.lib`
-
-chkspawn.o: \
-compile chkspawn.c
- ./compile chkspawn.c
-
-clean: \
-TARGETS
- rm -f `cat TARGETS`
-
-columnt: \
-load columnt.o qlibs.lib
- ./load columnt `cat qlibs.lib`
-
-columnt.o: \
-compile columnt.c
- ./compile columnt.c
-
-commands.o: \
-compile commands.c
- ./compile commands.c
-
-compile: \
-make-compile warn-auto.sh systype
- ( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
- compile
- chmod 755 compile
-
-condredirect: \
-load condredirect.o qmail.o auto_qmail.o qlibs.lib
- ./load condredirect qmail.o auto_qmail.o `cat qlibs.lib`
-
-condredirect.o: \
-compile condredirect.c
- ./compile condredirect.c
-
-config: \
-warn-auto.sh config.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh config.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > config
- chmod 755 config
-
-config-fast: \
-warn-auto.sh config-fast.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh config-fast.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > config-fast
- chmod 755 config-fast
-
-constmap.o: \
-compile constmap.c
- ./compile constmap.c
-
-control.o: \
-compile control.c
- ./compile control.c
-
-date822fmt.o: \
-compile date822fmt.c
- ./compile date822fmt.c
-
-datemail: \
-warn-auto.sh datemail.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh datemail.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > datemail
- chmod 755 datemail
-
-datetime.a: \
-makelib datetime.o datetime_un.o
- ./makelib datetime.a datetime.o datetime_un.o
-
-datetime.o: \
-compile datetime.c
- ./compile datetime.c
-
-datetime_un.o: \
-compile datetime_un.c
- ./compile datetime_un.c
-
-ddist: \
-warn-auto.sh ddist.sh ../conf-home
- cat warn-auto.sh ddist.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > ddist
- chmod 755 ddist
-
-deferrals: \
-warn-auto.sh deferrals.sh ../conf-home
- cat warn-auto.sh deferrals.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > deferrals
- chmod 755 deferrals
-
-direntry.h: \
-compile trydrent.c direntry.h1 direntry.h2
- ( ./compile trydrent.c >/dev/null 2>&1 \
- && cat direntry.h2 || cat direntry.h1 ) > direntry.h
- rm -f trydrent.o
-
-dkim.o: \
-compile dkim.cpp
- ./compile dkim.cpp
-
-dkimbase.o: \
-compile dkimbase.cpp
- ./compile dkimbase.cpp
-
-dkimsign.o: \
-compile dkimsign.cpp
- ./compile dkimsign.cpp
-
-dkimverify.o: \
-compile dkimverify.cpp
- ./compile dkimverify.cpp
-
-dns.lib: \
-tryrsolv.c compile load
- ( (./compile tryrsolv.c && \
- ./load tryrsolv -L`head -1 ../conf-qlibs` -ldnsresolv ) \
- && echo "-L`head -1 ../conf-qlibs` -ldnsresolv" || exit 0 ) > dns.lib
- rm -f tryrsolv.o tryrsolv
-
-dns.o: \
-compile dns.c dns_tlsa.c
- ./compile dns.c dns_tlsa.c
-
-dnscname: \
-load dnscname.o \
-dns.lib socket.lib qlibs.lib dns.o ipalloc.o
- ./load dnscname dns.o ipalloc.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnscname.o: \
-compile dnscname.c
- ./compile dnscname.c
-
-dnsfq: \
-load dnsfq.o \
-dns.lib socket.lib qlibs.lib dns.o ipalloc.o
- ./load dnsfq dns.o ipalloc.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnsfq.o: \
-compile dnsfq.c
- ./compile dnsfq.c
-
-dnsip: \
-load dnsip.o dns.o ipalloc.o \
-dns.lib socket.lib qlibs.lib
- ./load dnsip dns.o ipalloc.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnsip.o: \
-compile dnsip.c
- ./compile dnsip.c
-
-dnsmxip: \
-load dnsmxip.o ipalloc.o dns.o dns.lib socket.lib
- ./load dnsmxip ipalloc.o dns.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnsmxip.o: \
-compile dnsmxip.c
- ./compile dnsmxip.c
-
-dnsptr: \
-load dnsptr.o dns.o ipalloc.o \
-dns.lib socket.lib qlibs.lib
- ./load dnsptr dns.o ipalloc.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnsptr.o: \
-compile dnsptr.c
- ./compile dnsptr.c
-
-dnstlsa: \
-load dnstlsa.o dns_tlsa.o ipalloc.o dns.o \
-dns.lib socket.lib qlibs.lib
- ./load dnstlsa dns_tlsa.o ipalloc.o dns.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnstlsa.o: \
-compile dnstlsa.c dns_tlsa.c
- ./compile dnstlsa.c dns_tlsa.c
-
-dnstxt: \
-load dnstxt.o ipalloc.o dns.o \
-dns.lib socket.lib qlibs.lib
- ./load dnstxt ipalloc.o dns.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-dnstxt.o: \
-compile dnstxt.c
- ./compile dnstxt.c
-
-except: \
-load except.o qlibs.lib
- ./load except `cat qlibs.lib`
-
-except.o: \
-compile except.c
- ./compile except.c
-
-failures: \
-warn-auto.sh failures.sh ../conf-home
- cat warn-auto.sh failures.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > failures
- chmod 755 failures
-
-fastforward: \
-load fastforward.o qmail.o auto_qmail.o strset.o qlibs.lib
- ./load fastforward qmail.o auto_qmail.o strset.o \
- `cat qlibs.lib`
-
-fastforward.o: \
-compile fastforward.c
- ./compile fastforward.c
-
-fifo.o: \
-compile fifo.c
- ./compile fifo.c
-
-find-systype: \
-find-systype.sh auto-ccld.sh
- cat auto-ccld.sh find-systype.sh > find-systype
- chmod 755 find-systype
-
-fmtqfn.o: \
-compile fmtqfn.c
- ./compile fmtqfn.c
-
-forward: \
-load forward.o qmail.o auto_qmail.o qlibs.lib
- ./load forward qmail.o auto_qmail.o \
- `cat qlibs.lib`
-
-forward.o: \
-compile forward.c
- ./compile forward.c
-
-gfrom.o: \
-compile gfrom.c
- ./compile gfrom.c
-
-hasflock.h: \
-tryflock.c compile load
- ( ( ./compile tryflock.c && ./load tryflock ) >/dev/null \
- 2>&1 \
- && echo \#define HASFLOCK 1 || exit 0 ) > hasflock.h
- rm -f tryflock.o tryflock
-
-hasmkffo.h: \
-trymkffo.c compile load
- ( ( ./compile trymkffo.c && ./load trymkffo ) >/dev/null \
- 2>&1 \
- && echo \#define HASMKFIFO 1 || exit 0 ) > hasmkffo.h
- rm -f trymkffo.o trymkffo
-
-hasspnam.h: \
-tryspnam.c compile load
- ( ( ./compile tryspnam.c && ./load tryspnam ) >/dev/null \
- 2>&1 \
- && echo \#define HASGETSPNAM 1 || exit 0 ) > hasspnam.h
- rm -f tryspnam.o tryspnam
-
-hasuserpw.h: \
-tryuserpw.c s.lib compile load
- ( ( ./compile tryuserpw.c \
- && ./load tryuserpw `cat s.lib` ) >/dev/null 2>&1 \
- && echo \#define HASGETUSERPW 1 || exit 0 ) > hasuserpw.h
- rm -f tryuserpw.o tryuserpw
-
-hassalen.h: \
-trysalen.c compile
- ( ./compile trysalen.c >/dev/null 2>&1 \
- && echo \#define HASSALEN 1 || exit 0 ) > hassalen.h
-
-hassgact.h: \
-trysgact.c compile load
- ( ( ./compile trysgact.c && ./load trysgact ) >/dev/null \
- 2>&1 \
- && echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
- rm -f trysgact.o trysgact
-
-hassgprm.h: \
-trysgprm.c compile load
- ( ( ./compile trysgprm.c && ./load trysgprm ) >/dev/null \
- 2>&1 \
- && echo \#define HASSIGPROCMASK 1 || exit 0 ) > hassgprm.h
- rm -f trysgprm.o trysgprm
-
-hasshsgr.h: \
-chkshsgr warn-shsgr tryshsgr.c compile load
- ./chkshsgr || ( cat warn-shsgr; exit 1 )
- ( ( ./compile tryshsgr.c \
- && ./load tryshsgr && ./tryshsgr ) >/dev/null 2>&1 \
- && echo \#define HASSHORTSETGROUPS 1 || exit 0 ) > \
- hasshsgr.h
- rm -f tryshsgr.o tryshsgr
-
-hasutmp.h: \
-tryutmp.c compile
- ( ./compile tryutmp.c >/dev/null 2>&1 \
- && echo \#define HASUTMP 1 || exit 0 ) > hasutmp.h
- rm -f tryutmp.o
-
-haswaitp.h: \
-trywaitp.c compile load
- ( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \
- 2>&1 \
- && echo \#define HASWAITPID 1 || exit 0 ) > haswaitp.h
- rm -f trywaitp.o trywaitp
-
-headerbody.o: \
-compile headerbody.c
- ./compile headerbody.c
-
-hfield.o: \
-compile hfield.c
- ./compile hfield.c
-
-hier.o: \
-compile hier.c
- ./compile hier.c
-
-hostname: \
-load hostname.o dns.lib socket.lib
- ./load hostname `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-hostname.o: \
-compile hostname.c
- ./compile hostname.c
-
-idn2.lib: \
-tryidn2.c compile load
- ( (./compile tryidn2.c && \
- ./load tryidn2 `head -1 ../conf-idn2` -lidn2 ) >/dev/null 2>&1 \
- && echo "`head -1 ../conf-idn2` -lidn2" || exit 0 ) > idn2.lib
- rm -f tryind2.o tryidn2
-
-install: \
-load install.o hier.o auto_qmail.o auto_split.o auto_uids.o fifo.o qlibs.lib
- ./load install hier.o auto_qmail.o auto_split.o auto_uids.o fifo.o \
- `cat qlibs.lib`
-
-install.o: \
-compile install.c
- ./compile install.c
-
-instcheck: \
-load instcheck.o hier.o auto_qmail.o auto_split.o auto_uids.o qlibs.lib
- ./load instcheck hier.o auto_qmail.o auto_split.o auto_uids.o \
- `cat qlibs.lib`
-
-instcheck.o: \
-compile instcheck.c
- ./compile instcheck.c
-
-ipalloc.o: \
-compile ipalloc.c
- ./compile ipalloc.c
-
-ipme.o: \
-compile ipme.c hassalen.h
- ./compile ipme.c
-
-ipmeprint: \
-load ipmeprint.o ipme.o ipalloc.o auto_qmail.o \
-dns.lib socket.lib qlibs.lib
- ./load ipmeprint ipme.o auto_qmail.o ipalloc.o \
- `cat qlibs.lib` `cat socket.lib` `cat dns.lib`
-
-ipmeprint.o: \
-compile ipmeprint.c
- ./compile ipmeprint.c
-
-it-analog: \
-columnt matchup \
-ddist deferrals failures senders successes suids \
-recipients rhosts rhosts rxdelay \
-xqp xrecipient xsender \
-zddist zdeferrals zfailures zrecipients zrhosts \
-zrxdelay zsenders zsendmail zsuccesses zsuids zoverall
-
-it-base: \
-qmail-local qmail-rspawn qmail-lspawn qmail-send qmail-qmaint \
-qmail-clean qmail-start qmail-queue qmail-inject qmail-todo
-
-it-mbox: \
-forward predate preline condredirect bouncesaying except \
-datemail maildirmake maildir2mbox maildirwatch qbiff qreceipt
-
-it-clients: \
-mailsubj qmail-remote qmail-qmqpc sendmail
-
-it-dkim: \
-qmail-dkim qmail-dksign qmail-dkverify
-
-it-dns: \
-dnscname dnsptr dnsip dnsmxip dnsfq dnstlsa dnstxt \
-hostname ipmeprint spfquery
-
-it-pop: \
-qmail-popup qmail-pop3d
-
-it-forward: \
-fastforward forward printforward setforward newaliases \
-printmaillist setmaillist newinclude
-
-it-control: \
-qmail-badmimetypes qmail-badloadertypes \
-qmail-mfrules qmail-recipients qmail-showctl
-
-it-log: \
-splogger qmail-mrtg qmail-mrtg-queue tai64nfrac
-
-it-pam: \
-qmail-authuser qmail-smtpam qmail-vmailuser \
-qmail-postgrey
-
-it-queue: \
-qmail-qread qmail-qstat qmail-tcpto qmail-tcpok qmail-upq
-
-it-server: \
-qmail-qmtpd qmail-qmqpd qmail-smtpd
-
-it-setup: \
-config config-fast install instcheck
-
-it-srs: \
-srsforward srsreverse
-
-it-user: \
-qmail-getpw qmail-newu qmail-pw2u qmail-newmrh
-
-load: \
-make-load warn-auto.sh systype
- ( cat warn-auto.sh; ./make-load "`cat systype` `cat qlibs.lib`" ) > load
- chmod 755 load
-
-maildir.o: \
-compile maildir.c
- ./compile maildir.c
-
-maildir2mbox: \
-load maildir2mbox.o maildir.o prioq.o now.o myctime.o gfrom.o \
-datetime.a
- ./load maildir2mbox maildir.o prioq.o now.o myctime.o \
- gfrom.o datetime.a `cat qlibs.lib`
-
-maildir2mbox.o: \
-compile maildir2mbox.c
- ./compile maildir2mbox.c
-
-maildirmake: \
-load maildirmake.o
- ./load maildirmake `cat qlibs.lib`
-
-maildirmake.o: \
-compile maildirmake.c
- ./compile maildirmake.c
-
-maildirwatch: \
-load maildirwatch.o hfield.o headerbody.o maildir.o prioq.o now.o
- ./load maildirwatch hfield.o headerbody.o maildir.o \
- prioq.o now.o `cat qlibs.lib`
-
-maildirwatch.o: \
-compile maildirwatch.c
- ./compile maildirwatch.c
-
-mailsubj: \
-warn-auto.sh mailsubj.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh mailsubj.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > mailsubj
- chmod 755 mailsubj
-
-make-compile: \
-make-compile.sh auto-ccld.sh
- cat auto-ccld.sh make-compile.sh > make-compile
- chmod 755 make-compile
-
-make-load: \
-make-load.sh auto-ccld.sh
- cat auto-ccld.sh make-load.sh > make-load
- chmod 755 make-load
-
-make-makelib: \
-make-makelib.sh auto-ccld.sh
- cat auto-ccld.sh make-makelib.sh > make-makelib
- chmod 755 make-makelib
-
-makelib: \
-make-makelib warn-auto.sh systype
- ( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > \
- makelib
- chmod 755 makelib
-
-matchup: \
-load matchup.o qlibs.lib
- ./load matchup `cat qlibs.lib`
-
-matchup.o: \
-compile matchup.c
- ./compile matchup.c
-
-myctime.o: \
-compile myctime.c
- ./compile myctime.c
-
-mfrules.o: \
-compile mfrules.c
- ./compile mfrules.c
-
-newaliases: \
-load newaliases.o auto_qmail.o token822.o control.o qlibs.lib
- ./load newaliases auto_qmail.o token822.o control.o \
- `cat qlibs.lib`
-
-newaliases.o: \
-compile newaliases.c
- ./compile newaliases.c
-
-newinclude: \
-load newinclude.o auto_qmail.o token822.o control.o qlibs.lib
- ./load newinclude auto_qmail.o token822.o control.o \
- `cat qlibs.lib`
-
-newinclude.o: \
-compile newinclude.c
- ./compile newinclude.c
-
-newfield.o: \
-compile newfield.c
- ./compile newfield.c
-
-now.o: \
-compile now.c
- ./compile now.c
-
-predate: \
-load predate.o datetime.a qlibs.lib
- ./load predate datetime.a `cat qlibs.lib`
-
-predate.o: \
-compile predate.c
- ./compile predate.c
-
-preline: \
-load preline.o qlibs.lib
- ./load preline `cat qlibs.lib`
-
-preline.o: \
-compile preline.c
- ./compile preline.c
-
-printforward: \
-load printforward.o qlibs.lib
- ./load printforward `cat qlibs.lib`
-
-printforward.o: \
-compile printforward.c
- ./compile printforward.c
-
-printmaillist: \
-load printmaillist.o qlibs.lib
- ./load printmaillist `cat qlibs.lib`
-
-printmaillist.o: \
-compile printmaillist.c
- ./compile printmaillist.c
-
-prioq.o: \
-compile prioq.c
- ./compile prioq.c
-
-qbiff: \
-load qbiff.o headerbody.o hfield.o qlibs.lib
- ./load qbiff headerbody.o hfield.o `cat qlibs.lib`
-
-qbiff.o: \
-compile hasutmp.h qbiff.c
- ./compile qbiff.c
-
-qlibs.lib: \
-tryqlibs.c compile load
- ( (./compile tryqlibs.c && \
- ./load tryqlibs -L`head -1 ../conf-qlibs` -lqlibs ) \
- && echo "-L`head -1 ../conf-qlibs` -lqlibs" || exit 0 ) > qlibs.lib
- rm -f tryqlibs.o tryqlibs
-
-qmail-authuser: \
-load qmail-authuser.o auto_qmail.o control.o hmac_md5.o md5c.o \
-constmap.o shadow.lib sha1.o sha256.o \
-qlibs.lib shadow.lib crypt.lib s.lib
- ./load qmail-authuser auto_qmail.o control.o \
- constmap.o hmac_md5.o md5c.o sha1.o sha256.o \
- `cat shadow.lib` `cat qlibs.lib` `cat crypt.lib` `cat s.lib`
-
-qmail-authuser.o: \
-compile qmail-authuser.c hasspnam.h hasuserpw.h
- ./compile qmail-authuser.c
-
-qmail-clean: \
-load qmail-clean.o fmtqfn.o now.o auto_qmail.o auto_split.o qlibs.lib
- ./load qmail-clean fmtqfn.o now.o auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-clean.o: \
-compile qmail-clean.c
- ./compile qmail-clean.c
-
-qmail-dkim: \
-load qmail-dkim.o libqdkim.a dkim.o dkimbase.o dkimsign.o dkimverify.o \
- qlibs.lib dns.lib ssl.lib
- ./load qmail-dkim libqdkim.a \
- -lstdc++ `cat dns.lib` `cat qlibs.lib` `cat ssl.lib`
-
-qmail-dkim.o: \
-compile qmail-dkim.cpp dkim.cpp dkimbase.cpp dkimsign.cpp dkimverify.cpp
- ./compile qmail-dkim.cpp
-
-qmail-dksign: \
-load qmail-dksign.o control.o constmap.o fmtqfn.o rcpthosts.o qmail-dkim \
-auto_qmail.o auto_split.o qlibs.lib
- ./load qmail-dksign control.o constmap.o fmtqfn.o rcpthosts.o \
- auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-dksign.o: \
-compile qmail-dksign.c
- ./compile qmail-dksign.c
-
-qmail-dkverify: \
-load qmail-dkverify.o control.o fmtqfn.o qmail-dkim \
-auto_qmail.o auto_split.o qmail.o qlibs.lib
- ./load qmail-dkverify qmail.o control.o fmtqfn.o \
- auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-dkverify.o: \
-compile qmail-dkverify.c
- ./compile qmail-dkverify.c
-
-qmail-getpw: \
-load qmail-getpw.o auto_break.o auto_usera.o qlibs.lib
- ./load qmail-getpw auto_break.o auto_usera.o `cat qlibs.lib`
-
-qmail-getpw.o: \
-compile qmail-getpw.c
- ./compile qmail-getpw.c
-
-qmail-inject: \
-load qmail-inject.o headerbody.o hfield.o newfield.o quote.o now.o \
-control.o date822fmt.o qmail.o datetime.a token822.o auto_qmail.o qlibs.lib
- ./load qmail-inject headerbody.o hfield.o newfield.o \
- constmap.o quote.o now.o control.o date822fmt.o qmail.o datetime.a \
- token822.o auto_qmail.o `cat qlibs.lib`
-
-qmail-inject.o: \
-compile qmail-inject.c
- ./compile qmail-inject.c
-
-qmail-clean: \
-load qmail-clean.o fmtqfn.o now.o auto_qmail.o auto_split.o qlibs.lib
-
-qmail-local: \
-load qmail-local.o auto_qmail.o auto_break.o auto_patrn.o \
-qmail.o quote.o now.o gfrom.o myctime.o datetime.a socket.lib qlibs.lib
- ./load qmail-local qmail.o quote.o now.o gfrom.o myctime.o \
- datetime.a auto_qmail.o auto_break.o auto_patrn.o \
- `cat socket.lib` `cat qlibs.lib`
-
-qmail-local.o: \
-compile qmail-local.c
- ./compile qmail-local.c
-
-qmail-lspawn: \
-load qmail-lspawn.o spawn.o \
-auto_qmail.o auto_uids.o auto_spawn.o qlibs.lib
- ./load qmail-lspawn spawn.o \
- auto_qmail.o auto_uids.o auto_spawn.o `cat qlibs.lib`
-
-qmail-lspawn.o: \
-compile qmail-lspawn.c
- ./compile qmail-lspawn.c
-
-qmail-badmimetypes: \
-load qmail-badmimetypes.o auto_qmail.o qlibs.lib
- ./load qmail-badmimetypes auto_qmail.o `cat qlibs.lib`
-
-qmail-badmimetypes.o: \
-compile qmail-badmimetypes.c
- ./compile qmail-badmimetypes.c
-
-qmail-badloadertypes: \
-load qmail-badloadertypes.o auto_qmail.o qlibs.lib
- ./load qmail-badloadertypes auto_qmail.o `cat qlibs.lib`
-
-qmail-badloadertypes.8: \
-qmail-badloadertypes.9 ../conf-break ../conf-spawn
- cat qmail-badloadertypes.9 \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPAWN}"`head -1 ../conf-spawn`"}g \
- > qmail-badloadertypes.8
-
-qmail-badloadertypes.o: \
-compile qmail-badloadertypes.c
- ./compile qmail-badloadertypes.c
-
-qmail-newmrh: \
-load qmail-newmrh.o auto_qmail.o qlibs.lib
- ./load qmail-newmrh auto_qmail.o `cat qlibs.lib`
-
-qmail-newmrh.o: \
-compile qmail-newmrh.c
- ./compile qmail-newmrh.c
-
-qmail-recipients: \
-load qmail-recipients.o auto_qmail.o qlibs.lib
- ./load qmail-recipients auto_qmail.o `cat qlibs.lib`
-
-qmail-recipients.o: \
-compile qmail-recipients.c
- ./compile qmail-recipients.c
-
-qmail-vmailuser: \
-load qmail-vmailuser.o auto_qmail.o control.o constmap.o qlibs.lib
- ./load qmail-vmailuser auto_qmail.o control.o constmap.o \
- `cat qlibs.lib`
-
-qmail-vmailuser.o: \
-compile qmail-vmailuser.c
- ./compile qmail-vmailuser.c
-
-qmail-smtpam: \
-load qmail-smtpam.o control.o now.o dns.o constmap.o \
-ipalloc.o ipme.o quote.o auto_qmail.o tcpto.o \
-tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \
-ssl.lib dns.lib socket.lib qlibs.lib ucspissl.a
- ./load qmail-smtpam constmap.o control.o dns_tlsa.o \
- tcpto.o now.o dns.o ipalloc.o ipme.o quote.o auto_qmail.o \
- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \
- `cat ssl.lib` `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-qmail-smtpam.o: \
-compile qmail-smtpam.c
- ./compile qmail-smtpam.c
-
-qmail-mfrules: \
-load qmail-mfrules.o auto_qmail.o qlibs.lib
- ./load qmail-mfrules auto_qmail.o `cat qlibs.lib`
-
-qmail-mfrules.o: \
-compile qmail-mfrules.c
- ./compile qmail-mfrules.c
-
-qmail-mrtg: \
-load qmail-mrtg.o now.o qlibs.lib
- ./load qmail-mrtg now.o `cat qlibs.lib`
-
-qmail-mrtg.o: \
-compile qmail-mfrules.c
- ./compile qmail-mrtg.c
-
-qmail-mrtg-queue: \
-warn-auto.sh qmail-mrtg-queue.sh ../conf-home
- cat warn-auto.sh qmail-mrtg-queue.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > qmail-mrtg-queue
- chmod 755 qmail-mrtg-queue
-
-qmail-newu: \
-load qmail-newu.o auto_qmail.o qlibs.lib
- ./load qmail-newu auto_qmail.o `cat qlibs.lib`
-
-qmail-newu.o: \
-compile qmail-newu.c
- ./compile qmail-newu.c
-
-qmail-pop3d: \
-load qmail-pop3d.o commands.o maildir.o prioq.o now.o socket.lib qlibs.lib
- ./load qmail-pop3d commands.o maildir.o prioq.o now.o \
- `cat socket.lib` `cat qlibs.lib`
-
-qmail-pop3d.o: \
-compile qmail-pop3d.c
- ./compile qmail-pop3d.c
-
-qmail-popup: \
-load qmail-popup.o commands.o now.o tls_start.o socket.lib qlibs.lib
- ./load qmail-popup commands.o tls_start.o now.o \
- `cat socket.lib` `cat qlibs.lib`
-
-qmail-popup.o: \
-compile qmail-popup.c
- ./compile qmail-popup.c
-
-qmail-postgrey: \
-load qmail-postgrey.o socket.lib qlibs.lib
- ./load qmail-postgrey \
- `cat socket.lib` `cat qlibs.lib`
-
-qmail-postgrey.o: \
-compile qmail-postgrey.c
- ./compile qmail-postgrey.c
-
-qmail-pw2u: \
-load qmail-pw2u.o constmap.o control.o auto_usera.o auto_break.o auto_qmail.o qlibs.lib
- ./load qmail-pw2u constmap.o control.o \
- auto_usera.o auto_break.o auto_qmail.o `cat qlibs.lib`
-
-qmail-pw2u.o: \
-compile qmail-pw2u.c
- ./compile qmail-pw2u.c
-
-qmail-qmqpc: \
-load qmail-qmqpc.o control.o auto_qmail.o socket.lib qlibs.lib
- ./load qmail-qmqpc control.o auto_qmail.o `cat socket.lib` `cat qlibs.lib`
-
-qmail-qmqpc.o: \
-compile qmail-qmqpc.c
- ./compile qmail-qmqpc.c
-
-qmail-qmqpd: \
-load qmail-qmqpd.o received.o now.o date822fmt.o qmail.o auto_qmail.o \
-datetime.a qlibs.lib
- ./load qmail-qmqpd received.o now.o date822fmt.o datetime.a qmail.o \
- auto_qmail.o `cat qlibs.lib`
-
-qmail-qmqpd.o: \
-compile qmail-qmqpd.c
- ./compile qmail-qmqpd.c
-
-qmail-qmtpd: \
-load qmail-qmtpd.o rcpthosts.o control.o constmap.o received.o \
-date822fmt.o now.o qmail.o datetime.a auto_qmail.o qlibs.lib
- ./load qmail-qmtpd rcpthosts.o auto_qmail.o control.o constmap.o \
- received.o date822fmt.o now.o qmail.o datetime.a `cat qlibs.lib`
-
-qmail-qmtpd.o: \
-compile qmail-qmtpd.c
- ./compile qmail-qmtpd.c
-
-qmail-qread: \
-load qmail-qread.o fmtqfn.o readsubdir.o date822fmt.o datetime.a \
-auto_qmail.o auto_split.o qlibs.lib
- ./load qmail-qread fmtqfn.o readsubdir.o date822fmt.o \
- datetime.a auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-qread.o: \
-compile qmail-qread.c
- ./compile qmail-qread.c
-
-qmail-qstat: \
-warn-auto.sh qmail-qstat.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh qmail-qstat.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > qmail-qstat
- chmod 755 qmail-qstat
-
-qmail-queue: \
-load qmail-queue.o triggerpull.o fmtqfn.o now.o date822fmt.o \
-datetime.a auto_qmail.o auto_split.o auto_uids.o qlibs.lib
- ./load qmail-queue auto_qmail.o auto_split.o auto_uids.o \
- triggerpull.o fmtqfn.o now.o date822fmt.o datetime.a `cat qlibs.lib`
-
-qmail-queue.o: \
-compile qmail-queue.c
- ./compile qmail-queue.c
-
-qmail-qmaint: \
-load qmail-qmaint.o auto_qmail.o auto_split.o auto_uids.o fifo.o \
-fmtqfn.o readsubdir.o qlibs.lib
- ./load qmail-qmaint auto_qmail.o auto_split.o auto_uids.o fifo.o \
- fmtqfn.o readsubdir.o `cat qlibs.lib`
-
-qmail-qmaint.o: \
-compile qmail-qmaint.c
- ./compile qmail-qmaint.c
-
-qmail-remote: \
-load qmail-remote.o control.o tcpto.o now.o dns.o ipalloc.o ipme.o \
-quote.o tls_timeoutio.o tls_errors.o tls_remote.o dns_tlsa.o \
-base64.o constmap.o md5c.o hmac_md5.o auto_qmail.o \
-ssl.lib dns.lib socket.lib qlibs.lib idn2.lib ucspissl.a
- ./load qmail-remote control.o tcpto.o now.o \
- base64.o constmap.o md5c.o hmac_md5.o ipalloc.o ipme.o \
- quote.o dns.o ucspissl.a auto_qmail.o dns_tlsa.o \
- tls_errors.o tls_remote.o tls_timeoutio.o ucspissl.a \
- `cat ssl.lib` `cat dns.lib` `cat socket.lib` `cat qlibs.lib` `cat idn2.lib`
-
-qmail-remote.o: \
-compile qmail-remote.c
- ./compile qmail-remote.c
-
-qmail-rspawn: \
-load qmail-rspawn.o spawn.o tcpto_clean.o now.o \
-auto_qmail.o auto_uids.o auto_spawn.o qlibs.lib
- ./load qmail-rspawn spawn.o tcpto_clean.o now.o \
- auto_qmail.o auto_uids.o auto_spawn.o `cat qlibs.lib`
-
-qmail-rspawn.o: \
-compile qmail-rspawn.c
- ./compile qmail-rspawn.c
-
-qmail-send: \
-load qmail-send.o qsutil.o control.o constmap.o newfield.o prioq.o \
-trigger.o fmtqfn.o quote.o now.o readsubdir.o qmail.o date822fmt.o \
-datetime.a auto_qmail.o auto_split.o qlibs.lib
- ./load qmail-send qsutil.o control.o constmap.o newfield.o \
- prioq.o trigger.o fmtqfn.o quote.o now.o readsubdir.o \
- qmail.o date822fmt.o datetime.a auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-send.o: \
-compile qmail-send.c
- ./compile qmail-send.c
-
-qmail-showctl: \
-load qmail-showctl.o auto_uids.o control.o auto_qmail.o auto_break.o \
-auto_patrn.o auto_spawn.o auto_split.o qlibs.lib
- ./load qmail-showctl auto_uids.o auto_qmail.o auto_break.o auto_patrn.o \
- auto_spawn.o auto_split.o control.o `cat qlibs.lib`
-
-qmail-showctl.o: \
-compile qmail-showctl.c
- ./compile qmail-showctl.c
-
-qmail-smtpd: \
-load qmail-smtpd.o auto_break.o rcpthosts.o commands.o \
-ipme.o ipalloc.o constmap.o control.o received.o \
-recipients.o mfrules.o tls_start.o smtpdlog.o dns.o \
-date822fmt.o now.o qmail.o wildmat.o spf.o spfdnsip.o \
-datetime.a auto_qmail.o base64.o socket.lib qlibs.lib
- ./load qmail-smtpd rcpthosts.o recipients.o commands.o \
- mfrules.o tls_start.o auto_break.o smtpdlog.o ipme.o \
- ipalloc.o constmap.o control.o dns.o spf.o spfdnsip.o \
- date822fmt.o now.o qmail.o wildmat.o received.o \
- base64.o datetime.a auto_qmail.o \
- `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-qmail-smtpd.o: \
-compile qmail-smtpd.c
- ./compile qmail-smtpd.c
-
-qmail-start: \
-load qmail-start.o auto_uids.o qlibs.lib
- ./load qmail-start auto_uids.o `cat qlibs.lib`
-
-qmail-start.o: \
-compile qmail-start.c
- ./compile qmail-start.c
-
-qmail-tcpok: \
-load qmail-tcpok.o auto_qmail.o qlibs.lib
- ./load qmail-tcpok auto_qmail.o `cat qlibs.lib`
-
-qmail-tcpok.o: \
-compile qmail-tcpok.c
- ./compile qmail-tcpok.c
-
-qmail-tcpto: \
-load qmail-tcpto.o now.o auto_qmail.o qlibs.lib
- ./load qmail-tcpto now.o auto_qmail.o `cat qlibs.lib`
-
-qmail-tcpto.o: \
-compile qmail-tcpto.c
- ./compile qmail-tcpto.c
-
-qmail-todo: \
-load qmail-todo.o control.o constmap.o trigger.o fmtqfn.o \
-now.o qsutil.o readsubdir.o auto_qmail.o auto_split.o qlibs.lib
- ./load qmail-todo control.o constmap.o trigger.o fmtqfn.o now.o \
- readsubdir.o qsutil.o auto_qmail.o auto_split.o `cat qlibs.lib`
-
-qmail-todo.o: \
-compile qmail-todo.c
- ./compile qmail-todo.c
-
-qmail-upq: \
-warn-auto.sh qmail-upq.sh ../conf-home ../conf-break ../conf-split
- cat warn-auto.sh qmail-upq.sh \
- | sed s}QMAIL}"`head -1 ../conf-home`"}g \
- | sed s}BREAK}"`head -1 ../conf-break`"}g \
- | sed s}SPLIT}"`head -1 ../conf-split`"}g \
- > qmail-upq
- chmod 755 qmail-upq
-
-qmail.o: \
-compile qmail.c
- ./compile qmail.c
-
-qreceipt: \
-load qreceipt.o headerbody.o hfield.o quote.o token822.o qmail.o \
-auto_qmail.o qlibs.lib
- ./load qreceipt headerbody.o hfield.o quote.o token822.o \
- qmail.o auto_qmail.o `cat qlibs.lib`
-
-qreceipt.o: \
-compile qreceipt.c
- ./compile qreceipt.c
-
-qsutil.o: \
-compile qsutil.c
- ./compile qsutil.c
-
-quote.o: \
-compile quote.c
- ./compile quote.c
-
-rcpthosts.o: \
-compile rcpthosts.c
- ./compile rcpthosts.c
-
-recipients.o: \
-compile recipients.c
- ./compile recipients.c
-
-recipients: \
-warn-auto.sh recipients.sh ../conf-home
- cat warn-auto.sh recipients.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > recipients
- chmod 755 recipients
-
-rhosts: \
-warn-auto.sh rhosts.sh ../conf-home
- cat warn-auto.sh rhosts.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > rhosts
- chmod 755 rhosts
-
-rxdelay: \
-warn-auto.sh rxdelay.sh ../conf-home
- cat warn-auto.sh rxdelay.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > rxdelay
- chmod 755 rxdelay
-
-senders: \
-warn-auto.sh senders.sh ../conf-home
- cat warn-auto.sh senders.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > senders
- chmod 755 senders
-
-smtpdlog.o: \
-compile smtpdlog.c
- ./compile smtpdlog.c
-
-s.lib: \
-tryslib.c compile load
- ( ( ./compile tryslib.c && \
- ./load tryslib -ls ) >/dev/null 2>&1 \
- && echo -ls || exit 0 ) > s.lib
- rm -f tryslib.o tryslib
-
-shadow.lib: \
-tryshadow.c compile load
- ( ( ./compile tryshadow.c && \
- ./load tryshadow -lshadow ) >/dev/null 2>&1 \
- && echo -lshadow || exit 0 ) > shadow.lib
- rm -f tryshadow.o tryshadow
-
-successes: \
-warn-auto.sh successes.sh ../conf-home
- cat warn-auto.sh successes.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > successes
- chmod 755 successes
-
-suids: \
-warn-auto.sh suids.sh ../conf-home
- cat warn-auto.sh suids.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > suids
- chmod 755 suids
-
-readsubdir.o: \
-compile readsubdir.c
- ./compile readsubdir.c
-
-received.o: \
-compile received.c
- ./compile received.c
-
-sendmail: \
-load sendmail.o auto_qmail.o qlibs.lib
- ./load sendmail auto_qmail.o `cat qlibs.lib`
-
-sendmail.o: \
-compile sendmail.c
- ./compile sendmail.c
-
-setforward: \
-load setforward.o qlibs.lib
- ./load setforward `cat qlibs.lib`
-
-setforward.o: \
-compile setforward.c
- ./compile setforward.c
-
-setmaillist: \
-load setmaillist.o qlibs.lib
- ./load setmaillist `cat qlibs.lib`
-
-setmaillist.o: \
-compile setmaillist.c
- ./compile setmaillist.c
-
-sha1.o: \
-compile sha1.c
- ./compile sha1.c
-
-sha256.o : \
-compile sha256.c
- ./compile sha256.c
-
-socket.lib: \
-trylsock.c compile load
- ( ( ./compile trylsock.c && \
- ./load trylsock -lsocket -lnsl ) >/dev/null 2>&1 \
- && echo -lsocket -lnsl || exit 0 ) > socket.lib
- rm -f trylsock.o trylsock
-
-spawn.o: \
-compile chkspawn spawn.c
- ./chkspawn
- ./compile spawn.c
-
-spfdnsip.o: \
-compile spfdnsip.c
- ./compile spfdnsip.c
-
-spf.o: \
-compile spf.c
- ./compile spf.c
-
-spfquery: \
-load spfquery.o spf.o ipme.o ipalloc.o now.o dns.o \
-spfdnsip.o datetime.a dns.lib qlibs.lib
- ./load spfquery spf.o ipme.o ipalloc.o spfdnsip.o \
- now.o dns.o datetime.a `cat dns.lib` `cat socket.lib` `cat qlibs.lib`
-
-spfquery.o: \
-compile spfquery.c
- ./compile spfquery.c
-
-splogger: \
-load splogger.o syslog.lib socket.lib qlibs.lib
- ./load splogger `cat syslog.lib` `cat socket.lib` `cat qlibs.lib`
-
-splogger.o: \
-compile splogger.c
- ./compile splogger.c
-
-srs2.o: \
- compile srs2.c
- ./compile srs2.c
-
-srsforward: \
-load srsforward.o qmail.o auto_qmail.o control.o constmap.o \
-srs2.o sha1.o \
-qlibs.lib
- ./load srsforward qmail.o auto_qmail.o control.o constmap.o \
- srs2.o sha1.o `cat qlibs.lib`
-
-srsforward.o: \
-compile srsforward.c
- ./compile srsforward.c
-
-srsreverse: \
-load srsreverse.o qmail.o auto_break.o auto_qmail.o \
-control.o constmap.o srs2.o sha1.o qlibs.lib
- ./load srsreverse qmail.o auto_break.o auto_qmail.o \
- control.o constmap.o srs2.o sha1.o \
- `cat qlibs.lib`
-
-srsreverse.o: \
-compile srsreverse.c
- ./compile srsreverse.c
-
-strset.o: \
-compile strset.c
- ./compile strset.c
-
-syslog.lib: \
-trysyslog.c compile load
- ( ( ./compile trysyslog.c && \
- ./load trysyslog -lgen ) >/dev/null 2>&1 \
- && echo -lgen || exit 0 ) > syslog.lib
- rm -f trysyslog.o trysyslog
-
-systype: \
-find-systype trycpp.c
- ./find-systype > systype
-
-tai64nfrac: \
-load tai64nfrac.o qlibs.lib
- ./load tai64nfrac `cat qlibs.lib`
-
-tai64nfrac.o: \
-compile tai64nfrac.c
- ./compile tai64nfrac.c
-
-tcpto.o: \
-compile tcpto.c
- ./compile tcpto.c
-
-tcpto_clean.o: \
-compile tcpto_clean.c
- ./compile tcpto_clean.c
-
-tls_errors.o: \
-compile tls_errors.c
- ./compile tls_errors.c
-
-tls_remote.o: \
-compile tls_remote.c
- ./compile tls_remote.c
-
-tls_start.o: \
-compile tls_start.c
- ./compile tls_start.c tls_errors.c
-
-tls_timeoutio.o: \
-compile tls_timeoutio.c
- ./compile tls_timeoutio.c
-
-token822.o: \
-compile token822.c
- ./compile token822.c
-
-trigger.o: \
-compile trigger.c
- ./compile trigger.c
-
-triggerpull.o: \
-compile triggerpull.c
- ./compile triggerpull.c
-
-wildmat.o: \
-compile wildmat.c
- ./compile wildmat.c
-
-xqp: \
-warn-auto.sh xqp.sh ../conf-home
- cat warn-auto.sh xqp.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > xqp
- chmod 755 xqp
-
-xrecipient: \
-warn-auto.sh xrecipient.sh ../conf-home
- cat warn-auto.sh xrecipient.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > xrecipient
- chmod 755 xrecipient
-
-xsender: \
-warn-auto.sh xsender.sh ../conf-home
- cat warn-auto.sh xsender.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > xsender
- chmod 755 xsender
-
-zddist: \
-warn-auto.sh zddist.sh ../conf-home
- cat warn-auto.sh zddist.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zddist
- chmod 755 zddist
-
-zdeferrals: \
-warn-auto.sh zdeferrals.sh ../conf-home
- cat warn-auto.sh zdeferrals.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zdeferrals
- chmod 755 zdeferrals
-
-zfailures: \
-warn-auto.sh zfailures.sh ../conf-home
- cat warn-auto.sh zfailures.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zfailures
- chmod 755 zfailures
-
-zoverall: \
-warn-auto.sh zoverall.sh ../conf-home
- cat warn-auto.sh zoverall.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zoverall
- chmod 755 zoverall
-
-zrecipients: \
-warn-auto.sh zrecipients.sh ../conf-home
- cat warn-auto.sh zrecipients.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zrecipients
- chmod 755 zrecipients
-
-zrhosts: \
-warn-auto.sh zrhosts.sh ../conf-home
- cat warn-auto.sh zrhosts.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zrhosts
- chmod 755 zrhosts
-
-zrxdelay: \
-warn-auto.sh zrxdelay.sh ../conf-home
- cat warn-auto.sh zrxdelay.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zrxdelay
- chmod 755 zrxdelay
-
-zsenders: \
-warn-auto.sh zsenders.sh ../conf-home
- cat warn-auto.sh zsenders.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zsenders
- chmod 755 zsenders
-
-zsendmail: \
-warn-auto.sh zsendmail.sh ../conf-home
- cat warn-auto.sh zsendmail.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zsendmail
- chmod 755 zsendmail
-
-zsuccesses: \
-warn-auto.sh zsuccesses.sh ../conf-home
- cat warn-auto.sh zsuccesses.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zsuccesses
- chmod 755 zsuccesses
-
-zsuids: \
-warn-auto.sh zsuids.sh ../conf-home
- cat warn-auto.sh zsuids.sh \
- | sed s}HOME}"`head -1 ../conf-home`"}g \
- > zsuids
- chmod 755 zsuids
-
-# cpp sources
-
-SRCS = dkim.cpp dkimbase.cpp dkimsign.cpp dkimverify.cpp
-OBJS = $(SRCS:.cpp=.o)
-
-.cpp.o:
- g++ -O2 -std=c11 $< $*
-
-libqdkim.a: $(OBJS)
- @rm -f libqdkim.a
- ar cr libqdkim.a $(OBJS)
- ranlib libqdkim.a
-
diff --git a/src/auto-gid.c b/src/auto-gid.c
deleted file mode 100644
index ba386c7..0000000
--- a/src/auto-gid.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <grp.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "buffer.h"
-#include "exit.h"
-#include "fmt.h"
-#include "scan.h"
-
-char inbuf[256];
-buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf));
-
-void outs(char *s)
-{
- if (buffer_puts(&b, s) == -1) _exit(111);
-}
-
-int main(int argc, char **argv)
-{
- char *name;
- char *value;
- struct group *gr;
- char strnum[FMT_ULONG];
-
- name = argv[1];
- if (!name) _exit(100);
- value = argv[2];
- if (!value) _exit(100);
-
- gr = getgrnam(value);
- if (!gr) {
- buffer_puts(buffer_2, "fatal: unable to find group ");
- buffer_puts(buffer_2, value);
- buffer_puts(buffer_2, "\n");
- buffer_flush(buffer_2);
- _exit(111);
- }
-
- strnum[fmt_ulong(strnum, (unsigned long)gr->gr_gid)] = 0;
-
- outs("int ");
- outs(name);
- outs(" = ");
- outs(strnum);
- outs(";\n");
- if (buffer_flush(&b) == -1) _exit(111);
- _exit(0);
-}
diff --git a/src/auto-int.c b/src/auto-int.c
deleted file mode 100644
index e3a6d56..0000000
--- a/src/auto-int.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <unistd.h>
-
-#include "buffer.h"
-#include "exit.h"
-#include "fmt.h"
-#include "scan.h"
-
-char inbuf[256];
-buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf));
-
-void out(char *s)
-{
- if (buffer_puts(&b, s) == -1) _exit(111);
-}
-
-int main(int argc, char **argv)
-{
- char *name;
- char *value;
- unsigned long num;
- char strnum[FMT_ULONG];
-
- name = argv[1];
- if (!name) _exit(100);
- value = argv[2];
- if (!value) _exit(100);
-
- scan_ulong(value, &num);
- strnum[fmt_ulong(strnum, num)] = 0;
-
- out("int ");
- out(name);
- out(" = ");
- out(strnum);
- out(";\n");
- if (buffer_flush(&b) == -1) _exit(111);
- _exit(0);
-}
diff --git a/src/auto-int8.c b/src/auto-int8.c
deleted file mode 100644
index aa0465c..0000000
--- a/src/auto-int8.c
+++ /dev/null
@@ -1,38 +0,0 @@
-#include <unistd.h>
-
-#include "buffer.h"
-#include "exit.h"
-#include "fmt.h"
-#include "scan.h"
-
-char inbuf[256];
-buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf));
-
-void out(char *s)
-{
- if (buffer_puts(&b, s) == -1) _exit(111);
-}
-
-int main(int argc, char **argv)
-{
- char *name;
- char *value;
- unsigned long num;
- char strnum[FMT_ULONG];
-
- name = argv[1];
- if (!name) _exit(100);
- value = argv[2];
- if (!value) _exit(100);
-
- scan_8long(value, &num);
- strnum[fmt_ulong(strnum, num)] = 0;
-
- out("int ");
- out(name);
- out(" = ");
- out(strnum);
- out(";\n");
- if (buffer_flush(&b) == -1) _exit(111);
- _exit(0);
-}
diff --git a/src/auto-str.c b/src/auto-str.c
deleted file mode 100644
index cad14ce..0000000
--- a/src/auto-str.c
+++ /dev/null
@@ -1,44 +0,0 @@
-#include <unistd.h>
-
-#include "buffer.h"
-#include "exit.h"
-
-char inbuf[BUFFER_SMALL];
-buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf));
-
-void out(char *s)
-{
- if (buffer_puts(&b, s) == -1) _exit(111);
-}
-
-int main(int argc, char **argv)
-{
- char *name;
- char *value;
- unsigned char ch;
- char octal[4];
-
- name = argv[1];
- if (!name) _exit(100);
- value = argv[2];
- if (!value) _exit(100);
-
- out("char ");
- out(name);
- out("[] = \"\\\n");
-
- while ((ch = *value++)) {
- out("\\");
- octal[3] = 0;
- octal[2] = '0' + (ch & 7);
- ch >>= 3;
- octal[1] = '0' + (ch & 7);
- ch >>= 3;
- octal[0] = '0' + (ch & 7);
- out(octal);
- }
-
- out("\\\n\";\n");
- if (buffer_flush(&b) == -1) _exit(111);
- _exit(0);
-}
diff --git a/src/auto-uid.c b/src/auto-uid.c
deleted file mode 100644
index 4eaaa2d..0000000
--- a/src/auto-uid.c
+++ /dev/null
@@ -1,48 +0,0 @@
-#include <pwd.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "buffer.h"
-#include "exit.h"
-#include "fmt.h"
-#include "scan.h"
-
-char inbuf[256];
-buffer b = BUFFER_INIT(write, 1, inbuf, sizeof(inbuf));
-
-void outs(char *s) /* was named puts, but Solaris pwd.h includes stdio.h. dorks. */
-{
- if (buffer_puts(&b, s) == -1) _exit(111);
-}
-
-int main(int argc, char **argv)
-{
- char *name;
- char *value;
- struct passwd *pw;
- char strnum[FMT_ULONG];
-
- name = argv[1];
- if (!name) _exit(100);
- value = argv[2];
- if (!value) _exit(100);
-
- pw = getpwnam(value);
- if (!pw) {
- buffer_puts(buffer_2, "fatal: unable to find user ");
- buffer_puts(buffer_2, value);
- buffer_puts(buffer_2, "\n");
- buffer_flush(buffer_2);
- _exit(111);
- }
-
- strnum[fmt_ulong(strnum, (unsigned long)pw->pw_uid)] = 0;
-
- outs("int ");
- outs(name);
- outs(" = ");
- outs(strnum);
- outs(";\n");
- if (buffer_flush(&b) == -1) _exit(111);
- _exit(0);
-}
diff --git a/src/direntry.h1 b/src/direntry.h1
deleted file mode 100644
index f737676..0000000
--- a/src/direntry.h1
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef DIRENTRY_H
-#define DIRENTRY_H
-
-#include <sys/types.h>
-#include <sys/dir.h>
-#define direntry struct direct
-
-#endif
diff --git a/src/direntry.h2 b/src/direntry.h2
deleted file mode 100644
index 0302ebe..0000000
--- a/src/direntry.h2
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef DIRENTRY_H
-#define DIRENTRY_H
-
-#include <sys/types.h>
-#include <dirent.h>
-#define direntry struct dirent
-
-#endif
diff --git a/src/fifo.c b/src/fifo.c
index f2da11e..becbb56 100644
--- a/src/fifo.c
+++ b/src/fifo.c
@@ -3,6 +3,10 @@
#include <sys/stat.h>
#include <sys/types.h>
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#endif
+
#ifdef HASMKFIFO
int fifo_make(char *fn, int mode)
{
diff --git a/src/fmtqfn.c b/src/fmtqfn.c
index 8cb8644..df060e8 100644
--- a/src/fmtqfn.c
+++ b/src/fmtqfn.c
@@ -2,7 +2,11 @@
#include "fmt.h"
-#include "auto_split.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_split.h"
+#endif
unsigned int fmtqfn(char *s, char *dirslash, unsigned long id, int flagsplit)
{
diff --git a/src/fork.h1 b/src/fork.h1
deleted file mode 100644
index a1accc7..0000000
--- a/src/fork.h1
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef FORK_H
-#define FORK_H
-
-int fork();
-#define vfork fork
-
-#endif
diff --git a/src/fork.h2 b/src/fork.h2
deleted file mode 100644
index fa3dd5d..0000000
--- a/src/fork.h2
+++ /dev/null
@@ -1,7 +0,0 @@
-#ifndef FORK_H
-#define FORK_H
-
-int fork();
-int vfork();
-
-#endif
diff --git a/src/hier.c b/src/hier.c
index 9be2f25..29e7176 100644
--- a/src/hier.c
+++ b/src/hier.c
@@ -3,12 +3,17 @@
#include "fifo.h"
#include "fmt.h"
-#include "auto_qmail.h"
-#include "auto_split.h"
-#include "auto_uids.h"
#include "ipalloc.h"
#include "tcpto.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_split.h"
+ #include "auto_uids.h"
+#endif
+
char buf[100 + FMT_ULONG];
void dsplit(char *base, int uid, int mode) /* base must be under 100 bytes */
diff --git a/src/include/fehsqm-config.h.in b/src/include/fehsqm-config.h.in
new file mode 100644
index 0000000..6e44e84
--- /dev/null
+++ b/src/include/fehsqm-config.h.in
@@ -0,0 +1,32 @@
+#ifndef FEHSQM_CONFIG_INCLUDE
+#define FEHSQM_CONFIG_INCLUDE
+
+#include <sys/types.h>
+
+#mesondefine HASSALEN
+#mesondefine HASGETSPNAM
+#mesondefine HASGETUSERPW
+#mesondefine HASUTMP
+#mesondefine HASMKFIFO
+#mesondefine IDN2
+
+static const char auto_qmail[] = "@auto_qmail@";
+static const char auto_usera[] = "@auto_usera@";
+
+static const int auto_split = @auto_split@;
+static const int auto_patrn = @auto_patrn@;
+static const int auto_spawn = @auto_spawn@;
+
+static const uid_t auto_uida = @alias@;
+static const uid_t auto_uidd = @qmaild@;
+static const uid_t auto_uidl = @qmaill@;
+static const uid_t auto_uido = 0;
+static const uid_t auto_uidp = @qmailp@;
+static const uid_t auto_uidq = @qmailq@;
+static const uid_t auto_uidr = @qmailr@;
+static const uid_t auto_uids = @qmails@;
+
+static const gid_t auto_gidq = @sqmail@;
+static const gid_t auto_gidn = @nofiles@;
+
+#endif
diff --git a/src/include/meson.build b/src/include/meson.build
new file mode 100644
index 0000000..5f621f5
--- /dev/null
+++ b/src/include/meson.build
@@ -0,0 +1,64 @@
+sqmail_hdrs = [
+ 'base64.h',
+ 'commands.h',
+ 'constmap.h',
+ 'control.h',
+ 'date822fmt.h',
+ 'datetime.h',
+ 'dkimbase.h',
+ 'dkim.h',
+ 'dkimsign.h',
+ 'dkimverify.h',
+ 'dnsdoe.h',
+ 'dnsgettxt.h',
+ 'dns.h',
+ 'exit.h',
+ 'extra.h',
+ 'fifo.h',
+ 'fmtqfn.h',
+ 'gfrom.h',
+ 'global.h',
+ 'headerbody.h',
+ 'hfield.h',
+ 'hier.h',
+ 'hmac_md5.h',
+ 'ipalloc.h',
+ 'ipme.h',
+ 'maildir.h',
+ 'md5.h',
+ 'mfrules.h',
+ 'myctime.h',
+ 'newfield.h',
+ 'now.h',
+ 'prioq.h',
+ 'prot.h',
+ 'qlx.h',
+ 'qmail.h',
+ 'qsutil.h',
+ 'quote.h',
+ 'rcpthosts.h',
+ 'readsubdir.h',
+ 'readwrite.h',
+ 'received.h',
+ 'recipients.h',
+ 'sendtodo.h',
+ 'sha1.h',
+ 'sha256.h',
+ 'smtpdlog.h',
+ 'spf.h',
+ 'srs2.h',
+ 'strset.h',
+ 'tcpto.h',
+ 'tls_errors.h',
+ 'tls_remote.h',
+ 'tls_start.h',
+ 'tls_timeoutio.h',
+ 'token822.h',
+ 'trigger.h',
+ 'triggerpull.h',
+ 'wildmat.h',
+]
+
+sqmail_hdrs_subdir = 'sqmail'
+
+install_headers(sqmail_hdrs, subdir : sqmail_hdrs_subdir)
diff --git a/src/ipme.c b/src/ipme.c
index b3a1692..cb05a77 100644
--- a/src/ipme.c
+++ b/src/ipme.c
@@ -14,13 +14,18 @@
#include "ip.h"
#include "stralloc.h"
-#include "hassalen.h"
#include "ipalloc.h"
#ifndef SIOCGIFCONF /* whatever works */
#include <sys/sockio.h>
#endif
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "hassalen.h"
+#endif
+
/** @file ipme.c
@brief ipme_is4, ipme_is6, ipme_is46, ipme_init
*/
diff --git a/src/it-analog=d b/src/it-analog=d
deleted file mode 100644
index cbc4c74..0000000
--- a/src/it-analog=d
+++ /dev/null
@@ -1,25 +0,0 @@
-columnt
-ddist
-deferrals
-failures
-matchup
-recipients
-rhosts
-rxdelay
-senders
-successes
-suids
-xqp
-xrecipient
-xsender
-zddist
-zdeferrals
-zfailures
-zoverall
-zrecipients
-zrhosts
-zrxdelay
-zsenders
-zsendmail
-zsuccesses
-zsuids
diff --git a/src/it-base=d b/src/it-base=d
deleted file mode 100644
index ee4adf5..0000000
--- a/src/it-base=d
+++ /dev/null
@@ -1,10 +0,0 @@
-qmail-clean
-qmail-inject
-qmail-local
-qmail-lspawn
-qmail-send
-qmail-queue
-qmail-rspawn
-qmail-send
-qmail-start
-qmail-todo
diff --git a/src/it-clients=d b/src/it-clients=d
deleted file mode 100644
index eb741bd..0000000
--- a/src/it-clients=d
+++ /dev/null
@@ -1,4 +0,0 @@
-mailsubj
-qmail-remote
-qmail-qmqpc
-sendmail
diff --git a/src/it-control=d b/src/it-control=d
deleted file mode 100644
index a88caf6..0000000
--- a/src/it-control=d
+++ /dev/null
@@ -1,5 +0,0 @@
-qmail-mfrules
-qmail-showctl
-qmail-badloadertypes
-qmail-badmimetypes
-qmail-recipients
diff --git a/src/it-dkim=d b/src/it-dkim=d
deleted file mode 100644
index 1ad1bf5..0000000
--- a/src/it-dkim=d
+++ /dev/null
@@ -1,2 +0,0 @@
-qmail-dkim
-qmail-dksign
diff --git a/src/it-dns=d b/src/it-dns=d
deleted file mode 100644
index c1d692c..0000000
--- a/src/it-dns=d
+++ /dev/null
@@ -1,10 +0,0 @@
-dnscname
-dnsfq
-dnsip
-dnsmxip
-dnsptr
-dnstlsa
-dnstxt
-hostname
-ipmeprint
-spfquery
diff --git a/src/it-forward=d b/src/it-forward=d
deleted file mode 100644
index 135e855..0000000
--- a/src/it-forward=d
+++ /dev/null
@@ -1,8 +0,0 @@
-fastforward
-forward
-setforward
-newaliases
-newinclude
-printforward
-printmaillist
-setmaillist
diff --git a/src/it-log=d b/src/it-log=d
deleted file mode 100644
index 3fe9f6f..0000000
--- a/src/it-log=d
+++ /dev/null
@@ -1,4 +0,0 @@
-qmail-mrtg
-qmail-mrtg-queue
-splogger
-tai64nfrac
diff --git a/src/it-mbox=d b/src/it-mbox=d
deleted file mode 100644
index 11e36d6..0000000
--- a/src/it-mbox=d
+++ /dev/null
@@ -1,9 +0,0 @@
-condredirect
-bouncesaying
-except
-maildirmake
-maildir2mbox
-maildirwatch
-preline
-qbiff
-qreceipt
diff --git a/src/it-pam=d b/src/it-pam=d
deleted file mode 100644
index 27a6a69..0000000
--- a/src/it-pam=d
+++ /dev/null
@@ -1,4 +0,0 @@
-qmail-authuser
-qmail-smtpam
-qmail-vmailuser
-qmail-postgrey
diff --git a/src/it-pop=d b/src/it-pop=d
deleted file mode 100644
index 2b2f59c..0000000
--- a/src/it-pop=d
+++ /dev/null
@@ -1,2 +0,0 @@
-qmail-popup
-qmail-pop3d
diff --git a/src/it-queue=d b/src/it-queue=d
deleted file mode 100644
index d439b37..0000000
--- a/src/it-queue=d
+++ /dev/null
@@ -1,5 +0,0 @@
-qmail-qread
-qmail-qstat
-qmail-tcpok
-qmail-tcpto
-qmail-qmaint
diff --git a/src/it-server=d b/src/it-server=d
deleted file mode 100644
index 9ecb56d..0000000
--- a/src/it-server=d
+++ /dev/null
@@ -1,3 +0,0 @@
-qmail-qmtpd
-qmail-qmqpd
-qmail-smtpd
diff --git a/src/it-setup=d b/src/it-setup=d
deleted file mode 100644
index bcc9a56..0000000
--- a/src/it-setup=d
+++ /dev/null
@@ -1,4 +0,0 @@
-config
-config-fast
-install
-instcheck
diff --git a/src/it-srs=d b/src/it-srs=d
deleted file mode 100644
index 02db41a..0000000
--- a/src/it-srs=d
+++ /dev/null
@@ -1,2 +0,0 @@
-srsforward
-srsreverse
diff --git a/src/it-user=d b/src/it-user=d
deleted file mode 100644
index 55d4d04..0000000
--- a/src/it-user=d
+++ /dev/null
@@ -1,4 +0,0 @@
-qmail-getpw
-qmail-newu
-qmail-newmrh
-qmail-pw2u
diff --git a/src/it=d b/src/it=d
deleted file mode 100644
index cedc560..0000000
--- a/src/it=d
+++ /dev/null
@@ -1,16 +0,0 @@
-it-analog
-it-base
-it-clients
-it-control
-it-dkim
-it-dns
-it-forward
-it-log
-it-mbox
-it-pam
-it-pop
-it-queue
-it-server
-it-srs
-it-setup
-it-user
diff --git a/src/meson.build b/src/meson.build
new file mode 100644
index 0000000..8f9af12
--- /dev/null
+++ b/src/meson.build
@@ -0,0 +1,536 @@
+inc = 'include'
+
+subdir(inc)
+
+config = configuration_data()
+cc = meson.get_compiler('c')
+
+if cc.has_member('struct sockaddr', 'sa_len', prefix : '#include <sys/socket.h>')
+ config.set('HASSALEN', true)
+endif
+
+if cc.has_function('getspnam', prefix : '#include <shadow.h>')
+ config.set('HASGETSPNAM', true)
+elif cc.has_function('getuserpw', prefix : '#include <userpw.h>')
+ config.set('HASGETUSERPW', true)
+endif
+
+if cc.has_function('mkfifo', prefix : '#include <sys/stat.h>')
+ config.set('HASMKFIFO', true)
+endif
+
+if cc.has_header('utmp.h')
+ config.set('HASUTMP', true)
+endif
+
+if idn2_dep.found()
+ config.set('IDN2', true)
+endif
+
+auto_qmail = run_command('head', '-n1', '../conf-home', check : true).stdout().strip()
+config.set('auto_qmail', auto_qmail)
+
+config.set('auto_usera', 'alias')
+
+config.set('auto_split', get_option('split'))
+config.set('auto_patrn', get_option('patrn'))
+config.set('auto_spawn', get_option('spawn'))
+
+user_groups = [
+ 'alias', 'qmaild', 'qmaill', 'qmailp', 'qmailq', 'qmailr', 'qmails',
+ 'sqmail', 'nofiles',
+]
+
+foreach id : user_groups
+ config.set(id, get_option(id))
+endforeach
+
+configure_file(
+ configuration : config,
+ input : inc / 'fehsqm-config.h.in',
+ output : 'fehsqm-config.h',
+ install_dir : get_option('includedir') / sqmail_hdrs_subdir,
+ install_tag : 'devel')
+
+add_project_arguments('-DUSE_CONFIG', language : 'c')
+
+auto_break = get_option('break')
+assert(auto_break[0] == auto_break)
+assert(auto_break not in ['"', '\\'])
+auto_break_c = custom_target(output : 'auto_break.c',
+ command : ['echo', 'char', 'auto_break', '[]', '=', f'"@auto_break@"', ';'],
+ capture : true)
+
+
+dkim_slib = static_library('qdkim',
+ 'dkim.cpp', 'dkimbase.cpp', 'dkimsign.cpp', 'dkimverify.cpp',
+ include_directories : inc,
+ dependencies : dnsresolv_dep,
+ build_by_default : false)
+
+datetime_slib = static_library('datetime', 'datetime.c', 'datetime_un.c',
+ include_directories : inc,
+ build_by_default : false)
+
+
+if get_option('build-srs')
+
+ executable('srsforward',
+ 'srsforward.c', 'qmail.c', 'control.c', 'constmap.c', 'srs2.c', 'sha1.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('srsreverse',
+ 'srsreverse.c', 'qmail.c', 'control.c', 'constmap.c', 'srs2.c', 'sha1.c',
+ auto_break_c,
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-user')
+
+ executable('qmail-getpw', 'qmail-getpw.c', auto_break_c,
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-newu', 'qmail-newu.c', dependencies : qlibs_dep, install : true)
+
+ executable('qmail-pw2u', 'qmail-pw2u.c', 'constmap.c', 'control.c', auto_break_c,
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-newmrh', 'qmail-newmrh.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+if get_option('build-server')
+
+ executable('qmail-qmtpd',
+ 'qmail-qmtpd.c', 'rcpthosts.c', 'control.c', 'constmap.c', 'received.c',
+ 'date822fmt.c', 'now.c', 'qmail.c', auto_break_c,
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-qmqpd',
+ 'qmail-qmqpd.c', 'received.c', 'now.c', 'date822fmt.c', 'qmail.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-smtpd',
+ 'qmail-smtpd.c', 'rcpthosts.c', 'commands.c', 'ipme.c', 'ipalloc.c',
+ 'constmap.c', 'control.c', 'received.c', 'recipients.c', 'mfrules.c',
+ 'tls_start.c', 'smtpdlog.c', 'dns.c', 'date822fmt.c', 'now.c', 'qmail.c',
+ 'wildmat.c', 'spf.c', 'spfdnsip.c', 'base64.c', auto_break_c,
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+endif
+
+
+if get_option('build-queue')
+
+ executable('qmail-qread',
+ 'qmail-qread.c', 'fmtqfn.c', 'readsubdir.c', 'date822fmt.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-tcpto', 'qmail-tcpto.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-tcpok', 'qmail-tcpok.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+if get_option('build-pam')
+
+ executable('qmail-authuser',
+ 'qmail-authuser.c', 'control.c', 'hmac_md5.c', 'md5c.c',
+ 'constmap.c', 'sha1.c', 'sha256.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, crypt_dep])
+
+ executable('qmail-smtpam',
+ 'qmail-smtpam.c', 'control.c', 'now.c', 'dns.c', 'constmap.c', 'ipalloc.c',
+ 'ipme.c', 'quote.c', 'tcpto.c', 'tls_timeoutio.c', 'tls_errors.c',
+ 'tls_remote.c', 'dns_tlsa.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep, ucspissl_dep, ssl_dep, crypto_dep])
+
+ executable('qmail-vmailuser', 'qmail-vmailuser.c', 'control.c', 'constmap.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-postgrey', 'qmail-postgrey.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+if get_option('build-log')
+
+ executable('splogger', 'splogger.c', dependencies : qlibs_dep, install : true)
+ executable('qmail-mrtg', 'qmail-mrtg.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+ executable('tai64nfrac', 'tai64nfrac.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+if get_option('build-control')
+
+ executable('qmail-badmimetypes', 'qmail-badmimetypes.c',
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-badloadertypes', 'qmail-badloadertypes.c',
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-mfrules', 'qmail-mfrules.c', dependencies : qlibs_dep, install : true)
+
+ executable('qmail-recipients', 'qmail-recipients.c', dependencies : qlibs_dep, install : true)
+
+ executable('qmail-showctl', 'qmail-showctl.c', 'control.c', auto_break_c,
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-forward') or get_option('build-mbox')
+ executable('forward', 'forward.c', 'qmail.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+endif
+
+
+if get_option('build-forward')
+
+ executable('fastforward', 'fastforward.c', 'qmail.c', 'strset.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('printforward', 'printforward.c', dependencies : qlibs_dep, install : true)
+
+ executable('setforward', 'setforward.c', dependencies : qlibs_dep, install : true)
+
+ executable('newaliases', 'newaliases.c', 'token822.c', 'control.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('printmaillist', 'printmaillist.c', dependencies : qlibs_dep, install : true)
+
+ executable('setmaillist', 'setmaillist.c', dependencies : qlibs_dep, install : true)
+
+ executable('newinclude', 'newinclude.c', 'token822.c', 'control.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-setup')
+
+ executable('install-sqmail', 'install.c', 'hier.c', 'fifo.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('instcheck', 'instcheck.c', 'hier.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-pop')
+
+ executable('qmail-popup', 'qmail-popup.c', 'commands.c', 'now.c', 'tls_start.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-pop3d',
+ 'qmail-pop3d.c', 'commands.c', 'maildir.c', 'prioq.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-dns')
+
+ executable('dnscname', 'dnscname.c', 'dns.c', 'ipalloc.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnsptr', 'dnsptr.c', 'dns.c', 'ipalloc.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnsip', 'dnsip.c', 'dns.c', 'ipalloc.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnsmxip', 'dnsmxip.c', 'ipalloc.c', 'dns.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnsfq', 'dnsfq.c', 'dns.c', 'ipalloc.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnstlsa', 'dnstlsa.c', 'dns_tlsa.c', 'ipalloc.c', 'dns.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('dnstxt', 'dnstxt.c', 'ipalloc.c', 'dns.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('hostname', 'hostname.c', dependencies : [qlibs_dep, dnsresolv_dep], install : true)
+
+ executable('ipmeprint', 'ipmeprint.c', 'ipme.c', 'ipalloc.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+ executable('spfquery',
+ 'spfquery.c', 'spf.c', 'ipme.c', 'ipalloc.c', 'now.c', 'dns.c', 'spfdnsip.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : [qlibs_dep, dnsresolv_dep])
+
+endif
+
+
+if get_option('build-dkim')
+
+ executable('qmail-dkim',
+ 'qmail-dkim.cpp', 'dkim.cpp', 'dkimbase.cpp', 'dkimsign.cpp', 'dkimverify.cpp',
+ include_directories : inc,
+ install : true,
+ link_with : dkim_slib,
+ dependencies : [qlibs_dep, dnsresolv_dep, ssl_dep, crypto_dep])
+
+ executable('qmail-dksign',
+ 'qmail-dksign.c', 'control.c', 'constmap.c', 'fmtqfn.c', 'rcpthosts.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-dkverify',
+ 'qmail-dkverify.c', 'control.c', 'fmtqfn.c', 'qmail.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-clients')
+
+ executable('qmail-remote',
+ 'qmail-remote.c', 'control.c', 'tcpto.c', 'now.c', 'dns.c', 'ipalloc.c',
+ 'ipme.c', 'quote.c', 'tls_timeoutio.c', 'tls_errors.c', 'tls_remote.c',
+ 'dns_tlsa.c', 'base64.c', 'constmap.c', 'md5c.c', 'hmac_md5.c',
+ include_directories : inc,
+ install : true,
+ dependencies : [qlibs_dep, dnsresolv_dep, idn2_dep, ssl_dep, crypto_dep, ucspissl_dep])
+
+ executable('qmail-qmqpc', 'qmail-qmqpc.c', 'control.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('sendmail', 'sendmail.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+if get_option('build-mbox')
+
+ executable('predate', 'predate.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('preline', 'preline.c', dependencies : qlibs_dep, install : true)
+
+ executable('condredirect', 'condredirect.c', 'qmail.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('bouncesaying', 'bouncesaying.c', dependencies : qlibs_dep, install : true)
+
+ executable('except', 'except.c', dependencies : qlibs_dep, install : true)
+
+ executable('maildirmake', 'maildirmake.c', dependencies : qlibs_dep, install : true)
+
+ executable('maildir2mbox',
+ 'maildir2mbox.c', 'maildir.c', 'prioq.c', 'now.c', 'myctime.c', 'gfrom.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('maildirwatch',
+ 'maildirwatch.c', 'hfield.c', 'headerbody.c', 'maildir.c', 'prioq.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qbiff', 'qbiff.c', 'headerbody.c', 'hfield.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qreceipt',
+ 'qreceipt.c', 'headerbody.c', 'hfield.c', 'quote.c', 'token822.c', 'qmail.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-base')
+
+ executable('qmail-local',
+ 'qmail-local.c', 'qmail.c', 'quote.c', 'now.c', 'gfrom.c', 'myctime.c',
+ auto_break_c,
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-rspawn',
+ 'qmail-rspawn.c', 'spawn.c', 'tcpto_clean.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-lspawn', 'qmail-lspawn.c', 'spawn.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-send',
+ 'qmail-send.c', 'qsutil.c', 'control.c', 'constmap.c', 'newfield.c',
+ 'prioq.c', 'trigger.c', 'fmtqfn.c', 'quote.c', 'now.c', 'readsubdir.c',
+ 'qmail.c', 'date822fmt.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-qmaint',
+ 'qmail-qmaint.c', 'fifo.c', 'fmtqfn.c', 'readsubdir.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-clean',
+ 'qmail-clean.c', 'fmtqfn.c', 'now.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+ executable('qmail-start', 'qmail-start.c', dependencies : qlibs_dep, install : true)
+
+ executable('qmail-queue',
+ 'qmail-queue.c', 'triggerpull.c', 'fmtqfn.c', 'now.c', 'date822fmt.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-inject',
+ 'qmail-inject.c', 'headerbody.c', 'hfield.c', 'newfield.c', 'quote.c', 'now.c',
+ 'control.c', 'date822fmt.c', 'qmail.c', 'token822.c', 'constmap.c',
+ include_directories : inc,
+ install : true,
+ link_with : datetime_slib,
+ dependencies : qlibs_dep)
+
+ executable('qmail-todo',
+ 'qmail-todo.c', 'control.c', 'constmap.c', 'trigger.c', 'fmtqfn.c', 'now.c',
+ 'qsutil.c', 'readsubdir.c',
+ include_directories : inc,
+ install : true,
+ dependencies : qlibs_dep)
+
+endif
+
+
+if get_option('build-analog')
+
+ executable('matchup', 'matchup.c', dependencies : qlibs_dep, install : true)
+
+ executable('columnt', 'columnt.c', dependencies : qlibs_dep, install : true)
+
+endif
+
+
+#it-analog: ddist deferrals failures senders successes suids \
+# recipients rhosts rhosts rxdelay xqp xrecipient xsender zddist zdeferrals \
+# zfailures zrecipients zrhosts zrxdelay zsenders zsendmail zsuccesses zsuids zoverall
+#it-mbox: datemail
+#it-clients: mailsubj
+#it-setup: config config-fast
+#it-log: qmail-mrtg-queue
+#it-queue: qmail-qstat qmail-upq
+
+#hasmkffo.h: trymkffo.c compile load
+# ( ( ./compile trymkffo.c && ./load trymkffo ) >/dev/null \
+# 2>&1 \
+# && echo \#define HASMKFIFO 1 || exit 0 ) > hasmkffo.h
+# rm -f trymkffo.o trymkffo
+#
+#hasshsgr.h: chkshsgr warn-shsgr tryshsgr.c compile load
+# ./chkshsgr || ( cat warn-shsgr; exit 1 )
+# ( ( ./compile tryshsgr.c \
+# && ./load tryshsgr && ./tryshsgr ) >/dev/null 2>&1 \
+# && echo \#define HASSHORTSETGROUPS 1 || exit 0 ) > \
+# hasshsgr.h
+# rm -f tryshsgr.o tryshsgr
diff --git a/src/newaliases.c b/src/newaliases.c
index c48f354..2275f63 100644
--- a/src/newaliases.c
+++ b/src/newaliases.c
@@ -11,10 +11,15 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "token822.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "newaliases"
int rename(const char *, const char *); // stdio.h
diff --git a/src/newinclude.c b/src/newinclude.c
index 4991b43..ae01482 100644
--- a/src/newinclude.c
+++ b/src/newinclude.c
@@ -12,10 +12,15 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "token822.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "newinclude"
void nomem()
diff --git a/src/qbiff.c b/src/qbiff.c
index 0fda293..25d1ae5 100644
--- a/src/qbiff.c
+++ b/src/qbiff.c
@@ -10,10 +10,14 @@
#include "str.h"
#include "stralloc.h"
-#include "hasutmp.h"
#include "headerbody.h"
#include "hfield.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "hasutmp.h"
+#endif
#ifdef HASUTMP
#include <utmp.h>
diff --git a/src/qmail-authuser.c b/src/qmail-authuser.c
index c26d61b..ce18a19 100644
--- a/src/qmail-authuser.c
+++ b/src/qmail-authuser.c
@@ -21,16 +21,21 @@
#include "stralloc.h"
#include "wait.h"
-#include "auto_qmail.h"
#include "control.h"
#include "global.h"
-#include "hasspnam.h"
-#include "hasuserpw.h"
#include "hmac_md5.h"
#include "md5.h"
#include "sha1.h"
#include "sha256.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "hasspnam.h"
+ #include "hasuserpw.h"
+#endif
+
#ifdef HASGETSPNAM
#include <shadow.h>
static struct spwd *spw;
@@ -47,12 +52,13 @@ static struct userpw *upw;
#define DOVECOT_SERVICE "-x"
#define POP_USER "qmail-pop3d"
-/** @file qmail-authuser.c
-@return 0: ok
- 1: credentials failure
- 2: qmail-authuser is misused
- 110: can't read controls
- 111: temporary problem checking the password
+/**
+ @file qmail-authuser.c
+ @return 0: ok
+ 1: credentials failure
+ 2: qmail-authuser is misused
+ 110: can't read controls
+ 111: temporary problem checking the password
*/
static struct passwd *pw;
@@ -171,7 +177,7 @@ int auth_unix(char *user, char *response)
stored = upw->upw_passwd;
else if (errno == ETXTBSY)
exit(111);
-#elif HASGETSPNAM
+#elif defined(HASGETSPNAM)
spw = getspnam(user);
if (spw)
stored = spw->sp_pwdp;
diff --git a/src/qmail-badloadertypes.c b/src/qmail-badloadertypes.c
index 3ed4e2f..b8feba7 100644
--- a/src/qmail-badloadertypes.c
+++ b/src/qmail-badloadertypes.c
@@ -12,7 +12,11 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-badloadertypes"
#define LOADER_LEN 5
diff --git a/src/qmail-badmimetypes.c b/src/qmail-badmimetypes.c
index 314d142..c2298e8 100644
--- a/src/qmail-badmimetypes.c
+++ b/src/qmail-badmimetypes.c
@@ -11,7 +11,11 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-badmimetypes"
#define MIMETYPE_LEN 9
diff --git a/src/qmail-clean.c b/src/qmail-clean.c
index efeda8c..3e4d74e 100644
--- a/src/qmail-clean.c
+++ b/src/qmail-clean.c
@@ -14,10 +14,15 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "fmtqfn.h"
#include "now.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define OSSIFIED 129600 /* see qmail-send.c */
stralloc line = {0};
@@ -111,7 +116,6 @@ int main()
continue; \
} \
} while (0)
-
if (byte_equal(line.s, 5, "foop/")) {
U("intd/", 1);
U("mess/", 1);
diff --git a/src/qmail-dksign.c b/src/qmail-dksign.c
index 0258b29..c3ddeca 100644
--- a/src/qmail-dksign.c
+++ b/src/qmail-dksign.c
@@ -22,12 +22,17 @@
#include "uint_t.h"
#include "wait.h"
-#include "auto_qmail.h"
#include "control.h"
#include "fmtqfn.h"
#include "qmail.h"
#include "rcpthosts.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "qmail-dksign"
#define DOMAINKEYS "ssl/domainkeys/"
diff --git a/src/qmail-dkverify.c b/src/qmail-dkverify.c
index 6a546e9..f26d388 100644
--- a/src/qmail-dkverify.c
+++ b/src/qmail-dkverify.c
@@ -23,11 +23,16 @@
#include "uint_t.h"
#include "wait.h"
-#include "auto_qmail.h"
#include "control.h"
#include "fmtqfn.h"
#include "qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "qmail-dkverify"
/**
diff --git a/src/qmail-getpw.c b/src/qmail-getpw.c
index 9de7ec6..70fe776 100644
--- a/src/qmail-getpw.c
+++ b/src/qmail-getpw.c
@@ -12,9 +12,14 @@
#include "str.h"
#include "auto_break.h"
-#include "auto_usera.h"
#include "qlx.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_usera.h"
+#endif
+
#define GETPW_USERLEN 32
char *local;
diff --git a/src/qmail-inject.c b/src/qmail-inject.c
index 00a1531..9b7cca7 100644
--- a/src/qmail-inject.c
+++ b/src/qmail-inject.c
@@ -14,7 +14,6 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "headerbody.h"
#include "hfield.h"
@@ -24,6 +23,12 @@
#include "quote.h"
#include "token822.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define LINELEN 80
datetime_sec starttime;
diff --git a/src/qmail-local.c b/src/qmail-local.c
index 02040f8..bbef6f3 100644
--- a/src/qmail-local.c
+++ b/src/qmail-local.c
@@ -24,13 +24,17 @@
#include "wait.h"
#include "auto_break.h"
-#include "auto_patrn.h"
#include "gfrom.h"
#include "myctime.h"
#include "now.h"
#include "qmail.h"
#include "quote.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_patrn.h"
+#endif
/**
@file qmail-local
diff --git a/src/qmail-lspawn.c b/src/qmail-lspawn.c
index 29c1b7a..57fba4b 100644
--- a/src/qmail-lspawn.c
+++ b/src/qmail-lspawn.c
@@ -14,10 +14,15 @@
#include "stralloc.h"
#include "wait.h"
-#include "auto_qmail.h"
-#include "auto_uids.h"
#include "qlx.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_uids.h"
+#endif
+
char *aliasempty;
void initialize(int argc, char **argv)
diff --git a/src/qmail-mfrules.c b/src/qmail-mfrules.c
index c913cda..7ef097c 100644
--- a/src/qmail-mfrules.c
+++ b/src/qmail-mfrules.c
@@ -15,7 +15,11 @@
#include "scan.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-mfrules"
diff --git a/src/qmail-newmrh.c b/src/qmail-newmrh.c
index 023f51e..b437818 100644
--- a/src/qmail-newmrh.c
+++ b/src/qmail-newmrh.c
@@ -12,7 +12,11 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-newmrh"
diff --git a/src/qmail-newu.c b/src/qmail-newu.c
index ee836bb..953f243 100644
--- a/src/qmail-newu.c
+++ b/src/qmail-newu.c
@@ -13,7 +13,11 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-newu"
diff --git a/src/qmail-pw2u.c b/src/qmail-pw2u.c
index b834301..1ed7568 100644
--- a/src/qmail-pw2u.c
+++ b/src/qmail-pw2u.c
@@ -16,10 +16,15 @@
#include "stralloc.h"
#include "auto_break.h"
-#include "auto_qmail.h"
-#include "auto_usera.h"
#include "control.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_usera.h"
+#endif
+
#define WHO "qmail-pw2u"
void die_chdir()
diff --git a/src/qmail-qmaint.c b/src/qmail-qmaint.c
index df789e4..9f6511b 100644
--- a/src/qmail-qmaint.c
+++ b/src/qmail-qmaint.c
@@ -19,12 +19,17 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
-#include "auto_split.h"
-#include "auto_uids.h"
#include "fmtqfn.h"
#include "readsubdir.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_split.h"
+ #include "auto_uids.h"
+#endif
+
#define WHO "qmail-qmaint"
stralloc queue_dir = {0}; /*the root queue dir with trailing slash*/
diff --git a/src/qmail-qmqpc.c b/src/qmail-qmqpc.c
index 3817489..7ee80d7 100644
--- a/src/qmail-qmqpc.c
+++ b/src/qmail-qmqpc.c
@@ -19,9 +19,14 @@
#include "timeoutconn.h"
#include "uint_t.h"
-#include "auto_qmail.h"
#include "control.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define PORT_QMQP 628
void die_success()
diff --git a/src/qmail-qmqpd.c b/src/qmail-qmqpd.c
index db71d61..7aa5e73 100644
--- a/src/qmail-qmqpd.c
+++ b/src/qmail-qmqpd.c
@@ -10,11 +10,16 @@
#include "sig.h"
#include "str.h"
-#include "auto_qmail.h"
#include "now.h"
#include "qmail.h"
#include "received.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define PORT_QMQP "628"
void resources()
diff --git a/src/qmail-qmtpd.c b/src/qmail-qmtpd.c
index 9cbc682..bb08fcc 100644
--- a/src/qmail-qmtpd.c
+++ b/src/qmail-qmtpd.c
@@ -12,13 +12,18 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "now.h"
#include "qmail.h"
#include "rcpthosts.h"
#include "received.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define PORT_QMTP "209"
#define PORT_QMTPS "6209"
diff --git a/src/qmail-qread.c b/src/qmail-qread.c
index 8fbc96f..a0925ad 100644
--- a/src/qmail-qread.c
+++ b/src/qmail-qread.c
@@ -10,12 +10,17 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "date822fmt.h"
#include "datetime.h"
#include "fmtqfn.h"
#include "readsubdir.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
readsubdir rs;
void die(int n)
diff --git a/src/qmail-queue.c b/src/qmail-queue.c
index 26807b2..fe75ffa 100644
--- a/src/qmail-queue.c
+++ b/src/qmail-queue.c
@@ -14,8 +14,6 @@
#include "sig.h"
#include "wait.h"
-#include "auto_qmail.h"
-#include "auto_uids.h"
#include "date822fmt.h"
#include "datetime.h"
#include "extra.h"
@@ -23,6 +21,13 @@
#include "now.h"
#include "triggerpull.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_uids.h"
+#endif
+
#define DEATH 86400 /* 24 hours; _must_ be below q-s's OSSIFIED (36 hours) */
#define ADDR 1003
diff --git a/src/qmail-recipients.c b/src/qmail-recipients.c
index 81230fe..2b5b88e 100644
--- a/src/qmail-recipients.c
+++ b/src/qmail-recipients.c
@@ -12,7 +12,11 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-recipients"
diff --git a/src/qmail-remote.c b/src/qmail-remote.c
index 85b2cbd..1227b81 100644
--- a/src/qmail-remote.c
+++ b/src/qmail-remote.c
@@ -25,7 +25,6 @@
#include "timeoutconn.h"
#include "uint_t.h"
-#include "auto_qmail.h"
#include "control.h"
#include "dns.h"
#include "hmac_md5.h"
@@ -39,6 +38,12 @@
#include "tls_timeoutio.h"
#include "ucspissl.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#ifdef IDN2
#include <idn2.h>
#endif
diff --git a/src/qmail-rspawn.c b/src/qmail-rspawn.c
index 4ef24e7..c4155bb 100644
--- a/src/qmail-rspawn.c
+++ b/src/qmail-rspawn.c
@@ -9,10 +9,15 @@
#include "pathexec.h"
#include "wait.h"
-#include "auto_qmail.h"
#include "ipalloc.h"
#include "tcpto.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
void initialize(int argc, char **argv)
{
tcpto_clean();
diff --git a/src/qmail-send.c b/src/qmail-send.c
index 13800f4..6b7a737 100644
--- a/src/qmail-send.c
+++ b/src/qmail-send.c
@@ -27,7 +27,6 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "fmtqfn.h"
#include "newfield.h"
@@ -40,6 +39,12 @@
#include "sendtodo.h"
#include "trigger.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
long lifetime = 604800;
long bouncemaxbytes = 0;
diff --git a/src/qmail-showctl.c b/src/qmail-showctl.c
index 38568f0..dd15845 100644
--- a/src/qmail-showctl.c
+++ b/src/qmail-showctl.c
@@ -11,14 +11,19 @@
#include "stralloc.h"
#include "auto_break.h"
-#include "auto_patrn.h"
-#include "auto_qmail.h"
-#include "auto_spawn.h"
-#include "auto_split.h"
-#include "auto_uids.h"
#include "control.h"
#include "spf.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_patrn.h"
+ #include "auto_qmail.h"
+ #include "auto_spawn.h"
+ #include "auto_split.h"
+ #include "auto_uids.h"
+#endif
+
stralloc me = {0};
int meok;
diff --git a/src/qmail-smtpam.c b/src/qmail-smtpam.c
index 75c0c65..46f47a0 100644
--- a/src/qmail-smtpam.c
+++ b/src/qmail-smtpam.c
@@ -23,7 +23,6 @@
#include "timeoutconn.h"
#include "uint_t.h"
-#include "auto_qmail.h"
#include "control.h"
#include "dns.h"
#include "ipalloc.h"
@@ -36,6 +35,12 @@
#include "tls_timeoutio.h"
#include "ucspissl.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define MAX_SIZE 200000000
#define HUGESMTPTEXT 5000
#define PORT_SMTP 25 // silly rabbit, /etc/services is for users
diff --git a/src/qmail-smtpd.c b/src/qmail-smtpd.c
index 63c7582..5e1497a 100644
--- a/src/qmail-smtpd.c
+++ b/src/qmail-smtpd.c
@@ -23,7 +23,6 @@
#include "timeout.h"
#include "wait.h"
-#include "auto_qmail.h"
#include "commands.h"
#include "control.h"
#include "dns.h"
@@ -39,6 +38,12 @@
#include "tls_start.h"
#include "wildmat.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
/** @file qmail-smtpd.c -- authenticating ESMTP/ESMTPS server
@brief requires sslserver or tcpserver */
diff --git a/src/qmail-start.c b/src/qmail-start.c
index 4ad250e..d6a90a8 100644
--- a/src/qmail-start.c
+++ b/src/qmail-start.c
@@ -5,7 +5,11 @@
#include "fd.h"
#include "prot.h"
-#include "auto_uids.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_uids.h"
+#endif
char *(qsargs[]) = {"qmail-send", 0};
char *(qcargs[]) = {"qmail-clean", 0};
diff --git a/src/qmail-tcpok.c b/src/qmail-tcpok.c
index db37274..8335952 100644
--- a/src/qmail-tcpok.c
+++ b/src/qmail-tcpok.c
@@ -6,7 +6,11 @@
#include "logmsg.h"
#include "open.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "qmail-tcpok"
diff --git a/src/qmail-tcpto.c b/src/qmail-tcpto.c
index 7383be1..632a5cd 100644
--- a/src/qmail-tcpto.c
+++ b/src/qmail-tcpto.c
@@ -13,10 +13,15 @@
#include "open.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "datetime.h"
#include "now.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "qmail-tcpto"
void die(n) int n;
diff --git a/src/qmail-todo.c b/src/qmail-todo.c
index 411f514..a26365d 100644
--- a/src/qmail-todo.c
+++ b/src/qmail-todo.c
@@ -19,7 +19,6 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "fmtqfn.h"
#include "now.h"
@@ -28,6 +27,12 @@
#include "sendtodo.h"
#include "trigger.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
stralloc percenthack = {0};
struct constmap mappercenthack;
stralloc locals = {0};
diff --git a/src/qmail-vmailuser.c b/src/qmail-vmailuser.c
index d9de43f..eeca889 100644
--- a/src/qmail-vmailuser.c
+++ b/src/qmail-vmailuser.c
@@ -13,10 +13,15 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "global.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define FDAUTH 3
#define RESPECT_CASE "-C"
#define BUFFER_SIZE 128
diff --git a/src/qmail.c b/src/qmail.c
index f344492..f681805 100644
--- a/src/qmail.c
+++ b/src/qmail.c
@@ -9,7 +9,11 @@
#include "readwrite.h"
#include "wait.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
static char *binqqargs[2] = {0, 0};
diff --git a/src/readsubdir.c b/src/readsubdir.c
index 72b83e6..8a57735 100644
--- a/src/readsubdir.c
+++ b/src/readsubdir.c
@@ -4,7 +4,11 @@
#include "scan.h"
#include "str.h"
-#include "auto_split.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_split.h"
+#endif
void readsubdir_init(readsubdir *rs, char *name, void (*pause)())
{
diff --git a/src/select.h1 b/src/select.h1
deleted file mode 100644
index 32d0968..0000000
--- a/src/select.h1
+++ /dev/null
@@ -1,8 +0,0 @@
-#ifndef SELECT_H
-#define SELECT_H
-
-#include <sys/types.h>
-#include <sys/time.h>
-extern int select();
-
-#endif
diff --git a/src/select.h2 b/src/select.h2
deleted file mode 100644
index c9bd274..0000000
--- a/src/select.h2
+++ /dev/null
@@ -1,13 +0,0 @@
-#ifndef SELECT_H
-#define SELECT_H
-
-#include <sys/types.h>
-#include <sys/time.h>
-#include <sys/select.h>
-#undef FD_SETSIZE
-#define FD_SETSIZE 1024U
-#undef __FD_SETSIZE
-#define __FD_SETSIZE 1024U
-extern int select();
-
-#endif
diff --git a/src/sendmail.c b/src/sendmail.c
index d3936fd..84385d9 100644
--- a/src/sendmail.c
+++ b/src/sendmail.c
@@ -8,7 +8,11 @@
#include "logmsg.h"
#include "str.h"
-#include "auto_qmail.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
#define WHO "sendmail"
diff --git a/src/spawn.c b/src/spawn.c
index 5315637..2ad7d13 100644
--- a/src/spawn.c
+++ b/src/spawn.c
@@ -15,9 +15,13 @@
#include "stralloc.h"
#include "wait.h"
-#include "auto_qmail.h"
-#include "auto_spawn.h"
-#include "auto_uids.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+ #include "auto_spawn.h"
+ #include "auto_uids.h"
+#endif
extern int truncreport;
extern int spawn();
diff --git a/src/srsforward.c b/src/srsforward.c
index 0477d90..1290a75 100644
--- a/src/srsforward.c
+++ b/src/srsforward.c
@@ -12,11 +12,16 @@
#include "str.h"
#include "stralloc.h"
-#include "auto_qmail.h"
#include "control.h"
#include "qmail.h"
#include "srs2.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "srsforward"
void die_nomem()
diff --git a/src/srsreverse.c b/src/srsreverse.c
index 6c87fb2..1f2e50d 100644
--- a/src/srsreverse.c
+++ b/src/srsreverse.c
@@ -14,11 +14,16 @@
#include "stralloc.h"
#include "auto_break.h"
-#include "auto_qmail.h"
#include "control.h"
#include "qmail.h"
#include "srs2.h"
+#ifdef USE_CONFIG
+ #include "fehsqm-config.h"
+#else
+ #include "auto_qmail.h"
+#endif
+
#define WHO "srsreverse"
void die_nomem()
diff --git a/src/trycpp.c b/src/trycpp.c
deleted file mode 100644
index 5fdf435..0000000
--- a/src/trycpp.c
+++ /dev/null
@@ -1,9 +0,0 @@
-int main()
-{
-#ifdef NeXT
- printf("nextstep\n");
- exit(0);
-#endif
- printf("unknown\n");
- exit(0);
-}
diff --git a/src/trycrypt.c b/src/trycrypt.c
deleted file mode 100644
index c32bd40..0000000
--- a/src/trycrypt.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
- ;
-}
diff --git a/src/trydnsresolv.c b/src/trydnsresolv.c
deleted file mode 100644
index c32bd40..0000000
--- a/src/trydnsresolv.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
- ;
-}
diff --git a/src/trydrent.c b/src/trydrent.c
deleted file mode 100644
index c1967e6..0000000
--- a/src/trydrent.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <dirent.h>
-#include <sys/types.h>
-
-void foo()
-{
- DIR *dir;
- struct dirent *d;
-}
diff --git a/src/tryflock.c b/src/tryflock.c
deleted file mode 100644
index e15acca..0000000
--- a/src/tryflock.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <fcntl.h>
-#include <sys/file.h>
-#include <sys/types.h>
-
-int main()
-{
- flock(0, LOCK_EX | LOCK_UN | LOCK_NB);
-}
diff --git a/src/tryidn2.c b/src/tryidn2.c
deleted file mode 100644
index f35850c..0000000
--- a/src/tryidn2.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include <idn2.h>
-
-int main()
-{
- ;
-}
diff --git a/src/trylsock.c b/src/trylsock.c
deleted file mode 100644
index c32bd40..0000000
--- a/src/trylsock.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
- ;
-}
diff --git a/src/trymkffo.c b/src/trymkffo.c
deleted file mode 100644
index 573c891..0000000
--- a/src/trymkffo.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sys/stat.h>
-#include <sys/types.h>
-
-int main()
-{
- mkfifo("temp-trymkffo", 0);
-}
diff --git a/src/trynpbg1.c b/src/trynpbg1.c
deleted file mode 100644
index da3e47e..0000000
--- a/src/trynpbg1.c
+++ /dev/null
@@ -1,25 +0,0 @@
-#include "fifo.h"
-#include "open.h"
-#include "select.h"
-
-#define FN "temp-trynpbg1.fifo"
-
-int main()
-{
- int flagbug;
- struct timeval instant;
- fd_set rfds;
-
- flagbug = 0;
- if (fifo_make(FN, 0600) != -1) {
- close(0);
- if (open_read(FN) == 0) {
- FD_ZERO(&rfds);
- FD_SET(0, &rfds);
- instant.tv_sec = instant.tv_usec = 0;
- if (select(1, &rfds, (fd_set *)0, (fd_set *)0, &instant) > 0) flagbug = 1;
- }
- unlink(FN);
- }
- _exit(!flagbug);
-}
diff --git a/src/tryqlibs.c b/src/tryqlibs.c
deleted file mode 100644
index 8cc108d..0000000
--- a/src/tryqlibs.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "stralloc.h"
-
-int main()
-{
- ;
-}
diff --git a/src/tryrsolv.c b/src/tryrsolv.c
deleted file mode 100644
index 4b7857d..0000000
--- a/src/tryrsolv.c
+++ /dev/null
@@ -1,6 +0,0 @@
-#include "dnsresolv.h"
-
-int main()
-{
- ;
-}
diff --git a/src/trysalen.c b/src/trysalen.c
deleted file mode 100644
index 05a0b13..0000000
--- a/src/trysalen.c
+++ /dev/null
@@ -1,11 +0,0 @@
-#include <sys/ioctl.h>
-#include <sys/param.h>
-#include <sys/socket.h>
-#include <sys/time.h>
-#include <sys/types.h>
-
-void foo()
-{
- struct sockaddr sa;
- sa.sa_len = 0;
-}
diff --git a/src/trysgact.c b/src/trysgact.c
deleted file mode 100644
index c9714ff..0000000
--- a/src/trysgact.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <signal.h>
-
-int main()
-{
- struct sigaction sa;
- sa.sa_handler = 0;
- sa.sa_flags = 0;
- sigemptyset(&sa.sa_mask);
- sigaction(0, &sa, (struct sigaction *)0);
-}
diff --git a/src/trysgprm.c b/src/trysgprm.c
deleted file mode 100644
index 7a2c6b6..0000000
--- a/src/trysgprm.c
+++ /dev/null
@@ -1,10 +0,0 @@
-#include <signal.h>
-
-int main()
-{
- sigset_t ss;
-
- sigemptyset(&ss);
- sigaddset(&ss, SIGCHLD);
- sigprocmask(SIG_SETMASK, &ss, (sigset_t *)0);
-}
diff --git a/src/tryshadow.c b/src/tryshadow.c
deleted file mode 100644
index fbce408..0000000
--- a/src/tryshadow.c
+++ /dev/null
@@ -1,4 +0,0 @@
-main()
-{
- ;
-}
diff --git a/src/tryshsgr.c b/src/tryshsgr.c
deleted file mode 100644
index ea1bf66..0000000
--- a/src/tryshsgr.c
+++ /dev/null
@@ -1,15 +0,0 @@
-int main()
-{
- short x[4];
-
- x[0] = x[1] = 1;
- if (getgroups(1, x) == 0)
- if (setgroups(1, x) == -1) _exit(1);
-
- if (getgroups(1, x) == -1) _exit(1);
- if (x[1] != 1) _exit(1);
- x[1] = 2;
- if (getgroups(1, x) == -1) _exit(1);
- if (x[1] != 2) _exit(1);
- _exit(0);
-}
diff --git a/src/tryslib.c b/src/tryslib.c
deleted file mode 100644
index c32bd40..0000000
--- a/src/tryslib.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
- ;
-}
diff --git a/src/tryspnam.c b/src/tryspnam.c
deleted file mode 100644
index 00060cf..0000000
--- a/src/tryspnam.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <shadow.h>
-
-int main()
-{
- struct spwd *spw;
-
- spw = getspnam("");
- puts(spw->sp_pwdp);
-}
diff --git a/src/trysysel.c b/src/trysysel.c
deleted file mode 100644
index e974364..0000000
--- a/src/trysysel.c
+++ /dev/null
@@ -1,13 +0,0 @@
-#include <sys/select.h> /* SVR4 silliness */
-#include <sys/time.h>
-#include <sys/types.h>
-
-#include <stdio.h>
-
-#include "select.h"
-
-int main()
-{
- printf("FD_SETSIZE:%d\n", FD_SETSIZE);
- return 0;
-}
diff --git a/src/trysyslog.c b/src/trysyslog.c
deleted file mode 100644
index 5408436..0000000
--- a/src/trysyslog.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <sys/time.h>
-#include <sys/types.h>
-#include <syslog.h>
-
-main()
-{
- openlog("foo", 0, LOG_MAIL);
- syslog(0, "foo");
-}
diff --git a/src/tryulong32.c b/src/tryulong32.c
deleted file mode 100644
index 43951e9..0000000
--- a/src/tryulong32.c
+++ /dev/null
@@ -1,39 +0,0 @@
-int main()
-{
- unsigned long u;
- u = 1;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- u += u;
- if (!u) _exit(0);
- _exit(1);
-}
diff --git a/src/tryuserpw.c b/src/tryuserpw.c
deleted file mode 100644
index a359d27..0000000
--- a/src/tryuserpw.c
+++ /dev/null
@@ -1,9 +0,0 @@
-#include <userpw.h>
-
-int main()
-{
- struct userpw *upw;
-
- upw = getuserpw("");
- puts(upw->upw_passwd);
-}
diff --git a/src/tryutmp.c b/src/tryutmp.c
deleted file mode 100644
index 7c8deb3..0000000
--- a/src/tryutmp.c
+++ /dev/null
@@ -1,8 +0,0 @@
-#include <utmp.h>
-
-#include <sys/types.h>
-
-int main()
-{
- ;
-}
diff --git a/src/tryvfork.c b/src/tryvfork.c
deleted file mode 100644
index b01d2f8..0000000
--- a/src/tryvfork.c
+++ /dev/null
@@ -1,4 +0,0 @@
-int main()
-{
- vfork();
-}
diff --git a/src/trywaitp.c b/src/trywaitp.c
deleted file mode 100644
index c6d50e8..0000000
--- a/src/trywaitp.c
+++ /dev/null
@@ -1,7 +0,0 @@
-#include <sys/types.h>
-#include <sys/wait.h>
-
-int main()
-{
- waitpid(0, 0, 0);
-}