File tree 2 files changed +24
-1
lines changed
2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change @@ -52,6 +52,7 @@ Feel free to pick your favourite distro.
52
52
- [ Extending the image] ( #extending-the-image )
53
53
- [ Using custom init scripts] ( #using-custom-init-scripts )
54
54
- [ Security] ( #security )
55
+ - [ UIDs/GIDs numbers] ( #uidsgids-numbers )
55
56
- [ Quick how-tos] ( #quick-how-tos )
56
57
- [ Relaying messages through your Gmail account] ( #relaying-messages-through-your-gmail-account )
57
58
- [ Relaying messages through Google Apps account] ( #relaying-messages-through-google-apps-account )
@@ -684,7 +685,22 @@ postconf -e "address_verify_negative_cache=yes"
684
685
## Security
685
686
686
687
Postfix will run the master proces as `root`, because that' s how it' s designed. Subprocesses will run under the `postfix`
687
- account which will use `UID:GID` of `100:101`. `opendkim` will run under account `102:103`.
688
+ and `opendkim` accounts.
689
+
690
+ ### UIDs/GIDs numbers
691
+
692
+ While I cannot guarantee IDs (they are auto-generated by package manages), they tend to be fairly consistent across
693
+ **specific distribution**. Please be aware of this if you are switching images from Alpine to Debian to Ubuntu or
694
+ back.
695
+
696
+ At the last check, images had the following UIDs/GIDs:
697
+
698
+ | Service | Debian (`UID/GID`) | Ubuntu (`UID/GID`) | Alpine (`UID/GID`) |
699
+ |------------|--------------------|--------------------|--------------------|
700
+ | `postfix` | `100:102` | `101:102` | `100:101` |
701
+ | `opendkim` | `101:104` | `102:104` | `102:103` |
702
+
703
+ Please check the notification information on startup.
688
704
689
705
## Quick how-tos
690
706
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
3
announce_startup () (
4
+ local postfix_account opendkim_account
5
+
4
6
DISTRO=" unknown"
5
7
[ -f /etc/lsb-release ] && . /etc/lsb-release
6
8
[ -f /etc/os-release ] && . /etc/os-release
@@ -10,6 +12,11 @@ announce_startup() (
10
12
DISTRO=" ${ID} "
11
13
fi
12
14
echo -e " ${gray}${emphasis} ★★★★★ ${reset}${lightblue} POSTFIX STARTING UP${reset} ${gray} (${reset}${emphasis}${DISTRO}${reset}${gray} )${emphasis} ★★★★★${reset} "
15
+
16
+ postfix_account=" $( cat /etc/passwd | grep -E " ^postfix" | cut -f3-4 -d:) "
17
+ opendkim_account=" $( cat /etc/passwd | grep -E " ^opendkim" | cut -f3-4 -d:) "
18
+
19
+ notice " System accounts: ${emphasis} postfix${reset} =${orange_emphasis}${postfix_account}${reset} , ${emphasis} opendkim${reset} =${orange_emphasis}${opendkim_account}${reset} . Careful when switching distros."
13
20
)
14
21
15
22
setup_timezone () {
You can’t perform that action at this time.
0 commit comments