View | Details | Raw Unified | Return to bug 6902
Collapse All | Expand All

(-)cyrus-imapd-2.2.12.orig/lib/imapoptions (+3 lines)
Lines 771-776 are listed with ``<none>''. Link Here
771
   IMAP and LMTP daemons. If it is unset, then the result returned
771
   IMAP and LMTP daemons. If it is unset, then the result returned
772
   from gethostname(2) is used. */
772
   from gethostname(2) is used. */
773
   
773
   
774
{ "showserverver", 1, SWITCH }
775
/* Show or don't show server version in POP3 banner. */
776
774
{ "sharedprefix", "Shared Folders", STRING }
777
{ "sharedprefix", "Shared Folders", STRING }
775
/* If using the alternate IMAP namespace, the prefix for the shared
778
/* If using the alternate IMAP namespace, the prefix for the shared
776
   namespace.  The hierarchy delimiter will be automatically appended. */
779
   namespace.  The hierarchy delimiter will be automatically appended. */
(-)cyrus-imapd-2.2.12.orig/imap/pop3d.c (-2 / +16 lines)
Lines 425-433 int service_main(int argc __attribute__( Link Here
425
	syslog(LOG_WARNING, "APOP disabled: can't create challenge");
425
	syslog(LOG_WARNING, "APOP disabled: can't create challenge");
426
    }
426
    }
427
427
428
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
428
    prot_printf(popd_out, "+OK %s Cyrus POP3%s %s server ready %s\r\n",
429
    prot_printf(popd_out, "+OK %s Cyrus POP3%s %s server ready %s\r\n",
429
		config_servername, config_mupdate_server ? " Murder" : "",
430
		config_servername, config_mupdate_server ? " Murder" : "",
430
		CYRUS_VERSION, popd_apop_chal);
431
		CYRUS_VERSION, popd_apop_chal);
432
    }
433
    else {
434
    prot_printf(popd_out, "+OK %s Cyrus POP3%s server ready %s\r\n",
435
		config_servername, config_mupdate_server ? " Murder" : "",
436
		popd_apop_chal);
437
    }
431
    cmdloop();
438
    cmdloop();
432
439
433
    /* QUIT executed */
440
    /* QUIT executed */
Lines 1205-1215 void cmd_capa() Link Here
1205
	 || config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
1212
	 || config_getswitch(IMAPOPT_ALLOWPLAINTEXT))) {
1206
	prot_printf(popd_out, "USER\r\n");
1213
	prot_printf(popd_out, "USER\r\n");
1207
    }
1214
    }
1208
    
1215
   
1216
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
1209
    prot_printf(popd_out,
1217
    prot_printf(popd_out,
1210
		"IMPLEMENTATION Cyrus POP3%s server %s\r\n",
1218
		"IMPLEMENTATION Cyrus POP3%s server %s\r\n",
1211
		config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
1219
		config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
1212
1220
    }
1221
    else {	    
1222
    prot_printf(popd_out,
1223
		"IMPLEMENTATION Cyrus POP3%s server \r\n",
1224
		config_mupdate_server ? " Murder" : "");
1225
    }
1226
    
1213
    prot_printf(popd_out, ".\r\n");
1227
    prot_printf(popd_out, ".\r\n");
1214
    prot_flush(popd_out);
1228
    prot_flush(popd_out);
1215
}
1229
}
(-)cyrus-imapd-2.2.12.orig/imap/imapd.c (+13 lines)
Lines 820-828 void cmdloop() Link Here
820
    char *p, shut[1024];
820
    char *p, shut[1024];
821
    const char *err;
821
    const char *err;
822
822
823
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
823
    prot_printf(imapd_out,
824
    prot_printf(imapd_out,
824
		"* OK %s Cyrus IMAP4 %s server ready\r\n", config_servername,
825
		"* OK %s Cyrus IMAP4 %s server ready\r\n", config_servername,
825
		CYRUS_VERSION);
826
		CYRUS_VERSION);
827
    }
828
    else {
829
    prot_printf(imapd_out,
830
		"* OK %s Cyrus IMAP4 server ready\r\n", config_servername);
831
    }
832
	    
826
833
827
    ret = snprintf(motdfilename, sizeof(motdfilename), "%s/msg/motd",
834
    ret = snprintf(motdfilename, sizeof(motdfilename), "%s/msg/motd",
828
		   config_dir);
835
		   config_dir);
