It is not possible to build Postfix on a Linux 6 system! Build-Error: ATTENTION: Unknown system type: Linux 6.0.5-200.fc36.x86_64 I tried to build a patch but it returns a different error: /usr/bin/strip: /home/builduser/rpmbuild/BUILDROOT/postfix-3.7.3-1.0.fc36.20221114.dk.sandybridge.x86_64/usr/libexec/postfix/lmtp[.interp]: file truncated Patch1: --- postfix-3.7.3/makedefs-orig 2022-01-23 21:53:41.000000000 +0100 +++ postfix-3.7.3/makedefs 2022-11-14 16:37:44.188079241 +0100 @@ -627,7 +627,7 @@ : ${SHLIB_ENV="LD_LIBRARY_PATH=`pwd`/lib"} : ${PLUGIN_LD="${CC-gcc} -shared"} ;; - Linux.[345].*) SYSTYPE=LINUX$RELEASE_MAJOR + Linux.[3456].*) SYSTYPE=LINUX$RELEASE_MAJOR case "$CCARGS" in *-DNO_DB*) ;; *-DHAS_DB*) ;; Patch2: --- postfix-3.7.3/src/util/sys_defs-original.h 2021-12-05 19:59:27.000000000 +0100 +++ postfix-3.7.3/src/util/sys_defs.h 2022-11-14 16:52:11.199899453 +0100 @@ -751,7 +751,7 @@ /* * LINUX. */ -#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) +#if defined(LINUX2) || defined(LINUX3) || defined(LINUX4) || defined(LINUX5) || defined(LINUX6) #define SUPPORTED #define UINT32_TYPE unsigned int #define UINT16_TYPE unsigned short SPEC-File: Version: 3.7.3 # command 'rpmbuild -bb postfix.spec --with production' will tune for current hardware while default stays 'sandybridge' %if %{?_with_production:1}%{!?_with_production:0} %global rpmsuffix native %global build_native_release 1 %global optflags $(sed "s/sandybridge/native/g" <<< "%{optflags}") %else %global rpmsuffix sandybridge %global build_native_release 0 %endif %define postfix_uid 89 %define postfix_user postfix %define postfix_gid 89 %define postfix_group postfix %define maildrop_group postdrop %define maildrop_gid 90 %define postfix_config_dir %{_sysconfdir}/postfix %define postfix_daemon_dir %{_libexecdir}/postfix %define postfix_command_dir %{_sbindir} %define postfix_queue_dir %{_var}/spool/postfix %define postfix_data_dir %{_var}/lib/postfix %define postfix_doc_dir %{_docdir}/%{name}-%{version} %define postfix_sample_dir %{postfix_doc_dir}/samples %define postfix_readme_dir %{postfix_doc_dir}/README_FILES %define pflogsumm_ver 1.1.5 Name: postfix Summary: Postfix Mail Transport Agent Release: 1.%{build_native_release}%{?dist}.%{rpmsuffix} Epoch: 2 Group: System Environment/Daemons URL: http://www.postfix.org License: IBM Requires: shadow-utils, systemd-units Requires(post): shadow-utils, systemd-units Requires(pre): shadow-utils, systemd-units Requires(preun): shadow-utils, systemd-units Requires(postun): shadow-utils, systemd-units Provides: MTA smtpd smtpdaemon server(smtp) Source0: ftp://ftp.porcupine.org/mirrors/postfix-release/official/%{name}-%{version}.tar.gz Source53: http://jimsun.linxnet.com/downloads/pflogsumm-%{pflogsumm_ver}.tar.gz Source101: postfix-pam.conf Source500: postfix.service Patch0: postfix-linux-6.patch Patch1: postfix-linux-sys-6.patch BuildRequires: pkgconfig, zlib-devel, mysql-devel, cyrus-sasl-devel, pcre-devel, openssl-devel, systemd-units, libdb-devel, perl-generators, pkgconfig, libicu-devel, libnsl2-devel, gcc, m4 Provides: postfix-perl-scripts Provides: postfix-pflogsumm = %{epoch}:%{version}-%{release} %description Postfix is a Mail Transport Agent, supporting SMTP AUTH and TLS %package manpages Summary: Postfix manuals Group: Applications/System %description manpages %prep %setup -q -n %{name}-%{version} %patch0 -p1 %patch1 -p1 gzip -dc %{SOURCE53} | tar xf - pushd pflogsumm-%{pflogsumm_ver} popd for f in README_FILES/TLS_{LEGACY_,}README TLS_ACKNOWLEDGEMENTS; do iconv -f iso8859-1 -t utf8 -o ${f}{_,} && touch -r ${f}{,_} && mv -f ${f}{_,} done %build CCARGS=-fPIC AUXLIBS= CCARGS="${CCARGS} -DHAS_PCRE -I%{_includedir}/pcre" AUXLIBS="${AUXLIBS} -lpcre" CCARGS="${CCARGS} -DHAS_MYSQL -I%{_includedir}/mysql" AUXLIBS="${AUXLIBS} -L%{_libdir}/mysql -lmysqlclient -lm" CCARGS="${CCARGS} -DUSE_SASL_AUTH -DUSE_CYRUS_SASL -I%{_includedir}/sasl" AUXLIBS="${AUXLIBS} -L%{_libdir}/sasl2 -lsasl2" CCARGS="${CCARGS} -DUSE_TLS -I/usr/include/openssl" AUXLIBS="${AUXLIBS} -lssl -lcrypto" CCARGS="${CCARGS} -DDEF_CONFIG_DIR=\\\"%{postfix_config_dir}\\\"" CCARGS="${CCARGS} $(getconf LFS_CFLAGS)" AUXLIBS="${AUXLIBS} -pie -Wl,-z,relro" %{__make} %{?_smp_mflags} -f Makefile.init makefiles CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %{__make} %{?_smp_mflags} CCARGS="${CCARGS}" AUXLIBS="${AUXLIBS}" DEBUG="" OPT="%{optflags} -Wno-comment" %install sh postfix-install -non-interactive install_root=%{buildroot} config_directory=%{postfix_config_dir} daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} queue_directory=%{postfix_queue_dir} data_directory=%{postfix_data_dir} sendmail_path=%{postfix_command_dir}/sendmail newaliases_path=%{_bindir}/newaliases mailq_path=%{_bindir}/mailq mail_owner=%{postfix_user} setgid_group=%{maildrop_group} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} || exit 1 install -c auxiliary/rmail/rmail %{buildroot}%{_bindir}/rmail for i in active bounce corrupt defer deferred flush incoming private saved maildrop public pid saved trace; do mkdir -p %{buildroot}%{postfix_queue_dir}/$i done mkdir -p %{buildroot}%{_sysconfdir}/pam.d install -m 644 %{SOURCE101} %{buildroot}%{_sysconfdir}/pam.d/smtp.postfix mkdir -p %{buildroot}%{postfix_doc_dir} mkdir -p %{buildroot}%{postfix_doc_dir}/examples{,/chroot-setup} cp -pr examples/{qmail-local,smtpd-policy} %{buildroot}%{postfix_doc_dir}/examples cp -p examples/chroot-setup/LINUX2 %{buildroot}%{postfix_doc_dir}/examples/chroot-setup mv %{buildroot}/etc/postfix/bounce.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/main.cf.default %{buildroot}%{postfix_doc_dir} mv %{buildroot}/etc/postfix/makedefs.out %{buildroot}%{postfix_doc_dir} rm -f %{buildroot}%{postfix_config_dir}/{TLS_,}LICENSE find %{buildroot}%{postfix_doc_dir} -type f | xargs chmod 644 find %{buildroot}%{postfix_doc_dir} -type d | xargs chmod 755 #move man folder to the correct folder mv %{buildroot}/usr/local/man/ %{buildroot}/usr/share/man/ #install plogsumm install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm-faq.txt %{buildroot}%{postfix_doc_dir}/pflogsumm-faq.txt install -c -m 644 pflogsumm-%{pflogsumm_ver}/pflogsumm.1 %{buildroot}%{_mandir}/man1/pflogsumm.1 install -c pflogsumm-%{pflogsumm_ver}/pflogsumm.pl %{buildroot}%{postfix_command_dir}/pflogsumm mantools/srctoman - auxiliary/qshape/qshape.pl > qshape.1 install -c qshape.1 %{buildroot}%{_mandir}/man1/qshape.1 install -c auxiliary/qshape/qshape.pl %{buildroot}%{postfix_command_dir}/qshape mkdir -p %{buildroot}/%{_unitdir}/ install -m 0644 %{SOURCE500} %{buildroot}/%{_unitdir}/ rm -f %{buildroot}%{postfix_config_dir}/aliases rm -f %{buildroot}%{_sysconfdir}/pam.d/smtp rm -f %{buildroot}%{_sysconfdir}/postfix/main.cf.proto rm -f %{buildroot}%{_sysconfdir}/postfix/master.cf.proto #move files to the correct folder mv %{buildroot}%{_sysconfdir}/postfix/main.cf %{buildroot}%{postfix_daemon_dir}/main.cf mv %{buildroot}%{_sysconfdir}/postfix/master.cf %{buildroot}%{postfix_daemon_dir}/master.cf mv %{buildroot}%{_sysconfdir}/postfix/postfix-files %{buildroot}%{postfix_daemon_dir}/postfix-files cat %{buildroot}%{postfix_daemon_dir}/postfix-files %post /usr/bin/systemctl --system daemon-reload 2> /dev/null > /dev/null %{_sbindir}/postfix set-permissions upgrade-configuration daemon_directory=%{postfix_daemon_dir} command_directory=%{postfix_command_dir} mail_owner=%{postfix_user} setgid_group=%{maildrop_group} manpage_directory=%{_mandir} sample_directory=%{postfix_sample_dir} readme_directory=%{postfix_readme_dir} &> /dev/null %{_bindir}/unlink /etc/alternatives/mta 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-aliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailq 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-mailqman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliases 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-newaliasesman 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-pam 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-rmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmail 2> /dev/null %{_bindir}/unlink /etc/alternatives/mta-sendmailman 2> /dev/null exit 0 %pre %{_sbindir}/groupadd -g %{maildrop_gid} -r %{maildrop_group} 2>/dev/null %{_sbindir}/groupadd -g %{postfix_gid} -r %{postfix_group} 2>/dev/null %{_sbindir}/groupadd -g 12 -r mail 2>/dev/null %{_sbindir}/useradd -d %{postfix_queue_dir} -s /sbin/nologin -g %{postfix_group} -G mail -M -r -u %{postfix_uid} %{postfix_user} 2>/dev/null %{postfix_user} 2> /dev/null exit 0 %preun if [ "$1" == 0 ]; then /usr/bin/systemctl --no-reload disable postfix.service 2> /dev/null > /dev/null /usr/bin/systemctl stop postfix.service 2> /dev/null > /dev/null fi exit 0 %files %defattr(-, root, root) %attr(0644, root, root) %{_unitdir}/postfix.service %dir %attr(0755, root, root) %{postfix_config_dir} %dir %attr(0755, root, root) %{postfix_daemon_dir} %dir %attr(0755, root, root) %{postfix_queue_dir} %dir %attr(0755, root, root) %{postfix_queue_dir}/pid %dir %attr(0700, %{postfix_user}, root) %{postfix_data_dir} %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/active %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/bounce %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/corrupt %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/defer %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/deferred %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/flush %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/hold %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/incoming %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/saved %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/trace %dir %attr(0730, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/maildrop %dir %attr(0710, %{postfix_user}, %{maildrop_group}) %{postfix_queue_dir}/public %dir %attr(0700, %{postfix_user}, root) %{postfix_queue_dir}/private %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postdrop %attr(2755, root, %{maildrop_group}) %{postfix_command_dir}/postqueue %attr(0755, root, root) %{postfix_command_dir}/sendmail %attr(0755, root, root) %{postfix_command_dir}/postalias %attr(0755, root, root) %{postfix_command_dir}/postcat %attr(0755, root, root) %{postfix_command_dir}/postconf %attr(0755, root, root) %{postfix_command_dir}/postfix %attr(0755, root, root) %{postfix_command_dir}/postkick %attr(0755, root, root) %{postfix_command_dir}/postlock %attr(0755, root, root) %{postfix_command_dir}/postlog %attr(0755, root, root) %{postfix_command_dir}/postmap %attr(0755, root, root) %{postfix_command_dir}/postmulti %attr(0755, root, root) %{postfix_command_dir}/postsuper %attr(0755, root, root) %{postfix_command_dir}/qshape %attr(0755, root, root) %{postfix_command_dir}/pflogsumm %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/access %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/canonical %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/generic %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/header_checks %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/relocated %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/transport %attr(0644, root, root) %config(noreplace) %{postfix_config_dir}/virtual %attr(0755, root, root) %{postfix_daemon_dir}/[^mp]* %attr(0644, root, root) %{postfix_daemon_dir}/main.cf %attr(0644, root, root) %{postfix_daemon_dir}/master.cf %attr(0755, root, root) %{postfix_daemon_dir}/master %attr(0755, root, root) %{postfix_daemon_dir}/pickup %attr(0755, root, root) %{postfix_daemon_dir}/pipe %attr(0755, root, root) %{postfix_daemon_dir}/post-install %attr(0644, root, root) %{postfix_daemon_dir}/postfix-files %attr(0755, root, root) %{postfix_daemon_dir}/postfix-script %attr(0755, root, root) %{postfix_daemon_dir}/postfix-wrapper %attr(0755, root, root) %{postfix_daemon_dir}/postmulti-script %attr(0755, root, root) %{postfix_daemon_dir}/postscreen %attr(0755, root, root) %{postfix_daemon_dir}/proxymap %attr(0755, root, root) %{postfix_daemon_dir}/postfix-tls-script %attr(0755, root, root) %{_bindir}/mailq %attr(0755, root, root) %{_bindir}/newaliases %attr(0755, root, root) %{_bindir}/rmail %config(noreplace) %{_sysconfdir}/pam.d/smtp.postfix /usr/libexec/postfix/postlogd %files manpages %defattr(-, root, root) %{postfix_doc_dir} %attr(0644, root, root) %{_mandir}/man1/* %attr(0644, root, root) %{_mandir}/man5/* %attr(0644, root, root) %{_mandir}/man8/*