blob: d3e017643a344fcfccc799250cf6569ca1f51067 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
Index: cron3.0pl1/config.h
===================================================================
--- cron3.0pl1.orig/config.h 2011-08-11 14:14:30.016946551 -0500
+++ cron3.0pl1/config.h 2011-08-11 14:15:19.417274025 -0500
@@ -42,8 +42,8 @@
*/
#define MAILCMD _PATH_SENDMAIL /*-*/
-#define MAILARGS "%s -FCronDaemon -odi -oem -or0s %s" /*-*/
- /* -Fx = set full-name of sender
+#define MAILARGS "%s -f %s -odi -oem -or0s %s" /*-*/
+ /* -f = set sender address
* -odi = Option Deliverymode Interactive
* -oem = Option Errors Mailedtosender
* -or0s = Option Readtimeout -- don't time out
Index: cron3.0pl1/do_command.c
===================================================================
--- cron3.0pl1.orig/do_command.c 2011-08-11 14:06:52.917216917 -0500
+++ cron3.0pl1/do_command.c 2011-08-11 14:09:39.507091277 -0500
@@ -364,10 +364,12 @@
register char **env;
auto char mailcmd[MAX_COMMAND];
auto char hostname[MAXHOSTNAMELEN];
+ auto char sender[MAX_TEMPSTR];
(void) gethostname(hostname, MAXHOSTNAMELEN);
+ (void) sprintf(sender, "root@%s", hostname);
(void) sprintf(mailcmd, MAILARGS,
- MAILCMD, mailto);
+ MAILCMD, sender, mailto);
if (!(mail = cron_popen(mailcmd, "w"))) {
perror(MAILCMD);
(void) _exit(ERROR_EXIT);
|