Lines 5060-5069 void cmd_netscrape(char *tag) Link Here
5060
    url = config_getstring(IMAPOPT_NETSCAPEURL);
5067
    url = config_getstring(IMAPOPT_NETSCAPEURL);
5061
5068
5062
    /* I only know of three things to reply with: */
5069
    /* I only know of three things to reply with: */
5070
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
5063
    prot_printf(imapd_out,
5071
    prot_printf(imapd_out,
5064
		"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP\r\n"
5072
		"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP\r\n"
5065
		"* VERSION %s\r\n",
5073
		"* VERSION %s\r\n",
5066
		CYRUS_VERSION);
5074
		CYRUS_VERSION);
5075
    }
5076
    else {
5077
    prot_printf(imapd_out,
5078
		"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP\r\n");
5079
    }
5067
    if (url) prot_printf(imapd_out, "* ACCOUNT-URL %s\r\n", url);
5080
    if (url) prot_printf(imapd_out, "* ACCOUNT-URL %s\r\n", url);
5068
    prot_printf(imapd_out, "%s OK %s\r\n",
5081
    prot_printf(imapd_out, "%s OK %s\r\n",
5069
		tag, error_message(IMAP_OK_COMPLETED));
5082
		tag, error_message(IMAP_OK_COMPLETED));
(-)cyrus-imapd-2.2.12.orig/imap/lmtp_sieve.c (+6 lines)
Lines 228-235 static int send_rejection(const char *or Link Here
228
    fprintf(sm, "--%d/%s\r\n"
228
    fprintf(sm, "--%d/%s\r\n"
229
	    "Content-Type: message/disposition-notification\r\n\r\n",
229
	    "Content-Type: message/disposition-notification\r\n\r\n",
230
	    (int) p, config_servername);
230
	    (int) p, config_servername);
231
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
231
    fprintf(sm, "Reporting-UA: %s; Cyrus %s/%s\r\n",
232
    fprintf(sm, "Reporting-UA: %s; Cyrus %s/%s\r\n",
232
	    config_servername, CYRUS_VERSION, SIEVE_VERSION);
233
	    config_servername, CYRUS_VERSION, SIEVE_VERSION);
234
    }
235
    else {
236
    fprintf(sm, "Reporting-UA: %s; Cyrus %s\r\n",
237
	    config_servername, SIEVE_VERSION);
238
    }
233
    if (origreceip)
239
    if (origreceip)
234
	fprintf(sm, "Original-Recipient: rfc822; %s\r\n", origreceip);
240
	fprintf(sm, "Original-Recipient: rfc822; %s\r\n", origreceip);
235
    fprintf(sm, "Final-Recipient: rfc822; %s\r\n", mailreceip);
241
    fprintf(sm, "Final-Recipient: rfc822; %s\r\n", mailreceip);
(-)cyrus-imapd-2.2.12.orig/imap/lmtpengine.c (-1 / +7 lines)
Lines 1118-1127 void lmtpmode(struct lmtp_func *func, Link Here
1118
	if(havelocal) sasl_setprop(cd.conn, SASL_IPLOCALPORT,  &localip );
1118
	if(havelocal) sasl_setprop(cd.conn, SASL_IPLOCALPORT,  &localip );
1119
	if(haveremote) sasl_setprop(cd.conn, SASL_IPREMOTEPORT, &remoteip);  
1119
	if(haveremote) sasl_setprop(cd.conn, SASL_IPREMOTEPORT, &remoteip);  
1120
    }
1120
    }
1121
1121
    
1122
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
1122
    prot_printf(pout, "220 %s LMTP Cyrus %s ready\r\n", 
1123
    prot_printf(pout, "220 %s LMTP Cyrus %s ready\r\n", 
1123
		config_servername,
1124
		config_servername,
1124
		CYRUS_VERSION);
1125
		CYRUS_VERSION);
1126
    } 
1127
    else {
1128
    prot_printf(pout, "220 %s LMTP Cyrus ready\r\n", 
1129
		config_servername);
1130
    }
