Calling /run/current-sw/bin/sendmail fails under postfix because setgid bits are not set. Switching the hardcoded path to an invocation via execvp should cover both cases, when the sendmail binary is setgid-wrapped and when it is not.