summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
cd9868e)
the -H files are always consistent.
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.495 2007/03/14 11:22:23 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.496 2007/03/14 12:15:56 ph10 Exp $
Change log file for Exim from version 4.21
-------------------------------------------
Change log file for Exim from version 4.21
-------------------------------------------
from the list, along with the local host and any following hosts (which
is what is supposed to happen).
from the list, along with the local host and any following hosts (which
is what is supposed to happen).
+PH/40 When Exim receives a message, it writes the login name, uid, and gid of
+ whoever called Exim into the -H file. In the case of the daemon it was
+ behaving confusingly. When first started, it used values for whoever
+ started the daemon, but after a SIGHUP it used the Exim user (because it
+ calls itself on a restart). I have changed the code so that it now always
+ uses the Exim user.
+
Exim version 4.66
-----------------
Exim version 4.66
-----------------
-/* $Cambridge: exim/src/src/daemon.c,v 1.22 2007/01/23 14:34:02 ph10 Exp $ */
+/* $Cambridge: exim/src/src/daemon.c,v 1.23 2007/03/14 12:15:56 ph10 Exp $ */
/*************************************************
* Exim - an Internet mail transport agent *
/*************************************************
* Exim - an Internet mail transport agent *
int *listen_sockets = NULL;
int listen_socket_count = 0;
ip_address_item *addresses = NULL;
int *listen_sockets = NULL;
int listen_socket_count = 0;
ip_address_item *addresses = NULL;
exim_setugid(exim_uid, exim_gid, geteuid()==root_uid, US"running as a daemon");
exim_setugid(exim_uid, exim_gid, geteuid()==root_uid, US"running as a daemon");
+/* Update the originator_xxx fields so that received messages as listed as
+coming from Exim, not whoever started the daemon. */
+
+originator_uid = exim_uid;
+originator_gid = exim_gid;
+originator_login = ((pw = getpwuid(exim_uid)) != NULL)?
+ string_copy_malloc(US pw->pw_name) : US"exim";
+
/* Get somewhere to keep the list of queue-runner pids if we are keeping track
of them (and also if we are doing queue runs). */
/* Get somewhere to keep the list of queue-runner pids if we are keeping track
of them (and also if we are doing queue runs). */
-# $Cambridge: exim/test/runtest,v 1.24 2007/02/08 15:16:19 ph10 Exp $
+# $Cambridge: exim/test/runtest,v 1.25 2007/03/14 12:15:56 ph10 Exp $
###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
###############################################################################
# This is the controlling script for the "new" test suite for Exim. It should #
# ======== Exim's login ========
# ======== Exim's login ========
- # For bounce messages, this will appear on the U= lines in logs and also
- # after Received: and in addresses. In one pipe test it appears after
- # "Running as:". It also appears in addresses, and in the names of lock
+ # For messages received by the daemon, this is in the -H file, which some
+ # tests inspect. For bounce messages, this will appear on the U= lines in
+ # logs and also after Received: and in addresses. In one pipe test it appears
+ # after "Running as:". It also appears in addresses, and in the names of lock
# files.
s/U=$parm_eximuser/U=EXIMUSER/;
# files.
s/U=$parm_eximuser/U=EXIMUSER/;
s/\buid=$parm_exim_uid\b/uid=EXIM_UID/g;
s/\bgid=$parm_exim_gid\b/gid=EXIM_GID/g;
s/\buid=$parm_exim_uid\b/uid=EXIM_UID/g;
s/\bgid=$parm_exim_gid\b/gid=EXIM_GID/g;
+ s/^$parm_eximuser $parm_exim_uid $parm_exim_gid/EXIMUSER EXIM_UID EXIM_GID/;
+
# ======== General uids, gids, and pids ========
# Note: this must come after munges for caller's and exim's uid/gid
# ======== General uids, gids, and pids ========
# Note: this must come after munges for caller's and exim's uid/gid
<<< 221 myhost.test.ex closing connection
End of script
10HmaX-0005vi-00-H
<<< 221 myhost.test.ex closing connection
End of script
10HmaX-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<notsubmit@y>
ddddddddd 0
-helo_name rhu.barb
<notsubmit@y>
ddddddddd 0
-helo_name rhu.barb
id 10HmaX-0005vi-00
for x@y; Tue, 2 Mar 1999 09:44:33 +0000
10HmaY-0005vi-00-H
id 10HmaX-0005vi-00
for x@y; Tue, 2 Mar 1999 09:44:33 +0000
10HmaY-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<a@y>
ddddddddd 0
-helo_name rhu.barb
<a@y>
ddddddddd 0
-helo_name rhu.barb
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaZ-0005vi-00-H
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaZ-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<>
ddddddddd 0
-helo_name rhu.barb
<>
ddddddddd 0
-helo_name rhu.barb
047I Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbA-0005vi-00-H
047I Message-Id: <E10HmaZ-0005vi-00@myhost.test.ex>
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbA-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<notsubmit@y>
ddddddddd 0
-helo_name rhu.barb
<notsubmit@y>
ddddddddd 0
-helo_name rhu.barb
for x@y; Tue, 2 Mar 1999 09:44:33 +0000
dddS Sender: sender@some.where
10HmbB-0005vi-00-H
for x@y; Tue, 2 Mar 1999 09:44:33 +0000
dddS Sender: sender@some.where
10HmbB-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<a@y>
ddddddddd 0
-helo_name rhu.barb
<a@y>
ddddddddd 0
-helo_name rhu.barb
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbC-0005vi-00-H
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbC-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<a@y>
ddddddddd 0
-helo_name rhu.barb
<a@y>
ddddddddd 0
-helo_name rhu.barb
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbD-0005vi-00-H
dddF From: a@y
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbD-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<a@y>
ddddddddd 0
-helo_name rhu.barb
<a@y>
ddddddddd 0
-helo_name rhu.barb
<<< 221 myhost.test.ex closing connection
End of script
10HmaX-0005vi-00-H
<<< 221 myhost.test.ex closing connection
End of script
10HmaX-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<username@myhost.test.ex>
ddddddddd 0
-helo_name rhu.barb
<username@myhost.test.ex>
ddddddddd 0
-helo_name rhu.barb
dddS Sender: username@myhost.test.ex
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaY-0005vi-00-H
dddS Sender: username@myhost.test.ex
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaY-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<>
ddddddddd 0
-helo_name rhu.barb
<>
ddddddddd 0
-helo_name rhu.barb
dddF From: username@myhost.test.ex
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaZ-0005vi-00-H
dddF From: username@myhost.test.ex
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmaZ-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<>
ddddddddd 0
-helo_name rhu.barb
<>
ddddddddd 0
-helo_name rhu.barb
dddF From: username@another.domain
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbA-0005vi-00-H
dddF From: username@another.domain
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbA-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<>
ddddddddd 0
-helo_name rhu.barb
<>
ddddddddd 0
-helo_name rhu.barb
dddF From: username@auth.id.domain
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbB-0005vi-00-H
dddF From: username@auth.id.domain
038 Date: Tue, 2 Mar 1999 09:44:33 +0000
10HmbB-0005vi-00-H
+EXIMUSER EXIM_UID EXIM_GID
<>
ddddddddd 0
-helo_name rhu.barb
<>
ddddddddd 0
-helo_name rhu.barb