s/qmail
4.3.20
Next generation secure email transport
Loading...
Searching...
No Matches
4.3
sqmail-4.3.20
src
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
8
int
main
(
int
argc,
char
*
const
*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
}
main
int main()
Definition:
chkshsgr.c:6
exit.h
_exit
void _exit(int)
WHO
#define WHO
Definition:
maildirmake.c:6
Generated on Thu Jan 16 2025 17:42:04 for s/qmail by
1.9.6