From 6c4b93fd812eeb81c160ef62b7039d594fb6713b Mon Sep 17 00:00:00 2001 From: "Jean-Marc Pigeon (Delson)" Date: Wed, 18 Jun 2025 14:43:05 -0400 Subject: [PATCH] Improving configuration option --- conf/mailleur.conf | 8 +++++--- mailleur.spec.in | 3 ++- support/addconfig.sh | 10 ++++++++++ support/starting.sh | 1 + 4 files changed, 18 insertions(+), 4 deletions(-) create mode 100755 support/addconfig.sh diff --git a/conf/mailleur.conf b/conf/mailleur.conf index a6a451e..13ca6a5 100644 --- a/conf/mailleur.conf +++ b/conf/mailleur.conf @@ -8,15 +8,17 @@ #:ipnum::: -> smtp:ipnum:25:2 #::,smtps::465:2 -> smtp:0.0.0.0:25:2 + smtps::465:2 #:: -> smtp:0.0.0.0:25:2 -#SMTPPORTS="::" +#Examples #SMTPPORTS=":127.127.10.25:1025:,smtps:127.127.10.25:1026:1" -SMTPPORTS=":127.127.10.25:1025:" +#SMTPPORTS=":127.127.10.25:1025:" #SMTPPORTS="smtps:127.127.10.25:1065:1" +#Defaults +SMTPPORTS=":::5,smtps::465:3,smtp::587:2" #------------------------------------------------ #Defining application name APPNAME=mailleur #defining default domain -DFLTDOMAIN="example.com" +DFLTDOMAIN="localdomain" #------------------------------------------------ #Defining SERVER mode Certificate data CA_ROOT_SRV="./certs/root-safe_CA.pem" diff --git a/mailleur.spec.in b/mailleur.spec.in index 4249216..c89e11e 100644 --- a/mailleur.spec.in +++ b/mailleur.spec.in @@ -38,8 +38,9 @@ search about email exchange within time and transaction context. %attr(0755,%{name},mail) %{_sbindir}/sender %attr(0755,%{name},mail) %{_sbindir}/sorter %attr(0754,root,root) %{_libdir}/%{name}/shell/*.sh -%attr(0754,root,root) %{_libdir}/%{name}/support/starting.sh +%attr(0754,root,root) %{_libdir}/%{name}/support/addconfig.sh %attr(0754,root,root) %{_libdir}/%{name}/support/crdb.sh +%attr(0754,root,root) %{_libdir}/%{name}/support/starting.sh %attr(0755,%{name},mail) %dir %{spooldir}/%{name}/{queue,in.log,out.log} #----------------------------------------------------------------------------- diff --git a/support/addconfig.sh b/support/addconfig.sh new file mode 100755 index 0000000..6679ed0 --- /dev/null +++ b/support/addconfig.sh @@ -0,0 +1,10 @@ +! /usr/bin/bash +#----------------------------------------------------------------- +#Shell script to add local information to configuration file +#----------------------------------------------------------------- +#loading the variable value +LOCDOM=`dnsdomainname` + +sed -i \ + -e "s/DFLTDOM=.*$/DFLTDOMAIN=$LOCDOM/" \ + /etc/$APPNAME/$APPNAME.conf diff --git a/support/starting.sh b/support/starting.sh index a90c1db..83004e7 100755 --- a/support/starting.sh +++ b/support/starting.sh @@ -73,6 +73,7 @@ do_mkconf() { if [ ! -f /etc/$APPNAME/config.done ] ; then + /usr/lib/$APPNAME/support/addconfig.sh do_mkdb ; case "$OS" in osukiss ) -- 2.47.3