]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improved installation procedure at starting
authorJean-Marc Pigeon <jmp@safe.c>
Thu, 13 Nov 2025 20:05:12 +0000 (15:05 -0500)
committerJean-Marc Pigeon <jmp@safe.c>
Thu, 13 Nov 2025 20:05:12 +0000 (15:05 -0500)
Makefile
Makefile.dist
conf/dovecot/dovecot-2.0-auth-ldap.conf [deleted file]
conf/dovecot/dovecot-2.0-auth-sql.conf [deleted file]
conf/dovecot/dovecot-2.0.conf [deleted file]
conf/dovecot/dovecot.conf [deleted file]
conf/dovecot/passfile [deleted file]
dovecot/mailleur.passwd [deleted file]
mailleur.spec.in
support/do_database.sh

index 6264120a575b871a4b168907c838db109430fcdc..e69aa33bac4172793e74474f3028a8874e220763 100644 (file)
--- 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)/
index 3fb9193d10eaf62ae7fed9bdb80802e9ab221fe4..b362035c92e3837f08dcc72daf7341b954d5e795 100644 (file)
@@ -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 (file)
index c63a1ff..0000000
+++ /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 (file)
index 5d7a762..0000000
+++ /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 (file)
index 83b387e..0000000
+++ /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=</etc/ssl/private/local_cert
-ssl_key=</etc/ssl/private/local_cert
-ssl_dh = </etc/ssl/private/local_dh
-
-protocols = imap pop3 sieve
-
-#to delay scanner site
-auth_failure_delay = 4 s
-
-#locking mode
-mbox_write_locks = fcntl
-
-#quota
-mail_plugins = quota
-
-#to allow email address with quote within dovecot
-auth_username_chars = abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890.-_@'
-
-#####################################################################  
-##
-## IMAP specific settings
-##
-#####################################################################  
-service imap-login {
-  process_min_avail = 3
-  service_count = 1
-}
-
-service dict {
-  unix_listener dict {
-    mode = 0600
-    user = mailleur
-    group = mail
-  }
-}
-
-service imap {
-  executable = /usr/libexec/dovecot/imap
-  #mail_executable = /usr/bin/pibsmtp /usr/libexec/dovecot/imap
-}
-
-protocol imap {
-       mail_plugins = $mail_plugins quota imap_quota
-        imap_client_workarounds = 
-       }
-
-#####################################################################  
-##
-## POP3 specific settings
-##
-#####################################################################  
-service pop3-login {
-  process_min_avail = 3
-  service_count = 1
-}
-
-service pop3 {
-  executable = /usr/libexec/dovecot/pop3
-  #executable = /usr/bin/pibsmtp /usr/libexec/dovecot/pop3
-}
-
-protocol pop3 {
-       pop3_uidl_format = %08Xu%08Xv
-       pop3_client_workarounds = outlook-no-nuls oe-ns-eoh
-       }
-
-service auth {
-  unix_listener auth-master {
-    mode = 0600
-    user = mailleur
-  }
-  unix_listener auth-userdb {
-    mode = 0600
-    user = mailleur
-  }
-}
-
-#####################################################################  
-##
-## Sieve
-##
-#####################################################################  
-protocol lda {
-       postmaster_address =  postmaster
-       mail_plugins = sieve quota
-       # remember to give proper permissions for those files as well
-       log_path = /var/log/dovecot.log
-       info_log_path = /var/log/dovecot.log
-       }
-
-protocol sieve {
-       mail_debug=yes
-       }
-
-plugin {
-       #Sieve Part
-       sieve = ~/.dovecot.sieve
-       sieve_dir=~/sieve
-        #folder part
-        autocreate = Trash
-        autosubscribe = Trash
-        autocreate2 = Spam
-        autosubscribe2 = Spam
-       #Quota Part under mailleur SQL
-       quota = dict:User quota::proxy::sqlquota
-       #Default value.
-        quota_rule = *:storage=5G:messages=0
-        #10% of Storage
-        quota_rule2 = Trash:storage=+100%%
-        # 20% of storage
-        quota_rule3 = Spam:storage=+20%%
-       }
-
-dict    {
-        sqlquota=dbsql:/etc/mailleur/dovecot/dovecot-dict-sql.conf.ext
-        }
-
-#####################################################################  
-##
-## User authentication
-##
-#####################################################################  
diff --git a/conf/dovecot/dovecot.conf b/conf/dovecot/dovecot.conf
deleted file mode 100644 (file)
index c1b177e..0000000
+++ /dev/null
@@ -1,78 +0,0 @@
-#-------------------------------------------------------
-#Dovecot configuration to work with mailleur
-#You will definitely want to read the official documentation
-#at http://wiki2.dovecot.org/ if you plan to use Dovecot in
-#full production environment
-#-------------------------------------------------------
-#user lower limit (at least user email)
-first_valid_uid=5
-first_valid_gid=12
-
-#--------------------------------------------------------------------------
-#debug level
-auth_debug = yes
-auth_debug_passwords = yes
-auth_mechanisms = plain login digest-md5
-auth_verbose = yes
-auth_verbose_passwords = plain
-mail_uid = mailleur
-mail_debug = yes
-log_path=/var/log/dovecot.log
-
-#--------------------------------------------------------------------------
-#service setting
-#available services
-protocols=imap pop3
-#SSL parameters
-ssl=yes
-disable_plaintext_auth=yes
-ssl_cert=</etc/ssl/private/local_cert
-ssl_key=</etc/ssl/private/local_cert
-ssl_dh = </etc/ssl/private/local_dh
-
-# The next line is only needed if you have no IPv6 network interfaces
-listen=*
-
-service imap-login     {
-       process_min_avail = 3
-       service_count = 1
-       }
-
-service pop3-login     {
-       process_min_avail = 3
-       service_count = 1
-       }
-
-#--------------------------------------------------------------------------
-#email repository
-mail_location=maildir:/var/spool/mailleur/mails/%d/%n
-#Cautions THIS realm value is HARDCODED within code AND database
-auth_realms = mailleur-email
-
-#--------------------------------------------------------------------------
-#email authentication
-#
-#to delay scanner site
-auth_failure_delay=4s
-
-passdb digest {
-        driver = sql
-        args = /etc/mailleur/dovecot/dovecot-digest-sql.conf
-        }
-
-userdb digest {
-        driver = sql
-        args = /etc/mailleur/dovecot/dovecot-digest-sql.conf
-        }
-
-passdb plain {
-        driver = sql
-        args = /etc/mailleur/dovecot/dovecot-plain-sql.conf
-        }
-
-userdb plain {
-        driver = sql
-        args = /etc/mailleur/dovecot/dovecot-plain-sql.conf
-        }
-
-#--------------------------------------------------------------------------
diff --git a/conf/dovecot/passfile b/conf/dovecot/passfile
deleted file mode 100644 (file)
index 74fa0d4..0000000
+++ /dev/null
@@ -1,4 +0,0 @@
-#This file is an EXAMPLE to be use with dovecot to access email
-#encrypted passwd is 'mailleur' via openssl passwd
-user1@mailleur.example.com:$1$mGzKO7Ar$hgHvgIOIHKtpTnqoSMSla/:::
-user2@mailleur.example.com:$1$mGzKO7Ar$hgHvgIOIHKtpTnqoSMSla/:::
diff --git a/dovecot/mailleur.passwd b/dovecot/mailleur.passwd
deleted file mode 100644 (file)
index 5c65401..0000000
+++ /dev/null
@@ -1 +0,0 @@
-webmaster@example.com:{plain}BigreA3::::
index f8b2265674d9a267616c5a751d0272c5e107927c..a02c459741c1eaa006f319b87a87e078f8b5bcdf 100644 (file)
@@ -2,7 +2,7 @@
 %{?!dist:       %define dist    @@DIST@@}
 %define         spooldir        %{_localstatedir}/spool/
 %define         wwwdir         %{_localstatedir}/www/
-%define                dovedir         %{_sysconfdir}/%{name}/dovecot
+%define                dovedir         %{_sysconfdir}/dovecot/conf.d
 #-----------------------------------------------------------------------------
 Name           :       @@APPN@@
 Version                :       @@VERSION@@
@@ -24,7 +24,7 @@ BuildRequires :       postgresql-server-devel
 Requires       :       bash
 Requires       :       bind-utils
 Requires       :       cpp
-Requires       :       dovecot
+Requires       :       dovecot         >  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/*
 
 #-----------------------------------------------------------------------------
index 7bbde2d2e96d1e8f6af408060795d73e882b46dd..aa123722468c03d30f40f108064050fafae1a05c 100755 (executable)
@@ -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