Use postfix options for routing mails through tunnel #45
|
@ -1259,14 +1259,18 @@ in
|
||||||
Restart = "on-failure";
|
Restart = "on-failure";
|
||||||
User = "hydra-queue-runner"; # TODO needs new user both here and there
|
User = "hydra-queue-runner"; # TODO needs new user both here and there
|
||||||
Group = "hydra";
|
Group = "hydra";
|
||||||
ExecStart = "${pkgs.openssh}/bin/ssh -N -L 127.0.0.1:1587:5.78.86.156:1587 zolaupd@5.78.86.156";
|
ExecStart = "${pkgs.openssh}/bin/ssh -N -D 127.0.0.1:1587 zolaupd@5.78.86.156";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
environment.etc."postfix/sender_relay".text = ''
|
environment.etc."postfix/sender_relay".text = ''
|
||||||
@m-labs-intl.com [localhost]:1587
|
m-labs-intl.com socks:
|
||||||
* :
|
* :
|
||||||
'';
|
'';
|
||||||
|
environment.etc."tsocks.conf".text = ''
|
||||||
|
server = 127.0.0.1
|
||||||
|
server_port = 1587
|
||||||
|
'';
|
||||||
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 = {
|
||||||
|
@ -1289,6 +1293,11 @@ in
|
||||||
sender_dependent_relayhost_maps = "hash:/etc/postfix/sender_relay";
|
sender_dependent_relayhost_maps = "hash:/etc/postfix/sender_relay";
|
||||||
postscreen_upstream_proxy_protocol = "haproxy";
|
postscreen_upstream_proxy_protocol = "haproxy";
|
||||||
postscreen_upstream_proxy_timeout = "5s";
|
postscreen_upstream_proxy_timeout = "5s";
|
||||||
|
masterConfig.socks = {
|
||||||
|
type = "unix";
|
||||||
|
command = "pipe";
|
||||||
|
args = "flags=R user=nobody argv=${pkgs.tsocks}/bin/tsocks ${pkgs.postfix}/bin/sendmail -oi -f $sender $recipient";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
services.roundcube = {
|
services.roundcube = {
|
||||||
|
|
Loading…
Reference in New Issue