free(dirname);
return 1;
}
+
if((queuedir = opendir(dirname)) == NULL) {
log_error(LOG_ARGS, "Could not opendir(%s)", dirname);
free(dirname);
while((dp = readdir(queuedir)) != NULL) {
if(strchr(dp->d_name, '.'))
continue;
+
if(stat(dp->d_name, &st) < 0) {
log_error(LOG_ARGS, "Could not stat(%s)",dp->d_name);
continue;
pid = fork();
if(pid == 0) {
- if(repto) {
- printf("%s -l %s -m %s -F %s -T %s -R %s -a\n",
- mlmmjsend, "1", mailname, from,
- to, repto);
+ if(repto)
execlp(mlmmjsend, mlmmjsend,
"-l", "1",
"-m", mailname,
"-T", to,
"-R", repto,
"-a", 0);
- } else {
- printf("%s -l %s -m %s -F %s -T %s -a\n",
- mlmmjsend, "1", mailname, from, to);
+ else
execlp(mlmmjsend, mlmmjsend,
"-l", "1",
"-m", mailname,
"-F", from,
"-T", to,
"-a", 0);
- }
}
}