1125
1131
1126
    for (;;) {
1132
    for (;;) {
1127
    nextcmd:
1133
    nextcmd:
(-)cyrus-imapd-2.2.12.orig/imap/lmtpproxyd.c (+6 lines)
Lines 260-267 int service_main(int argc __attribute__( Link Here
260
	mhandle = NULL;
260
	mhandle = NULL;
261
	syslog(LOG_ERR, "couldn't connect to %s: %s", config_mupdate_server,
261
	syslog(LOG_ERR, "couldn't connect to %s: %s", config_mupdate_server,
262
	       error_message(r));
262
	       error_message(r));
263
	if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
263
	prot_printf(deliver_out, "451 %s LMTP Cyrus %s %s\r\n",
264
	prot_printf(deliver_out, "451 %s LMTP Cyrus %s %s\r\n",
264
		    config_servername, CYRUS_VERSION, error_message(r));
265
		    config_servername, CYRUS_VERSION, error_message(r));
266
	}
267
	else {
268
	prot_printf(deliver_out, "451 %s LMTP Cyrus %s\r\n",
269
		    config_servername, error_message(r));
270
	}
265
    }
271
    }
266
272
267
    /* free session state */
273
    /* free session state */
(-)cyrus-imapd-2.2.12.orig/imap/mupdate.c (+8 lines)
Lines 995-1004 static void dobanner(struct conn *c) Link Here
995
995
996
    prot_printf(c->pout, "* PARTIAL-UPDATE\r\n");
996
    prot_printf(c->pout, "* PARTIAL-UPDATE\r\n");
997
997
998
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
998
    prot_printf(c->pout,
999
    prot_printf(c->pout,
999
		"* OK MUPDATE \"%s\" \"Cyrus Murder\" \"%s\" \"%s\"\r\n",
1000
		"* OK MUPDATE \"%s\" \"Cyrus Murder\" \"%s\" \"%s\"\r\n",
1000
		config_servername,
1001
		config_servername,
1001
		CYRUS_VERSION, masterp ? "(master)" : slavebuf);
1002
		CYRUS_VERSION, masterp ? "(master)" : slavebuf);
1003
    }
1004
    else {
1005
    prot_printf(c->pout,
1006
		"* OK MUPDATE \"%s\" \"Cyrus Murder\" \"%s\"\r\n",
1007
		config_servername,
1008
		masterp ? "(master)" : slavebuf);
1009
    }
1002
1010
1003
    prot_flush(c->pout);
1011
    prot_flush(c->pout);
1004
}
1012
}
(-)cyrus-imapd-2.2.12.orig/imap/nntpd.c (+32 lines)
Lines 664-683 int service_main(int argc __attribute__( Link Here
664
    if (nntps == 1) cmd_starttls(1);
664
    if (nntps == 1) cmd_starttls(1);
665
665
666
    if (shutdown_file(unavail, sizeof(unavail))) {
666
    if (shutdown_file(unavail, sizeof(unavail))) {
667
	if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
667
	prot_printf(nntp_out,
668
	prot_printf(nntp_out,
668
		    "400 %s Cyrus NNTP%s %s server unavailable, %s\r\n",
669
		    "400 %s Cyrus NNTP%s %s server unavailable, %s\r\n",
669
		    config_servername, config_mupdate_server ? " Murder" : "",
670
		    config_servername, config_mupdate_server ? " Murder" : "",
670
		    CYRUS_VERSION, unavail);
671
		    CYRUS_VERSION, unavail);
672
	}
673
	else {
674
	prot_printf(nntp_out,
675
		    "400 %s Cyrus NNTP%s server unavailable, %s\r\n",
676
		    config_servername, config_mupdate_server ? " Murder" : "", unavail);
677
	}
671
678
672
	shut_down(0);
679
	shut_down(0);
673
    }
680
    }
674
681
682
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
675
    prot_printf(nntp_out,
683
    prot_printf(nntp_out,
676
		"%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
684
		"%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
677
		(nntp_capa & MODE_READ) ? 200 : 201,
685
		(nntp_capa & MODE_READ) ? 200 : 201,
678
		config_servername, config_mupdate_server ? " Murder" : "",
686
		config_servername, config_mupdate_server ? " Murder" : "",
679
		CYRUS_VERSION,
687
		CYRUS_VERSION,
680
		(nntp_capa & MODE_READ) ? "allowed" : "prohibited");
688
		(nntp_capa & MODE_READ) ? "allowed" : "prohibited");
689
    } 
690
    else {
691
    prot_printf(nntp_out,
692
		"%u %s Cyrus NNTP%s server ready, posting %s\r\n",
693
		(nntp_capa & MODE_READ) ? 200 : 201,
694
		config_servername, config_mupdate_server ? " Murder" : "",
695
		(nntp_capa & MODE_READ) ? "allowed" : "prohibited");
696
    }
