fix
This commit is contained in:
24
module.nix
24
module.nix
@@ -95,17 +95,17 @@ in
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# services.postfix.config = {
|
services.postfix.config = {
|
||||||
# smtp_sasl_auth_enable = "yes";
|
smtp_sasl_auth_enable = "yes";
|
||||||
# smtp_sasl_security_options = "";
|
smtp_sasl_security_options = "";
|
||||||
# smtp_sasl_password_maps = "texthash:/run/postfix/mastodon.cf";
|
smtp_sasl_password_maps = "texthash:/run/postfix/mastodon.cf";
|
||||||
# virtual_mailbox_maps = [ "hash:/run/postfix/mastodon.cf" ];
|
virtual_mailbox_maps = [ "hash:/run/postfix/mastodon.cf" ];
|
||||||
# };
|
|
||||||
# mailserver.loginAccounts."noreply.mastodon@${sp.domain}" = {
|
|
||||||
mailserver.loginAccounts."mastodon@${sp.domain}" = {
|
|
||||||
hashedPasswordFile = "/run/postfix/mastodon.cf";
|
|
||||||
sendOnly = true;
|
|
||||||
};
|
};
|
||||||
|
# mailserver.loginAccounts."noreply.mastodon@${sp.domain}" = {
|
||||||
|
# mailserver.loginAccounts."mastodon@${sp.domain}" = {
|
||||||
|
# hashedPasswordFile = "/run/postfix/mastodon.cf";
|
||||||
|
# sendOnly = true;
|
||||||
|
# };
|
||||||
|
|
||||||
systemd = {
|
systemd = {
|
||||||
services.mastodon-email-password-setup = {
|
services.mastodon-email-password-setup = {
|
||||||
@@ -125,8 +125,8 @@ in
|
|||||||
rm -f /run/postfix/mastodon.cf || true
|
rm -f /run/postfix/mastodon.cf || true
|
||||||
mkdir /run/postfix/ || true # Create /run/postfix if it doesn't exist
|
mkdir /run/postfix/ || true # Create /run/postfix if it doesn't exist
|
||||||
export hashedPassword=$(${lib.getExe pkgs.mkpasswd} -sm bcrypt "$password")
|
export hashedPassword=$(${lib.getExe pkgs.mkpasswd} -sm bcrypt "$password")
|
||||||
# echo "noreply.mastodon@${sp.domain}: $hashedPassword" > /run/postfix/mastodon.cf
|
echo "noreply.mastodon@${sp.domain}:$hashedPassword" > /run/postfix/mastodon.cf
|
||||||
echo "$hashedPassword" > /run/postfix/mastodon.cf
|
# echo "$hashedPassword" > /run/postfix/mastodon.cf
|
||||||
chmod 440 /run/postfix/mastodon.cf
|
chmod 440 /run/postfix/mastodon.cf
|
||||||
chown ${config.services.postfix.user}:${config.services.postfix.group} /run/postfix/mastodon.cf
|
chown ${config.services.postfix.user}:${config.services.postfix.group} /run/postfix/mastodon.cf
|
||||||
'';
|
'';
|
||||||
|
Reference in New Issue
Block a user