+ o Add Message-Id: and Date: headers to mail from mlmmj
o Make log_oper() varargs capable, thanks Rob Holland
1.1.1-RC1
o Never discard anything from LISTDIR/queue/, let the admin be able to judge
#define DIGESTMIMETYPE "digest" /* Which sub-type of multipart to use when
* sending digest mails */
#define OPLOGFNAME "mlmmj.operation.log" /* logfile to log operations */
+#define OPLOGSIZE 524288
+
+#define MAXVERPRECIPS 100
struct strlist {
int count;
log_error(LOG_ARGS, "Could not stat logfile %s", logfilename);
myfree(logfilename);
return -1;
- } else if((st.st_mode & S_IFMT) == S_IFLNK) {
- log_error(LOG_ARGS, "%s is a symbolic link, not opening",
- logfilename);
- myfree(logfilename);
- return -1;
}
- if(st.st_size > (off_t)524288) {
+ if(st.st_size > (off_t)OPLOGSIZE) {
tmp = concatstr(2, logfilename, ".rotated");
if(rename(logfilename, tmp) < 0) {
log_error(LOG_ARGS, "Could not rename %s,%s",
DIR *queuedir;
struct dirent *dp;
char *mailname, *fromname, *toname, *reptoname, *from, *to, *repto;
- char *discardedname = NULL, *ch;
- char *dirname = concatstr(2, listdir, "/queue/");
+ char *ch, *dirname = concatstr(2, listdir, "/queue/");
pid_t childpid, pid;
struct stat st;
int fromfd, tofd, fd, discarded = 0, status;
{
char *infilename = NULL, *listdir = NULL;
char *randomstr = random_str();
- char *mlmmjprocess, *bindir, *logstr;
+ char *mlmmjprocess, *bindir;
int fd, opt, noprocess = 0, nofork = 0;
struct stat st;
uid_t uid;
exit(EXIT_FAILURE);
}
+ log_oper(listdir, OPLOGFNAME, "mlmmj-recieve got %s", infilename);
+
fsync(fd);
close(fd);