* Thu Apr 25 2024 Jean-Philippe Pialasse <jpp@koozali.org> 11.0.0-8.sme
- add listening deamon on submission port 587 [SME: 6510] - move qpsmtpd daemons to full systemd supervision [SME: 12615] - separate configuration for the 3 qpsmtpd daemons [SME: 12451] increase default TLS version on u/sqpsmtpd as auth is required - increase Softlimit to 150M [SME: 12638] - remove old qmail templates [SME: 9492] template for /var/qmail/control/{badrcptto,badmailfrom,rcpthosts} also import template for config/badmailfrom from smeserver-wbl TODO organize peers content for u and s qpsmtpd TODO check if more config modules needs per service config
This commit is contained in:
53
root/sbin/e-smith/systemd/qpsmtpd-init
Executable file
53
root/sbin/e-smith/systemd/qpsmtpd-init
Executable file
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 1999-2005 Mitel Networks Corporation
|
||||
# Copyright (C) 2005-2006 Gordon Rowell <gordonr@gormand.com.au>
|
||||
# Copyright (C) 2013-2024 SME Server Koozali foundation
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#----------------------------------------------------------------------
|
||||
ServiceName=$1
|
||||
|
||||
export QPSMTPD_CONFIG=/var/service/$ServiceName/config
|
||||
|
||||
/sbin/e-smith/systemd/qpsmtpd-tcpsvd $ServiceName
|
||||
|
||||
#cleanup pre SME10
|
||||
[ -e /var/service/qpsmtpd/config/databytes ] && \
|
||||
rm -f /var/service/qpsmtpd/config/databytes
|
||||
[ -e /var/service/qpsmtpd/config/badrcptto_patterns ] && \
|
||||
rm -f /var/service/qpsmtpd/config/badrcptto_patterns
|
||||
|
||||
# Create dhparam
|
||||
[ -e /var/service/qpsmtpd/ssl/dhparam.pem ] || \
|
||||
RANDFILE=/dev/null /usr/bin/openssl dhparam -out /var/service/qpsmtpd/ssl/dhparam.pem 2048
|
||||
|
||||
# Create a default dkim key pair
|
||||
[ -e /home/e-smith/dkim_keys/default/private ] || (\
|
||||
RANDFILE=/dev/null /usr/bin/openssl genrsa -out /home/e-smith/dkim_keys/default/private 2048
|
||||
/usr/bin/openssl rsa -in /home/e-smith/dkim_keys/default/private \
|
||||
-out /home/e-smith/dkim_keys/default/public -pubout
|
||||
chown qpsmtpd:qpsmtpd /home/e-smith/dkim_keys/default/private
|
||||
chmod 400 /home/e-smith/dkim_keys/default/private
|
||||
)
|
||||
|
||||
# Init the DMARC report DB
|
||||
[ -s /var/lib/qpsmtpd/dmarc/reports.sqlite ] || (\
|
||||
SCHEMA=$(rpm -qd perl-Mail-DMARC | grep mail_dmarc_schema.sqlite)
|
||||
/usr/bin/sqlite3 /var/lib/qpsmtpd/dmarc/reports.sqlite < $SCHEMA
|
||||
chown qpsmtpd:qpsmtpd /var/lib/qpsmtpd/dmarc/reports.sqlite
|
||||
chmod 640 /var/lib/qpsmtpd/dmarc/reports.sqlite
|
||||
)
|
||||
|
27
root/sbin/e-smith/systemd/qpsmtpd-tcpsvd
Executable file
27
root/sbin/e-smith/systemd/qpsmtpd-tcpsvd
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/usr/bin/perl -w
|
||||
#----------------------------------------------------------------------
|
||||
# copyright (C) 2005 Mitel Networks Corporation
|
||||
# Copyright (C) 2006 Gordon Rowell <gordonr@gormand.com.au>
|
||||
# Copyright (C) 2024 Koozali Foundation Inc.
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#----------------------------------------------------------------------
|
||||
|
||||
use esmith::tcpsvd;
|
||||
my $ServiceName = shift || "qpsmtpd";
|
||||
esmith::tcpsvd::configure_peers($ServiceName);
|
||||
esmith::tcpsvd::configure_peers($ServiceName, "/var/service/$ServiceName/config/peers");
|
||||
|
||||
exit(0);
|
Reference in New Issue
Block a user