681
697
682
    cmdloop();
698
    cmdloop();
683
699
Lines 1806-1814 static void cmd_capabilities(char *keywo Link Here
1806
1822
1807
    prot_printf(nntp_out, "101 Capability list follows:\r\n");
1823
    prot_printf(nntp_out, "101 Capability list follows:\r\n");
1808
    prot_printf(nntp_out, "VERSION 2\r\n");
1824
    prot_printf(nntp_out, "VERSION 2\r\n");
1825
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
1809
    prot_printf(nntp_out,
1826
    prot_printf(nntp_out,
1810
		"IMPLEMENTATION Cyrus NNTP%s server %s\r\n",
1827
		"IMPLEMENTATION Cyrus NNTP%s server %s\r\n",
1811
		config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
1828
		config_mupdate_server ? " Murder" : "", CYRUS_VERSION);
1829
    }
1830
    else {
1831
    prot_printf(nntp_out,
1832
		"IMPLEMENTATION Cyrus NNTP%s server\r\n",
1833
		config_mupdate_server ? " Murder" : "");
1834
    }
1812
1835
1813
    /* add STARTTLS */
1836
    /* add STARTTLS */
1814
    if (tls_enabled() && !nntp_starttls_done && !nntp_authstate)
1837
    if (tls_enabled() && !nntp_starttls_done && !nntp_authstate)
Lines 2664-2675 static void cmd_mode(char *arg) Link Here
2664
    lcase(arg);
2687
    lcase(arg);
2665
2688
2666
    if (!strcmp(arg, "reader")) {
2689
    if (!strcmp(arg, "reader")) {
2690
	if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
2667
	prot_printf(nntp_out,
2691
	prot_printf(nntp_out,
2668
		    "%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
2692
		    "%u %s Cyrus NNTP%s %s server ready, posting %s\r\n",
2669
		    (nntp_capa & MODE_READ) ? 200 : 201,
2693
		    (nntp_capa & MODE_READ) ? 200 : 201,
2670
		    config_servername, config_mupdate_server ? " Murder" : "",
2694
		    config_servername, config_mupdate_server ? " Murder" : "",
2671
		    CYRUS_VERSION,
2695
		    CYRUS_VERSION,
2672
		    (nntp_capa & MODE_READ) ? "allowed" : "prohibited");
2696
		    (nntp_capa & MODE_READ) ? "allowed" : "prohibited");
2697
	}
2698
	else {
2699
	prot_printf(nntp_out,
2700
		    "%u %s Cyrus NNTP%s server ready, posting %s\r\n",
2701
		    (nntp_capa & MODE_READ) ? 200 : 201,
2702
		    config_servername, config_mupdate_server ? " Murder" : "",
2703
		    (nntp_capa & MODE_READ) ? "allowed" : "prohibited");
2704
	}
2673
    }
2705
    }
