From 8f33a461473ea55d319b8c31599c7e6aca59f533 Mon Sep 17 00:00:00 2001 From: Jean-Marc Pigeon Date: Thu, 13 Nov 2025 15:05:12 -0500 Subject: [PATCH] Improved installation procedure at starting --- Makefile | 3 +- Makefile.dist | 2 +- conf/dovecot/dovecot-2.0-auth-ldap.conf | 11 -- conf/dovecot/dovecot-2.0-auth-sql.conf | 11 -- conf/dovecot/dovecot-2.0.conf | 143 ------------------------ conf/dovecot/dovecot.conf | 78 ------------- conf/dovecot/passfile | 4 - dovecot/mailleur.passwd | 1 - mailleur.spec.in | 15 ++- support/do_database.sh | 6 - 10 files changed, 12 insertions(+), 262 deletions(-) delete mode 100644 conf/dovecot/dovecot-2.0-auth-ldap.conf delete mode 100644 conf/dovecot/dovecot-2.0-auth-sql.conf delete mode 100644 conf/dovecot/dovecot-2.0.conf delete mode 100644 conf/dovecot/dovecot.conf delete mode 100644 conf/dovecot/passfile delete mode 100644 dovecot/mailleur.passwd diff --git a/Makefile b/Makefile index 6264120..e69aa33 100644 --- a/Makefile +++ b/Makefile @@ -215,7 +215,6 @@ install : @ # Creating all needed system directory @ install -d $(DESTDIR)/$(DATADIR)/$(APPN)/ @ install -d $(DESTDIR)/$(ETCDIR)/$(APPN)/ - @ install -d $(DESTDIR)/$(ETCDIR)/$(APPN)/dovecot @ install -d $(DESTDIR)/$(ETCDIR)/pki/$(APPN)/ @ install -d $(DESTDIR)/$(ETCDIR)/sysconfig/ @ install -d $(DESTDIR)/$(ETCDIR)/httpd/conf.d/ @@ -236,7 +235,7 @@ install : $(DESTDIR)/$(ETCDIR)/$(APPN) @ cp -a \ conf/dovecot \ - $(DESTDIR)/$(ETCDIR)/$(APPN)/ + $(DESTDIR)/$(ETCDIR)/ @ cp -a \ certs/root-safe_CA.pem \ $(DESTDIR)/$(ETCDIR)/pki/$(APPN)/ diff --git a/Makefile.dist b/Makefile.dist index 3fb9193..b362035 100644 --- a/Makefile.dist +++ b/Makefile.dist @@ -49,7 +49,7 @@ tarfile : clean $(APLV)/certs/ @ cp -a \ conf/*.conf \ - conf/dovecot \ + dovecot \ $(APLV)/conf/ @ cp -a lib/{*.c,*.h} $(APLV)/lib/ @ cp -a linux/* $(APLV)/linux/ diff --git a/conf/dovecot/dovecot-2.0-auth-ldap.conf b/conf/dovecot/dovecot-2.0-auth-ldap.conf deleted file mode 100644 index c63a1ff..0000000 --- a/conf/dovecot/dovecot-2.0-auth-ldap.conf +++ /dev/null @@ -1,11 +0,0 @@ -#LDAP Authentication - -passdb { - driver = ldap - args = /etc/mailleur/dovecot/dovecot-ldap.conf -} - -userdb { - driver = ldap - args = /etc/mailleur/dovecot/dovecot-ldap.conf -} diff --git a/conf/dovecot/dovecot-2.0-auth-sql.conf b/conf/dovecot/dovecot-2.0-auth-sql.conf deleted file mode 100644 index 5d7a762..0000000 --- a/conf/dovecot/dovecot-2.0-auth-sql.conf +++ /dev/null @@ -1,11 +0,0 @@ -#SQL Authentication - -passdb { - driver = sql - args = /etc/mailleur/dovecot/dovecot-sql.conf -} - -userdb { - driver = sql - args = /etc/mailleur/dovecot/dovecot-sql.conf - } diff --git a/conf/dovecot/dovecot-2.0.conf b/conf/dovecot/dovecot-2.0.conf deleted file mode 100644 index 83b387e..0000000 --- a/conf/dovecot/dovecot-2.0.conf +++ /dev/null @@ -1,143 +0,0 @@ -# JMP Jul 25 2011 for dovecot 2.0 -##################################################################### -#User lower limit (at least user email) -first_valid_uid=5 -first_valid_gid=12 - -#-------------------------------------------------------------------- -#Working user id -mail_uid=mailleur -mail_gid=mail - -#-------------------------------------------------------------------- -#debug level -mail_debug = no -auth_debug = no -auth_verbose = no -auth_debug_passwords = no -log_path = /var/log/dovecot.log - -#-------------------------------------------------------------------- -#Certificate localisation -ssl_cert= 2.4.0 Requires : httpd Requires : openssl Requires : php-apache @@ -56,10 +56,9 @@ search about email exchange within time and transaction context. %attr(0644,%{name},mail) %config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf %attr(0644,%{name},mail) %config(noreplace) %{_sysconfdir}/%{name}/blacklister.conf %attr(0644,%{name},mail) %config(noreplace) %{_sysconfdir}/%{name}/relayed.conf +#dovecot SQL database access +%attr(0644,%{name},mail) %config(noreplace) %{dovedir}/80-%{name}-usesql.conf # -%attr(0644,root,root) %config(noreplace) %{dovedir}/dovecot.conf -%{dovedir}/dovecot-2.0* -%attr(0640,%{name},dovecot) %config(noreplace) %{dovedir}/passfile %{_libexecdir}/%{name}/bin-utils/chkspf %{_libexecdir}/%{name}/bin-utils/feeder %{_libdir}/%{name}/rpm_build_date @@ -213,6 +212,9 @@ Obsoletes : %{name}-mysql <= %{version}-%{release} #----------------------------------------------------------------------------- %files postgresql %defattr(-,root,root,-) +#dovecot SQL database access +%attr(0644,%{name},mail) %config(noreplace) %{dovedir}/70-%{name}-pgsql.conf +#library to access postgres %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-posql/* #----------------------------------------------------------------------------- @@ -284,6 +286,9 @@ Obsoletes : %{name}-postgresql <= %{version}-%{release} #----------------------------------------------------------------------------- %files mysql %defattr(-,root,root,-) +#dovecot SQL database access +%attr(0644,%{name},mail) %config(noreplace) %{dovedir}/70-%{name}-mysql.conf +#library to access mariadb %attr(0755,%{name},mail) %{_libexecdir}/%{name}/bin-mysql/* #----------------------------------------------------------------------------- diff --git a/support/do_database.sh b/support/do_database.sh index 7bbde2d..aa12372 100755 --- a/support/do_database.sh +++ b/support/do_database.sh @@ -98,10 +98,4 @@ case "$DB_TYPE" in #loading database definition if [ -n "$MSQL" ] ; then cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/$APPNAME.sql | $MSQL - DIST=`/usr/sbin/receiver -v | cut -d '-' -f2` - #is this de developpement version? - if [ "$DIST" = "dvl" ] ; then - # set a minimal test database - cpp -P -D$DB_TYPE /usr/share/$APPNAME/sql/datatest.sql | $MSQL - fi fi -- 2.47.3