[pve-devel] [PATCH dab 5/7] Add new `[--mta <postfix|exim|none>]` flag; Deprecate --exim.
Luke Harding
luke at lukeh990.io
Tue Nov 18 23:01:20 CET 2025
Signed-off-by: Luke Harding <luke at lukeh990.io>
---
PVE/DAB.pm | 10 ++++++++--
dab | 6 ++++--
2 files changed, 12 insertions(+), 4 deletions(-)
diff --git a/PVE/DAB.pm b/PVE/DAB.pm
index 8b93c1b..f42b937 100644
--- a/PVE/DAB.pm
+++ b/PVE/DAB.pm
@@ -1322,9 +1322,15 @@ sub bootstrap {
@{ $important } = grep { !$remove{$_} } @{ $important };
}
- my $mta = $opts->{exim} ? 'exim' : 'postfix';
+ my $mta = $opts->{mta} ? $opts->{mta} : "postfix";
+
+ # Maintain compatibility with `--exim` flag
+ if ($opts->{exim}) {
+ $mta = "exim";
+ }
+
if ($mta eq 'postfix') {
- push @$important, "postfix";
+ push @$important, "postfix";
}
if ($opts->{include}) {
diff --git a/dab b/dab
index 3a4c017..9a010c0 100755
--- a/dab
+++ b/dab
@@ -11,7 +11,8 @@ $ENV{'LC_ALL'} = 'C';
my $commands = {
'init' => '',
- 'bootstrap' => '[--exim] [--include <a[,b..]]>] --exclude [<a[,b..]]>] [--minimal] [--device-skelleton] [--no-ssh]',
+ 'bootstrap' => '[--mta <postfix|exim|none>] [--exim (deprecated)] [--include <a[,b..]]>]'
+ . '[--exclude [<a[,b..]]>] [--minimal] [--device-skelleton] [--no-ssh]',
'finalize' => '[--keepmycnf] [--compressor <gz[ip] (default)|zst[d]|zstd-max>]',
'veid' => '',
'basedir' => '',
@@ -84,7 +85,8 @@ eval {
} elsif ($cmd eq 'bootstrap') {
my $opts = {};
- if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s', 'exclude=s', 'no-ssh')) {
+ if (!GetOptions ($opts, 'exim', 'minimal', 'device-skelleton', 'include=s',
+ 'exclude=s', 'no-ssh', 'mta=s')) {
fatal_usage();
}
die "command 'bootstrap' expects no arguments.\n" if scalar (@ARGV) != 0;
--
2.52.0
More information about the pve-devel
mailing list