? errors_sender_rc : EXIT_FAILURE;
int header_size = 256;
int start, end, domain;
-int id_resolution;
+int id_resolution = 0;
int had_zero = 0;
int prevlines_length = 0;
if (host_number_string)
{
- id_resolution = (BASE_62 == 62)? 5000 : 10000;
+ id_resolution = BASE_62 == 62 ? 5000 : 10000;
sprintf(CS(message_id + MESSAGE_ID_LENGTH - 3), "-%2s",
string_base62((long int)(
host_number * (1000000/id_resolution) +
else
{
- id_resolution = (BASE_62 == 62)? 500 : 1000;
+ id_resolution = BASE_62 == 62 ? 500 : 1000;
sprintf(CS(message_id + MESSAGE_ID_LENGTH - 3), "-%2s",
string_base62((long int)(message_id_tv.tv_usec/id_resolution)) + 4);
}
receive_messagecount++;
-/* In SMTP sessions we may receive several in one connection. After each one,
-we wait for the clock to tick at the level of message-id granularity. This is
-so that the combination of time+pid is unique, even on systems where the pid
-can be re-used within our time interval. We can't shorten the interval without
-re-designing the message-id. See comments above where the message id is
-created. This is Something For The Future. */
-
-message_id_tv.tv_usec = (message_id_tv.tv_usec/id_resolution) * id_resolution;
-exim_wait_tick(&message_id_tv, id_resolution);
-
/* Add data size to written header size. We do not count the initial file name
that is in the file, but we do add one extra for the notional blank line that
precedes the data. This total differs from message_size in that it include the
TIDYUP:
+/* In SMTP sessions we may receive several messages in one connection. After
+each one, we wait for the clock to tick at the level of message-id granularity.
+This is so that the combination of time+pid is unique, even on systems where the
+pid can be re-used within our time interval. We can't shorten the interval
+without re-designing the message-id. See comments above where the message id is
+created. This is Something For The Future.
+Do this wait any time we have created a message-id, even if we rejected the
+message. This gives unique IDs for logging done by ACLs. */
+
+if (id_resolution != 0)
+ {
+ message_id_tv.tv_usec = (message_id_tv.tv_usec/id_resolution) * id_resolution;
+ exim_wait_tick(&message_id_tv, id_resolution);
+ id_resolution = 0;
+ }
+
+
process_info[process_info_len] = 0; /* Remove message id */
if (spool_data_file && cutthrough_done == NOT_TRIED)
{
1999-03-02 09:44:33 Our cert SN: <CN=server1.example.com>
1999-03-02 09:44:33 Peer did not present a cert
1999-03-02 09:44:33 10HmaY-0005vi-00 <= "name with spaces"@test.ex H=[127.0.0.1] P=smtps X=TLS1.x:ke_RSA_AES_256_CBC_SHAnnn:256 CV=no S=sss
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [ip4.ip4.ip4.ip4] (gnutls_handshake): The peer did not send any certificate.
1999-03-02 09:44:33 Our cert SN: <CN=server1.example.com>
1999-03-02 09:44:33 Peer cert:
1999-03-02 09:44:33 ver 3
1999-03-02 09:44:33 Our cert SN: <CN=server1.example_ec.com>
1999-03-02 09:44:33 Peer did not present a cert
1999-03-02 09:44:33 10HmbB-0005vi-00 <= CALLER@test.ex H=[127.0.0.1] P=smtps X=TLS1.x:ke_ECDSA_AES_256_CBC_SHAnnn:256 CV=no S=sss
+1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [ip4.ip4.ip4.ip4] (gnutls_handshake): The peer did not send any certificate.
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
1999-03-02 09:44:33 SMTP connection from [127.0.0.1] (TCP/IP connection count = 1)
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): timed out
-1999-03-02 09:44:33 SMTP command timeout on connection from (rhu.barb) [127.0.0.1]
+1999-03-02 09:44:33 TLS error on connection from (timeout.rhu.barb) [127.0.0.1] (gnutls_handshake): timed out
+1999-03-02 09:44:33 SMTP command timeout on connection from (timeout.rhu.barb) [127.0.0.1]
1999-03-02 09:44:33 SMTP connection from [127.0.0.1] (TCP/IP connection count = 1)
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): The TLS connection was non-properly terminated.
-1999-03-02 09:44:33 SMTP connection from (rhu.barb) [127.0.0.1] closed by EOF
+1999-03-02 09:44:33 TLS error on connection from (close.rhu.barb) [127.0.0.1] (gnutls_handshake): The TLS connection was non-properly terminated.
+1999-03-02 09:44:33 SMTP connection from (close.rhu.barb) [127.0.0.1] closed by EOF
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [ip4.ip4.ip4.ip4] (gnutls_handshake): The peer did not send any certificate.
+1999-03-02 09:44:33 TLS error on connection from (rhu1.barb) [ip4.ip4.ip4.ip4] (gnutls_handshake): The peer did not send any certificate.
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [ip4.ip4.ip4.ip4] (cert/key setup: cert=/non/exist key=/non/exist): Error while reading file.
+1999-03-02 09:44:33 TLS error on connection from (rhu2.barb) [ip4.ip4.ip4.ip4] (cert/key setup: cert=/non/exist key=/non/exist): Error while reading file.
******** SERVER ********
1999-03-02 09:44:33 exim x.yz daemon started: pid=pppp, no queue runs, listening for SMTP on port 1225
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): timed out
-1999-03-02 09:44:33 SMTP command timeout on connection from (rhu.barb) [127.0.0.1]
-1999-03-02 09:44:33 TLS error on connection from (rhu.barb) [127.0.0.1] (gnutls_handshake): An unexpected TLS packet was received.
+1999-03-02 09:44:33 TLS error on connection from (rhu1.barb) [127.0.0.1] (gnutls_handshake): timed out
+1999-03-02 09:44:33 SMTP command timeout on connection from (rhu1.barb) [127.0.0.1]
+1999-03-02 09:44:33 TLS error on connection from (rhu2.barb) [127.0.0.1] (gnutls_handshake): An unexpected TLS packet was received.
??? 250
starttls
??? 220
+nop
+????554
****
### No certificate, certificate optional at TLS time, required by ACL
client-gnutls 127.0.0.1 PORT_D
??? 250
starttls
??? 220
+nop
+????554
****
### Bad certificate, certificate optional at TLS time, reject at ACL time
# (situation as above)
### Good certificate, certificate required - but nonmatching CRL also present
client-gnutls HOSTIPV4 PORT_D aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.chain.pem aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
??? 220
-ehlo rhu.barb
+ehlo rhu9.barb
??? 250-
??? 250-
??? 250-
****
client-gnutls 127.0.0.1 PORT_D
??? 220
-ehlo rhu.barb
+ehlo timeout.rhu.barb
??? 250-
??? 250-
??? 250-
****
client-gnutls 127.0.0.1 PORT_D
??? 220
-ehlo rhu.barb
+ehlo close.rhu.barb
??? 250-
??? 250-
??? 250-
starttls_wait
??? 220
****
+millisleep 500
killdaemon
munge gnutls_bad_clientcert
client-gnutls HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
??? 220
-ehlo rhu.barb
+ehlo rhu1.barb
??? 250-
??? 250-
??? 250-
??? 250
starttls
??? 220
+nop
+????554
****
killdaemon
#
****
client-gnutls HOSTIPV4 PORT_D aux-fixed/cert2 aux-fixed/cert2
??? 220
-ehlo rhu.barb
+ehlo rhu2.barb
??? 250-
??? 250-
??? 250-
# timeout case
client 127.0.0.1 PORT_D
??? 220
-ehlo rhu.barb
+ehlo rhu1.barb
??? 250-
??? 250-
??? 250-
# bad TLS negotiation case
client 127.0.0.1 PORT_D
??? 220
-ehlo rhu.barb
+ehlo rhu2.barb
??? 250-
??? 250-
??? 250-
??? 220
bogus
****
+millisleep 500
killdaemon
Attempting to start TLS
A TLS fatal alert has been received.
Failed to start TLS
+>>> nop
+????554
End of script
### No certificate, certificate optional at TLS time, required by ACL
Connecting to 127.0.0.1 port 1225 ... connected
Attempting to start TLS
A TLS fatal alert has been received.
Failed to start TLS
+>>> nop
+????554
End of script
### Bad certificate, certificate optional at TLS time, reject at ACL time
Connecting to 127.0.0.1 port 1225 ... connected
Key file = aux-fixed/exim-ca/example.com/server1.example.com/server1.example.com.unlocked.key
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo rhu9.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [ip4.ip4.ip4.ip4]
+<<< 250-myhost.test.ex Hello rhu9.barb [ip4.ip4.ip4.ip4]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo timeout.rhu.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+<<< 250-myhost.test.ex Hello timeout.rhu.barb [127.0.0.1]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo close.rhu.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+<<< 250-myhost.test.ex Hello close.rhu.barb [127.0.0.1]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Key file = aux-fixed/cert2
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo rhu1.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [ip4.ip4.ip4.ip4]
+<<< 250-myhost.test.ex Hello rhu1.barb [ip4.ip4.ip4.ip4]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Attempting to start TLS
A TLS fatal alert has been received.
Failed to start TLS
+>>> nop
+????554
End of script
Connecting to ip4.ip4.ip4.ip4 port 1225 ... connected
Certificate file = aux-fixed/cert2
Key file = aux-fixed/cert2
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo rhu2.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [ip4.ip4.ip4.ip4]
+<<< 250-myhost.test.ex Hello rhu2.barb [ip4.ip4.ip4.ip4]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo rhu1.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+<<< 250-myhost.test.ex Hello rhu1.barb [127.0.0.1]
??? 250-
<<< 250-SIZE 52428800
??? 250-
Connecting to 127.0.0.1 port 1225 ... connected
??? 220
<<< 220 myhost.test.ex ESMTP Exim x.yz Tue, 2 Mar 1999 09:44:33 +0000
->>> ehlo rhu.barb
+>>> ehlo rhu2.barb
??? 250-
-<<< 250-myhost.test.ex Hello rhu.barb [127.0.0.1]
+<<< 250-myhost.test.ex Hello rhu2.barb [127.0.0.1]
??? 250-
<<< 250-SIZE 52428800
??? 250-