Fix postfix settings so it should load successfully
Signed-off-by: Egor Savkin <es@m-labs.hk>
This commit is contained in:
parent
cbb077c441
commit
eab2d70941
|
@ -254,7 +254,7 @@ in
|
||||||
};
|
};
|
||||||
greTunnels.intl0 = {
|
greTunnels.intl0 = {
|
||||||
dev = netifWan;
|
dev = netifWan;
|
||||||
remote = "5.78.16.0";
|
remote = "5.78.86.156";
|
||||||
local = "94.190.212.123";
|
local = "94.190.212.123";
|
||||||
ttl = 255;
|
ttl = 255;
|
||||||
type = "tun";
|
type = "tun";
|
||||||
|
@ -345,7 +345,7 @@ in
|
||||||
};
|
};
|
||||||
services.strongswan-swanctl.swanctl.connections.intl = {
|
services.strongswan-swanctl.swanctl.connections.intl = {
|
||||||
local_addrs = [ "94.190.212.123" ];
|
local_addrs = [ "94.190.212.123" ];
|
||||||
remote_addrs = [ "5.78.16.0" ];
|
remote_addrs = [ "5.78.86.156" ];
|
||||||
local.main = {
|
local.main = {
|
||||||
auth = "pubkey";
|
auth = "pubkey";
|
||||||
id = "fqdn:m-labs.hk";
|
id = "fqdn:m-labs.hk";
|
||||||
|
@ -359,7 +359,7 @@ in
|
||||||
children.intl0 = {
|
children.intl0 = {
|
||||||
mode = "transport";
|
mode = "transport";
|
||||||
ah_proposals = [ "sha256-curve25519" ];
|
ah_proposals = [ "sha256-curve25519" ];
|
||||||
remote_ts = [ "5.78.16.0[gre]" ];
|
remote_ts = [ "5.78.86.156[gre]" ];
|
||||||
local_ts = [ "94.190.212.123[gre]" ];
|
local_ts = [ "94.190.212.123[gre]" ];
|
||||||
start_action = "start";
|
start_action = "start";
|
||||||
};
|
};
|
||||||
|
@ -1302,14 +1302,14 @@ in
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."postfix/sender_relay".text = ''
|
services.postfix.mapFiles.sender_relay = pkgs.writeText "sender_relay" ''
|
||||||
m-labs-intl.com smtptun:
|
m-labs-intl.com smtptun:
|
||||||
* :
|
* :
|
||||||
'';
|
'';
|
||||||
systemd.services.postfix-rebuild-sender-relay = {
|
systemd.services.postfix-rebuild-sender-relay = {
|
||||||
description = "Postfix Rebuild Sender Dependent Relayhost Maps";
|
description = "Postfix Rebuild Sender Dependent Relayhost Maps";
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
ExecStart = "${pkgs.postfix}/sbin/postmap /etc/postfix/sender_relay";
|
ExecStart = "${pkgs.postfix}/sbin/postmap /var/lib/postfix/conf/sender_relay";
|
||||||
};
|
};
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "multi-user.target" ];
|
||||||
};
|
};
|
||||||
|
@ -1325,14 +1325,15 @@ in
|
||||||
} // (import /etc/nixos/secret/email_settings.nix);
|
} // (import /etc/nixos/secret/email_settings.nix);
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
config = {
|
config = {
|
||||||
sender_dependent_relayhost_maps = "hash:/etc/postfix/sender_relay";
|
sender_dependent_relayhost_maps = "hash:/var/lib/postfix/conf/sender_relay";
|
||||||
masterConfig.smtptun = {
|
};
|
||||||
type = "smtp";
|
masterConfig."smtptun" = {
|
||||||
command = "smtp";
|
type = "unix";
|
||||||
args = "-o smtp_bind_address=10.47.3.2";
|
command = "smtp";
|
||||||
};
|
args = [ "-o" "smtp_bind_address=10.47.3.2" ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
enable = true;
|
enable = true;
|
||||||
hostName = "mail.m-labs.hk";
|
hostName = "mail.m-labs.hk";
|
||||||
|
|
|
@ -22,7 +22,7 @@ $TTL 7200
|
||||||
ns A 94.190.212.123
|
ns A 94.190.212.123
|
||||||
ns AAAA 2001:470:18:390::2
|
ns AAAA 2001:470:18:390::2
|
||||||
|
|
||||||
mail A 5.78.16.0
|
mail A 5.78.86.156
|
||||||
mail._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJVPuhSGXghO7ib8Em/Se3jfCCIJK5g4zn5pGZ3/e0I0f+zGHMuvwpjkAKf6eSmo/AAXEaco28pDi3qE5xfV512AJsORCfPoPFyNhLsj/qtri6hc5KVSWW0Ja3MSFBINDCaX78c7PXPY+3jJJGpwSBDLjdxj9AQwtfiCVlH4qE/QIDAQAB"
|
mail._domainkey IN TXT "v=DKIM1; k=rsa; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDJVPuhSGXghO7ib8Em/Se3jfCCIJK5g4zn5pGZ3/e0I0f+zGHMuvwpjkAKf6eSmo/AAXEaco28pDi3qE5xfV512AJsORCfPoPFyNhLsj/qtri6hc5KVSWW0Ja3MSFBINDCaX78c7PXPY+3jJJGpwSBDLjdxj9AQwtfiCVlH4qE/QIDAQAB"
|
||||||
_dmarc TXT "v=DMARC1; p=none"
|
_dmarc TXT "v=DMARC1; p=none"
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue