Closed phdoerfler closed 6 years ago
The new release v2.1 uses virtual users instead of system users. It is documented in the new release mail. Is the activate-virtual-mail-users
something specific to your configuration?
This reminds me that I meant to subscribe to that mailing list. My bad!
Nvm, the problem is the sieve folders,
mail-server/users.nix: chown "${name}:${vmailGroupName}" "/var/sieve/${name}"
mail-server/users.nix: chown "${name}:${vmailGroupName}" "/var/sieve/${name}/default.sieve"
does it work if you change the lines to chown "${vmailUserName}:${vmailGroupName}" ...
?
Changing those two ${name}
into ${vmailUserName}
results in this:
$ nixos-rebuild switch
building Nix...
building the system configuration...
these derivations will be built:
/nix/store/za3g159x9qps2kd5zfgrf1slmj85h2pz-activate-virtual-mail-users.drv
/nix/store/95wca2v9973q8mhlcyl98av2xh25xv43-unit-activate-virtual-mail-users.service.drv
/nix/store/6sb9vbsj7wck0pf9wy90x5ypljjdccsk-system-units.drv
/nix/store/3ciarygy6d0zzsbm8x54b0b654bn1qis-etc.drv
/nix/store/nqa8bw16k6jal9dz3zr5ijml36862n42-nixos-system-turtle-17.09.3036.bbcd0efcb63.drv
building path(s) ‘/nix/store/nw41y00443p3a2fvzjls74zgqh5wv2r2-activate-virtual-mail-users’
building path(s) ‘/nix/store/m6pa1frnlazb9f4mqv9d9a7mg5jr853k-unit-activate-virtual-mail-users.service’
building path(s) ‘/nix/store/6s52wclg5x1945c9ffqylcsksm2aq98d-system-units’
building path(s) ‘/nix/store/9azkki8fbr867ihmawmbzk9njjyykm6m-etc’
building path(s) ‘/nix/store/rhj9bnk2fmdglic9f5a68npcrcdpay11-nixos-system-turtle-17.09.3036.bbcd0efcb63’
updating GRUB 2 menu...
activating the configuration...
setting up /etc...
setting up tmpfiles
Looking good to me. Is this what you'd expect?
Depends on if the sieve scripts still work :) Unfortunately we don't have any sieve tests in our test suite, so it slipped through the CI.
While testing if the sieve scripts would work (and chowning my vmail directory of course) I ran into this which appeared in the logs the moment I sent a test email to myself from a different account:
Feb 22 22:28:09 turtle postfix/smtpd[30556]: fatal: host/service mailstore.example.com/12340 not found: Name or service not known
Is this related?
The mail was not delivered.
Edit:
This seems to be the offending line in postfix.nix
:
# quota
smtpd_recipient_restrictions = check_policy_service inet:mailstore.example.com:12340
I am a bit puzzled as to why the tests run OK indicating mail gets delivered - yet it doesn't. At least on my server and this line looks awfully fishy to me.
Edit 2:
From https://blog.sys4.de/postfix-dovecot-mailbox-quota-en.html via https://wiki2.dovecot.org/Quota:
In this example the frontend server's very last test in smtpd_recipient_restrictions instructs Postfix to contact the Dovecot policy-server at mailstore.example.com on port 12340.
Having removed the offending line in postfix.nix
my test mail got delivered to the sub folder as instructed by the sieve script. I'd say it works.
Not sure if related, but after upgrading my /var/vmail
was still owned by the previous user id 1000
. After running sudo chown -Rf virtualMail /var/vmail/
it seems to be working again. I did try to upgrade to 2.1.1 earlier.
I pulled the new master but when invoking
nixos-rebuild switch
I got the following error:Why does my user
myuser@example.com
get removed in the first place?