@ # 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/
$(DESTDIR)/$(ETCDIR)/$(APPN)
@ cp -a \
conf/dovecot \
- $(DESTDIR)/$(ETCDIR)/$(APPN)/
+ $(DESTDIR)/$(ETCDIR)/
@ cp -a \
certs/root-safe_CA.pem \
$(DESTDIR)/$(ETCDIR)/pki/$(APPN)/
$(APLV)/certs/
@ cp -a \
conf/*.conf \
- conf/dovecot \
+ dovecot \
$(APLV)/conf/
@ cp -a lib/{*.c,*.h} $(APLV)/lib/
@ cp -a linux/* $(APLV)/linux/
+++ /dev/null
-#LDAP Authentication
-
-passdb {
- driver = ldap
- args = /etc/mailleur/dovecot/dovecot-ldap.conf
-}
-
-userdb {
- driver = ldap
- args = /etc/mailleur/dovecot/dovecot-ldap.conf
-}
+++ /dev/null
-#SQL Authentication
-
-passdb {
- driver = sql
- args = /etc/mailleur/dovecot/dovecot-sql.conf
-}
-
-userdb {
- driver = sql
- args = /etc/mailleur/dovecot/dovecot-sql.conf
- }
+++ /dev/null
-# 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
-##
-#####################################################################
+++ /dev/null
-#-------------------------------------------------------
-#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
- }
-
-#--------------------------------------------------------------------------
+++ /dev/null
-#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/:::
+++ /dev/null
-webmaster@example.com:{plain}BigreA3::::
%{?!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@@
Requires : bash
Requires : bind-utils
Requires : cpp
-Requires : dovecot
+Requires : dovecot > 2.4.0
Requires : httpd
Requires : openssl
Requires : php-apache
%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
#-----------------------------------------------------------------------------
%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/*
#-----------------------------------------------------------------------------
#-----------------------------------------------------------------------------
%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/*
#-----------------------------------------------------------------------------
#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