2674
    else if (!strcmp(arg, "stream")) {
2706
    else if (!strcmp(arg, "stream")) {
2675
	if (nntp_capa & MODE_FEED) {
2707
	if (nntp_capa & MODE_FEED) {
(-)cyrus-imapd-2.2.12.orig/imap/proxyd.c (+12 lines)
Lines 1482-1490 void cmdloop() Link Here
1482
	     "%s/msg/shutdown", config_dir);
1482
	     "%s/msg/shutdown", config_dir);
1483
1483
1484
    gethostname(hostname, sizeof(hostname));
1484
    gethostname(hostname, sizeof(hostname));
1485
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
1485
    prot_printf(proxyd_out,
1486
    prot_printf(proxyd_out,
1486
		"* OK %s Cyrus IMAP4 Murder %s server ready\r\n", hostname,
1487
		"* OK %s Cyrus IMAP4 Murder %s server ready\r\n", hostname,
1487
		CYRUS_VERSION);
1488
		CYRUS_VERSION);
1489
    }
1490
    else {
1491
    prot_printf(proxyd_out,
1492
		"* OK %s Cyrus IMAP4 Murder server ready\r\n", hostname);
1493
    }
1488
1494
1489
    snprintf(motdfilename, sizeof(motdfilename), "%s/msg/motd", config_dir);
1495
    snprintf(motdfilename, sizeof(motdfilename), "%s/msg/motd", config_dir);
1490
    if ((fd = open(motdfilename, O_RDONLY, 0)) != -1) {
1496
    if ((fd = open(motdfilename, O_RDONLY, 0)) != -1) {
Lines 4552-4560 cmd_netscape(tag) Link Here
4552
    url = config_getstring(IMAPOPT_NETSCAPEURL);
4558
    url = config_getstring(IMAPOPT_NETSCAPEURL);
4553
4559
4554
    /* I only know of three things to reply with: */
4560
    /* I only know of three things to reply with: */
4561
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
4555
    prot_printf(proxyd_out,
4562
    prot_printf(proxyd_out,
4556
"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP proxy\r\n* VERSION %s\r\n",
4563
"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP proxy\r\n* VERSION %s\r\n",
4557
		CYRUS_VERSION);
4564
		CYRUS_VERSION);
4565
    }
4566
    else {
4567
    prot_printf(proxyd_out,
4568
"* OK [NETSCAPE] Carnegie Mellon Cyrus IMAP proxy\r\n*");
4569
    }
4558
    prot_printf(proxyd_out,
4570
    prot_printf(proxyd_out,
4559
		"* ACCOUNT-URL %s\r\n%s OK %s\r\n",
4571
		"* ACCOUNT-URL %s\r\n%s OK %s\r\n",
4560
		url, tag, error_message(IMAP_OK_COMPLETED));
4572
		url, tag, error_message(IMAP_OK_COMPLETED));
(-)cyrus-imapd-2.2.12.orig/imap/version.c (+9 lines)
Lines 63-68 Link Here
63
#include "lock.h"
63
#include "lock.h"
64
#include "nonblock.h"
64
#include "nonblock.h"
65
#include "idle.h"
65
#include "idle.h"
66
#include "global.h"
66
67
67
#ifdef USE_SIEVE
68
#ifdef USE_SIEVE
68
#include "sieve_interface.h"
69
#include "sieve_interface.h"
Lines 95-106 void id_response(struct protstream *pout Link Here
95
    int sasl_ver;
96
    int sasl_ver;
96
    char env_buf[MAXIDVALUELEN+1];
97
    char env_buf[MAXIDVALUELEN+1];
97
98
99
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
98
    prot_printf(pout, "* ID ("
100
    prot_printf(pout, "* ID ("
99
		"\"name\" \"Cyrus IMAPD\""
101
		"\"name\" \"Cyrus IMAPD\""
100
		" \"version\" \"%s %s\""
102
		" \"version\" \"%s %s\""
101
		" \"vendor\" \"Project Cyrus\""
103
		" \"vendor\" \"Project Cyrus\""
102
		" \"support-url\" \"http://asg.web.cmu.edu/cyrus\"",
104
		" \"support-url\" \"http://asg.web.cmu.edu/cyrus\"",
103
		CYRUS_VERSION, CYRUS_CVSDATE);
105
		CYRUS_VERSION, CYRUS_CVSDATE);
106
    }
107
    else {
108
    prot_printf(pout, "* ID ("
109
		"\"name\" \"Cyrus IMAPD\""
110
		" \"vendor\" \"Project Cyrus\""
111
		" \"support-url\" \"http://asg.web.cmu.edu/cyrus\"");
112
    }
104
113
105
    /* add the os info */
114
    /* add the os info */
106
    if (uname(&os) != -1)
115
    if (uname(&os) != -1)
(-)cyrus-imapd-2.2.12.orig/timsieved/actions.c (+5 lines)
Lines 166-173 int capabilities(struct protstream *conn Link Here
166
    unsigned mechcount;
166
    unsigned mechcount;
167
167
168
    /* implementation */
168
    /* implementation */
169
    if (config_getswitch(IMAPOPT_SHOWSERVERVER)) {
169
    prot_printf(conn, "\"IMPLEMENTATION\" \"Cyrus timsieved %s\"\r\n",
170
    prot_printf(conn, "\"IMPLEMENTATION\" \"Cyrus timsieved %s\"\r\n",
170
		CYRUS_VERSION);
171
		CYRUS_VERSION);
172
    }
173
    else {
174
    prot_printf(conn, "\"IMPLEMENTATION\" \"Cyrus timsieved\"\r\n");
175
    }
171
    
176
    
172
    /* SASL */
177
    /* SASL */
173
    if (!authenticated &&
178
    if (!authenticated &&

Return to bug 6902