Skip to content
Snippets Groups Projects
Commit 583789f0 authored by Rob Swindell's avatar Rob Swindell :speech_balloon:
Browse files

Include sent mail messages in "mail" newsgroup too

parent 19557fbb
No related branches found
No related tags found
No related merge requests found
...@@ -15,7 +15,7 @@ ...@@ -15,7 +15,7 @@
// -d debug output // -d debug output
// -f filter bogus client IP addresses // -f filter bogus client IP addresses
// -na no anonymous logins (requires user authentication) // -na no anonymous logins (requires user authentication)
// -mail expose user's email in "mail" newsgroup to non-Guest users // -mail expose non-Guest user's sent/received email in "mail" newsgroup
// -nolimit unlimited message lengths // -nolimit unlimited message lengths
// -notag do not append tear/tagline to local messages for Q-rest accounts // -notag do not append tear/tagline to local messages for Q-rest accounts
// -ascii convert ex-ASCII to ASCII // -ascii convert ex-ASCII to ASCII
...@@ -142,7 +142,7 @@ function count_msgs(msgbase) ...@@ -142,7 +142,7 @@ function count_msgs(msgbase)
if(idx.attr&MSG_VOTE) if(idx.attr&MSG_VOTE)
continue; continue;
if(msgbase.attributes & SMB_EMAIL) { if(msgbase.attributes & SMB_EMAIL) {
if(idx.to != user.number) if(idx.to != user.number && idx.from != user.number)
continue; continue;
} }
if(first == 0) if(first == 0)
...@@ -524,7 +524,7 @@ while(client.socket.is_connected && !quit) { ...@@ -524,7 +524,7 @@ while(client.socket.is_connected && !quit) {
if(idx.attr&MSG_VOTE) if(idx.attr&MSG_VOTE)
continue; continue;
if(msgbase.attributes & SMB_EMAIL) { if(msgbase.attributes & SMB_EMAIL) {
if(idx.to != user.number) if(idx.to != user.number && idx.from != user.number)
continue; continue;
} }
writeln(idx.number); writeln(idx.number);
...@@ -570,7 +570,7 @@ while(client.socket.is_connected && !quit) { ...@@ -570,7 +570,7 @@ while(client.socket.is_connected && !quit) {
if(hdr.attr&MSG_VOTE) if(hdr.attr&MSG_VOTE)
continue; continue;
if(msgbase.attributes & SMB_EMAIL) { if(msgbase.attributes & SMB_EMAIL) {
if(hdr.to_ext != user.number) if(hdr.to_ext != user.number && hdr.from_ext != user.number)
continue; continue;
} }
writeln(format("%u\t%s\t%s\t%s\t%s\t%s\t%u\t%u\tXref:%s" writeln(format("%u\t%s\t%s\t%s\t%s\t%s\t%u\t%u\tXref:%s"
...@@ -624,7 +624,7 @@ while(client.socket.is_connected && !quit) { ...@@ -624,7 +624,7 @@ while(client.socket.is_connected && !quit) {
if(hdr.attr&MSG_VOTE) if(hdr.attr&MSG_VOTE)
continue; continue;
if(msgbase.attributes & SMB_EMAIL) { if(msgbase.attributes & SMB_EMAIL) {
if(hdr.to_ext != user.number) if(hdr.to_ext != user.number && hdr.from_ext != user.number)
continue; continue;
} }
var field=""; var field="";
...@@ -734,7 +734,7 @@ while(client.socket.is_connected && !quit) { ...@@ -734,7 +734,7 @@ while(client.socket.is_connected && !quit) {
break; break;
} }
if(msgbase.attributes & SMB_EMAIL) { if(msgbase.attributes & SMB_EMAIL) {
if(hdr.to_ext != user.number) { if(hdr.to_ext != user.number && hdr.from_ext != user.number) {
writeln("430 message not for you"); writeln("430 message not for you");
break; break;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment