s/qmail 4.2.29a
Next generation secure email transport
Loading...
Searching...
No Matches
maildirmake.c
Go to the documentation of this file.
1#include <sys/stat.h>
2#include <unistd.h>
3#include "logmsg.h"
4#include "exit.h"
5
6#define WHO "maildirmake"
7
8int main(int argc, char **argv)
9{
10 umask(077);
11 if (!argv[1])
12 logmsg(WHO,100,USAGE,"maildirmake name");
13 if (mkdir(argv[1],0700) == -1)
14 logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1]));
15 if (chdir(argv[1]) == -1)
16 logmsg(WHO,111,FATAL,B("unable to chdir to: ",argv[1]));
17 if (mkdir("tmp",0700) == -1)
18 logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/tmp"));
19 if (mkdir("new",0700) == -1)
20 logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/new"));
21 if (mkdir("cur",0700) == -1)
22 logmsg(WHO,111,FATAL,B("unable to mkdir: ",argv[1],"/cur"));
23 _exit(0);
24}
int main()
Definition: chkshsgr.c:6
void _exit()
#define WHO
Definition: maildirmake.c:6