mirror of
https://github.com/bobbimanners/emailler.git
synced 2024-05-28 05:41:28 +00:00
Fix default NNTP port and allow skipping of client authentication to NNTP server
This commit is contained in:
parent
07bc9b40d8
commit
332a5bb7e1
|
@ -369,7 +369,7 @@ void readconfigfile(void) {
|
|||
|
||||
colon = strchr(cfg_server, ':');
|
||||
if (!colon)
|
||||
nntp_port = 110;
|
||||
nntp_port = 119;
|
||||
else
|
||||
nntp_port = atoi(colon + 1);
|
||||
}
|
||||
|
@ -645,6 +645,8 @@ sendmessage:
|
|||
if (expect(buf, "200 ")) // "200" if posting is allowed
|
||||
error_exit();
|
||||
|
||||
// Skip authentication?
|
||||
if (strcmp(cfg_user, "-") != 0) {
|
||||
sprintf(sendbuf, "AUTHINFO USER %s\r\n", cfg_user);
|
||||
if (!w5100_tcp_send_recv(sendbuf, buf, NETBUFSZ, DO_SEND, CMD_MODE)) {
|
||||
error_exit();
|
||||
|
@ -658,6 +660,7 @@ sendmessage:
|
|||
}
|
||||
if (expect(buf, "281")) // Authentication successful
|
||||
error_exit();
|
||||
}
|
||||
|
||||
connected = 1;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user