2 * Wrapper for cyrus 'deliver' to allow anyone to run it -
3 * I hope this is secure! Should be setgid mail.
13 #define LIBEXECDIR "/usr/libexec/cyrus"
16 int main(int argc, char *argv[])
18 char *const envp[] = { NULL };
19 struct passwd *ent = getpwuid(getuid());
20 const char *uname = (ent && ent->pw_name && ent->pw_name[0])
21 ? ent->pw_name : "anonymous";
24 fprintf(stderr, "Usage: %s mailbox\n", argv[0]);
28 execle(LIBEXECDIR"/deliver", "deliver", "-e",
29 "-a", uname, "-m", argv[1],
32 perror("exec "LIBEXECDIR"/deliver");