]> SAFE projects GIT repository - jmp/mailleur/commitdiff
Improving configuration option
authorJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 18:43:05 +0000 (14:43 -0400)
committerJean-Marc Pigeon (Delson) <jmp@safe.ca>
Wed, 18 Jun 2025 18:43:05 +0000 (14:43 -0400)
conf/mailleur.conf
mailleur.spec.in
support/addconfig.sh [new file with mode: 0755]
support/starting.sh

index a6a451e56c9aaeee6d3993e55723f16ff16bbd3e..13ca6a5cbb4d735b1b202a6a31b86a4fd808c4e0 100644 (file)
@@ -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"
index 424921688678e78104599badd3b6c2cb53f14d8c..c89e11e514bf9086cbd65c2bf7f2948e39e959ae 100644 (file)
@@ -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 (executable)
index 0000000..6679ed0
--- /dev/null
@@ -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
index a90c1db4f3ce4f3ce0e5b3fc02c75f9c4b19c8a9..83004e7b285764ed075dca1bc71c79aa2b39566c 100755 (executable)
@@ -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    )