Strip subject for file attach netmail
This commit is contained in:
parent
339e0b6c70
commit
7fac41e5fd
@ -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", tname, '\0');
|
||||||
fprintf(fp, "%s%c", fname, '\0');
|
fprintf(fp, "%s%c", fname, '\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');
|
fprintf(fp, "%s%c", subj, '\0');
|
||||||
|
}
|
||||||
fsync(fileno(fp));
|
fsync(fileno(fp));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -49,7 +49,6 @@ extern pid_t mypid;
|
|||||||
/*
|
/*
|
||||||
* Internal version of basename to make this better portable.
|
* Internal version of basename to make this better portable.
|
||||||
*/
|
*/
|
||||||
char *Basename(char *);
|
|
||||||
char *Basename(char *str)
|
char *Basename(char *str)
|
||||||
{
|
{
|
||||||
char *cp = strrchr(str, '/');
|
char *cp = strrchr(str, '/');
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
/* $Id$ */
|
/* $Id$ */
|
||||||
|
|
||||||
|
|
||||||
|
char *Basename(char *);
|
||||||
void flush_queue(void);
|
void flush_queue(void);
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user