* Sun Dec 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-4.sme

- add mini-qmail as Message delivery agent  [SME: 12737]
  few other fixes
  TODO  migrate old qmail properties and change in template
  TODO catch all non existing recipient / check BCC working
This commit is contained in:
Jean-Philippe Pialasse 2024-12-15 16:10:49 -05:00
parent f2b33f4260
commit 0cec86dcb7
11 changed files with 49 additions and 9 deletions

View File

@ -0,0 +1 @@
compatibility_level=2

View File

@ -0,0 +1,22 @@
# qmail local delivery{
## alternatively we could set a db with per user delivery
# mailbox_command_maps = hash:/etc/postfix/mailbox_commands
## in /etc/postfix/mailbox_commands
# # These users need qmail-local delivery.
# johndoe /usr/local/libexec/postqmail-local
# janedoe /usr/local/libexec/postqmail-local
###########################################
# alternatively we could ask dovecot to handle the delivery
#mailbox_command = /usr/libexec/dovecot/dovecot-lda -f "$SENDER" -a "$RECIPIENT" -d "$USER"
# then sieve rules are needed
# maildrop or procmail could do to ....
}
prepend_delivered_header = file, forward
mailbox_command = /usr/bin/postqmail-local
# qmail needs to forward to qmqpd
qmqpd_authorized_clients = 127.0.0.1

View File

@ -1,5 +1,3 @@
#2525 inet n - n - - smtpd
# :25 is in use by qpsmtpd
#smtp inet n - n - - smtpd #smtp inet n - n - - smtpd
#smtp inet n - n - 1 postscreen #smtp inet n - n - 1 postscreen
#smtpd pass - - n - - smtpd #smtpd pass - - n - - smtpd

View File

@ -0,0 +1 @@
628 inet n - n - - qmqpd

View File

@ -1,4 +1,3 @@
#628 inet n - n - - qmqpd
pickup unix n - n 60 1 pickup pickup unix n - n 60 1 pickup
cleanup unix n - n - 0 cleanup cleanup unix n - n - 0 cleanup
qmgr unix n - n 300 1 qmgr qmgr unix n - n 300 1 qmgr

View File

@ -0,0 +1,4 @@
# qmail need to test for virtual boxes
qmail-local unix - n n - - pipe
user=$USER argv=/usr/bin/sudo -u $user -H /usr/bin/postqmail-local ${mailbox} ${extension} ${nexthop} ${sender}

View File

@ -7,7 +7,7 @@ dotqm=${DOTQMAIL:-.qmail}
DQHOME=${DQHOME:-$HOME} DQHOME=${DQHOME:-$HOME}
cd $DQHOME cd $DQHOME
DEFAULTSPOOL=./Maildir/ DEFAULTSPOOL=./Maildir/
PATH=${PATH}:/usr/sbin:/usr/lib; export PATH PATH=${PATH}:/usr/sbin:/usr/lib:/var/qmail/bin; export PATH
if [ -s $DQHOME/.dotqmailexts ]; then if [ -s $DQHOME/.dotqmailexts ]; then
while IFS=: read ext home; do while IFS=: read ext home; do
home=${home/\~\//$HOME/} home=${home/\~\//$HOME/}

View File

@ -5,9 +5,8 @@
# $3 = $DOMAIN # $3 = $DOMAIN
# $4 = $SENDER # $4 = $SENDER
export PATH=$PATH:/usr/local/bin:/var/qmail/bin export PATH=$PATH:/usr/local/bin:/var/qmail/bin
tail +2 | seekablepipe qmail-local -- \ tail -n +2 | /usr/local/bin/seekablepipe qmail-local -- \
"$USER" "$HOME" "$LOCAL" "${EXTENSION:+-}" "$EXTENSION" "$USER" "$HOME" "$LOCAL" "${EXTENSION:+-}" "$EXTENSION" "$DOMAIN" "$SENDER" ./Maildir/
"$DOMAIN""$SENDER" ./Maildir/
e=$? e=$?
(($e == 111)) && exit 75 (($e == 111)) && exit 75
(($e == 100)) && exit 77 (($e == 100)) && exit 77

View File

@ -1,6 +1,8 @@
[Service] [Service]
ExecStartPre=-/usr/sbin/postmap /etc/postfix/virtual
ExecStartPre=/sbin/e-smith/service-status postfix ExecStartPre=/sbin/e-smith/service-status postfix
ExecStartPre=/sbin/e-smith/systemd/postfix-pre
ExecReload=
ExecReload=/sbin/e-smith/systemd/postfix-reload
[Install] [Install]
WantedBy=sme-server.target WantedBy=sme-server.target

View File

@ -0,0 +1,7 @@
#!/bin/sh
set -e
tmp=/var/tmp/seekable.$$
exec 3<&0 4<&1 >$tmp <$tmp
rm $tmp
cat <&3
exec ${1+"$@"} 1<&4 3>&- 4>&-

View File

@ -1,6 +1,6 @@
%define name smeserver-postfix %define name smeserver-postfix
%define version 1.0 %define version 1.0
%define release 3 %define release 4
Summary: This is what smeserver-postfix does. Summary: This is what smeserver-postfix does.
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
@ -17,12 +17,19 @@ Requires: postfix
Requires: postfix-perl-scripts Requires: postfix-perl-scripts
Requires: postfix-pcre Requires: postfix-pcre
Requires: zsh Requires: zsh
Requires: smeserver-mini-qmail
AutoReqProv: no AutoReqProv: no
%description %description
Koozali SME Server wrapper to configure postfix Koozali SME Server wrapper to configure postfix
%changelog %changelog
* Sun Dec 15 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-4.sme
- add mini-qmail as Message delivery agent [SME: 12737]
few other fixes
TODO migrate old qmail properties and change in template
TODO catch all non existing recipient / check BCC working
* Tue Nov 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-3.sme * Tue Nov 19 2024 Jean-Philippe Pialasse <jpp@koozali.org> 1.0-3.sme
- add requirements [SME: 12737] - add requirements [SME: 12737]
- add conf-postfix - add conf-postfix