File: mailman3-api

package info (click to toggle)
mailman3 3.3.10-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 13,256 kB
  • sloc: python: 52,636; sh: 319; makefile: 24
file content (25 lines) | stat: -rw-r--r-- 772 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
#!/bin/bash

if [ "$AUTOPKGTEST_TEST_ARCH" = "riscv64" ]; then
    exit 77
fi

# install postfix
debconf-set-selections <<< "postfix postfix/mailname string localhost" 2>&1
debconf-set-selections <<< "postfix postfix/main_mailer_type string 'Internet Site'" 2>&1
hostname localhost
apt-get install -y postfix 2>&1

# restart mailman3 after postfix is available
service mailman3 restart

# wait for mailman3 to come back after restart
sleep 10

mailman3_cfg="/etc/mailman3/mailman.cfg"

port="$(sed -ne 's|^port:\s*\(\S\+\)|\1|p' $mailman3_cfg)"
admin_user="$(sed -ne 's|^admin_user:\s*\(\S\+\)|\1|p' $mailman3_cfg)"
admin_pass="$(sed -ne 's|^admin_pass:\s*\(\S\+\)|\1|p' $mailman3_cfg)"

curl -s --user "$admin_user:$admin_pass" http://localhost:$port/3.1/system/versions