Strip subject for file attach netmail

This commit is contained in:
Michiel Broek 2004-05-24 18:30:09 +00:00
parent 339e0b6c70
commit 7fac41e5fd
3 changed files with 7 additions and 2 deletions

View File

@ -297,7 +297,12 @@ int AddMsgHdr(FILE *fp, faddr *f, faddr *t, int flags, int cost, time_t date, ch
fprintf(fp, "%s%c", tname, '\0');
fprintf(fp, "%s%c", fname, '\0');
fprintf(fp, "%s%c", subj, '\0');
if (flags & M_FILE) {
Syslog('-', "change %s to %s", subj, basename(subj));
fprintf(fp, "%s%c", basename(subj), '\0');
} else {
fprintf(fp, "%s%c", subj, '\0');
}
fsync(fileno(fp));
return 0;
}

View File

@ -49,7 +49,6 @@ extern pid_t mypid;
/*
* Internal version of basename to make this better portable.
*/
char *Basename(char *);
char *Basename(char *str)
{
char *cp = strrchr(str, '/');

View File

@ -4,6 +4,7 @@
/* $Id$ */
char *Basename(char *);
void flush_queue(void);