[hamradio-commits] [axmail] 01/04: New upstream version 2.6

Dave Hibberd hibby-guest at moszumanska.debian.org
Sat Jan 21 16:14:01 UTC 2017


This is an automated email from the git hooks/post-receive script.

hibby-guest pushed a commit to branch master
in repository axmail.

commit 67523791d98833f86d5c6b75d8c8dc3b56417f3b
Author: Hibby <d at vehibberd.com>
Date:   Sat Jan 21 16:08:55 2017 +0000

    New upstream version 2.6
---
 INSTALL              |  5 +++--
 README               | 25 +++++++++++++++++++++++++
 defines.h            |  4 ++--
 etc/help/bye.hlp     |  6 ++++++
 etc/help/cancel.hlp  |  7 +++++++
 etc/help/exit.hlp    |  6 ++++++
 etc/help/list.hlp    |  7 +++++++
 etc/help/name.hlp    |  7 +++++++
 etc/help/quit.hlp    |  6 ++++++
 etc/help/read.hlp    |  7 +++++++
 etc/help/sreply.hlp  |  7 +++++++
 etc/help/status.hlp  | 10 ++++++++++
 etc/help/unkill.hlp  | 10 ++++++++++
 etc/help/verbose.hlp | 11 +++++++++++
 mailcmd.c            | 48 +++++++++++++++++++++++++++++++++---------------
 mbox.c               |  4 ++++
 quit.c               |  2 +-
 17 files changed, 152 insertions(+), 20 deletions(-)

diff --git a/INSTALL b/INSTALL
index 14f70e8..7728844 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,4 +1,5 @@
-axMail v2.2 - an SMTP mailbox for the various linux node frontends.
+axMail - an SMTP mailbox for the various linux node frontends
+         and outbound FAX engine.
 
 Current author: Brian Rogers (N1URO) <n1uro at n1uro.com>
 Past author: Marius Petrescu (YO2LOJ) <mpetrescu at online.ro>
@@ -53,7 +54,7 @@ favorite editor open node.conf and add the following line to your ExtCmds:
 ExtCmd          MAil    1       root    /usr/local/sbin/axmail axmail %u
 (note: MA in the word MAil is in CAPS)
 
-Save node.conf and telnet in to test! It should work just fine. Since you 
+Save uronode.conf and telnet in to test! It should work just fine. Since you 
 would have an existing account on your server, it's unlikely that you'll 
 get the welcome message, but since you can edit it, you'll know what it 
 says :)
diff --git a/README b/README
index 55cb4a3..4642fa1 100644
--- a/README
+++ b/README
@@ -24,6 +24,31 @@ false perception as to what it can and/or can not do. axMail just might
 not be what you're looking for or expecting for a node based plugin
 
 CHANGE HISTORY:
+axmail 2.6
+  Updated 22 September, 2016 by Brian Rogers (N1URO) <n1uro at n1uro.net>
+- changed version number in defines.h
+- fixed error message when a pop client has deleted mail from the
+  main mail spool file.
+- removed excessive receipt warning spotted by a gent who identifies 
+  himself as rigor. This was in mailcmd.c in do_readmsg()
+- while looking at the end of that routine, it just gave me an itch that
+  said "if you can look for a warning about a requested receipt, then
+  numbnutz you can offer the reader a chance to just generate a receipt
+  without having to do "SR" as previously stated at the end of the mail.
+  So, with that said and to get feeling back in my genitals, I wrote a
+  routine that asks the reader if they wish to send a receipt, and it
+  also echos where it's destined and confirmation it was sent.
+- added an "--- end of message #* ---" tag at the end of mail when it
+  as finished displaying. This was done in mailcmd.c
+- fixed an existing bug in the message routines where for each message
+  it wasn't resetting the receipt pointer! This bug existed since I
+  introduced the receipt "finder" in the messages. I'm shocked that
+  it wasn't reported to me by someone earlier. Now *only* if a message
+  has requested a receipt will it show that a receipt has been asked
+  for... whew!
+- So many missing online help files! Again I'm surprised no one brought
+  this to my attention. How did we get along with them? "Oh my!" - Sulu
+- Updated this README file.
 axmail v2.5.1
   Updated 28 September, 2015 by Brian Rogers (N1URO) <n1uro at n1uro.net>
 - added axmail.8 man page as per spec of Debian downstream.
diff --git a/defines.h b/defines.h
index a885fe8..3040263 100644
--- a/defines.h
+++ b/defines.h
@@ -3,8 +3,8 @@
   *	defines.h - Compile-time configuration
   */
 
-#define VERSION "axMail-Fax v2.5.1"
-#define COPYRIGHT "(c) 1996, 1998 Heikki Hannikainen (OH7LZB) <hessu at hes.iki.fi>\nMailbox save support (c) 2003 Marius Petrescu (YO2LOJ) <mpetrescu at online.ro>\nOther modifications (c) 2005, 2006, 2015 by Brian Rogers (N1URO) <n1uro at n1uro.net> "
+#define VERSION "axMail-Fax v2.6"
+#define COPYRIGHT "(c) 1996-1998 Heikki Hannikainen (OH7LZB) <hessu at hes.iki.fi>\nMailbox save support (c) 2003 Marius Petrescu (YO2LOJ) <mpetrescu at online.ro>\nOther modifications (c) 2005-2016 by Brian Rogers (N1URO) <n1uro at n1uro.net> "
 #define PROMPT "=> "
 
 #define CONF_AXMAIL_FILE "/usr/local/etc/ax25/axmail.conf"
diff --git a/etc/help/bye.hlp b/etc/help/bye.hlp
new file mode 100644
index 0000000..4f794b7
--- /dev/null
+++ b/etc/help/bye.hlp
@@ -0,0 +1,6 @@
+USAGE
+        bye | exit | quit
+
+DESCRIPTION
+        Any of these commands will exit axMail-FAX and preserve any
+	mail that you haven't killed or deleted. 
diff --git a/etc/help/cancel.hlp b/etc/help/cancel.hlp
new file mode 100644
index 0000000..6dc508b
--- /dev/null
+++ b/etc/help/cancel.hlp
@@ -0,0 +1,7 @@
+USAGE
+        Cancel
+
+DESCRIPTION
+        When you choose to Cancel out of the mailbox, any changes you
+	have done to your axMail-FAX mail file will NOT be saved and
+	you will be logged out of the axMail-FAX system.
diff --git a/etc/help/exit.hlp b/etc/help/exit.hlp
new file mode 100644
index 0000000..4f794b7
--- /dev/null
+++ b/etc/help/exit.hlp
@@ -0,0 +1,6 @@
+USAGE
+        bye | exit | quit
+
+DESCRIPTION
+        Any of these commands will exit axMail-FAX and preserve any
+	mail that you haven't killed or deleted. 
diff --git a/etc/help/list.hlp b/etc/help/list.hlp
new file mode 100644
index 0000000..5f95868
--- /dev/null
+++ b/etc/help/list.hlp
@@ -0,0 +1,7 @@
+USAGE
+        list
+
+DESCRIPTION
+	Use this command to list your mail messages. Each message will
+	be flagged as N(ew), U(nread), or blank for read. Use the "read"
+	command to read each message.
diff --git a/etc/help/name.hlp b/etc/help/name.hlp
new file mode 100644
index 0000000..3e9af77
--- /dev/null
+++ b/etc/help/name.hlp
@@ -0,0 +1,7 @@
+USAGE
+        name
+
+DESCRIPTION
+	Use the Name command to change your "Real name" within the mail
+	server system. It will automatically be appended to your email
+	address when you send mail out.
diff --git a/etc/help/quit.hlp b/etc/help/quit.hlp
new file mode 100644
index 0000000..4f794b7
--- /dev/null
+++ b/etc/help/quit.hlp
@@ -0,0 +1,6 @@
+USAGE
+        bye | exit | quit
+
+DESCRIPTION
+        Any of these commands will exit axMail-FAX and preserve any
+	mail that you haven't killed or deleted. 
diff --git a/etc/help/read.hlp b/etc/help/read.hlp
new file mode 100644
index 0000000..b0535ed
--- /dev/null
+++ b/etc/help/read.hlp
@@ -0,0 +1,7 @@
+USAGE
+        read <msg #>
+
+DESCRIPTION
+	Use this command to read your mail. This command requires a
+	parameter of a message number to read. Ex: to read your mail
+	message 3 you would enter: R 3.
diff --git a/etc/help/sreply.hlp b/etc/help/sreply.hlp
new file mode 100644
index 0000000..a02dca0
--- /dev/null
+++ b/etc/help/sreply.hlp
@@ -0,0 +1,7 @@
+USAGE
+        SReply (short for "send reply")
+
+DESCRIPTION
+	This command allows you to send a reply to the message number
+	the prompt tells you that you're on. Subject and destination
+	will be preserved. 
diff --git a/etc/help/status.hlp b/etc/help/status.hlp
new file mode 100644
index 0000000..490e88f
--- /dev/null
+++ b/etc/help/status.hlp
@@ -0,0 +1,10 @@
+USAGE
+        status
+
+DESCRIPTION
+	The STatus command shows you a very shortened list by only 
+	informing you just how many total messages you have by a
+	grand total number.  Ex:
+	status	
+	Messages: 4
+
diff --git a/etc/help/unkill.hlp b/etc/help/unkill.hlp
new file mode 100644
index 0000000..8810c29
--- /dev/null
+++ b/etc/help/unkill.hlp
@@ -0,0 +1,10 @@
+USAGE
+        unkill <msg #>
+
+DESCRIPTION
+	The Unkill commmand allows you to reflag a killed message as
+	valid so that it may be retrieved later if you wish to reread
+	it. This comes in very handy in the event you accidentally kill
+	or delete a mail message. Mail does NOT get fully killed until
+	you exit the axMail-FAX mailbox, and your settings are changed
+	and saved.
diff --git a/etc/help/verbose.hlp b/etc/help/verbose.hlp
new file mode 100644
index 0000000..b37fe0e
--- /dev/null
+++ b/etc/help/verbose.hlp
@@ -0,0 +1,11 @@
+USAGE
+	Verbose <msg #>
+
+DESCRIPTION
+	Like with the Read command, verbose will print out the full mail
+	headers along with the body of the message. This command requires
+	a parameter consisting of the message number you wish to read.
+	Ex: V 3 will verbosely print message #3 including all mail
+	headers. This can be quite lengthy but also can be quite
+	handy if you're trying to find out if someone else's mail
+	account may have been compromised or spoofed.
diff --git a/mailcmd.c b/mailcmd.c
index c3474e9..77baf63 100644
--- a/mailcmd.c
+++ b/mailcmd.c
@@ -56,8 +56,13 @@ int do_read(int argc, char **argv)
 	int myargc, argsmine;
 	char *tmpbuf;
 	int i;
+	struct message *m;
 	int msg, maxmsg;
 
+//	Automatic Receipt generator
+	FILE *f;
+	char str [LINESIZE + 1];
+
 	if (!(messages)) {
 		printf("You have no messages.\n");
 		return 0;
@@ -83,7 +88,7 @@ int do_read(int argc, char **argv)
 
 	for (i = 1; i < myargc; i++) {
 		tmpbuf = strchr(myargv[i], '-');
-		msg = atoi(myargv[i]);
+ 		msg = atoi(myargv[i]);
 		if (tmpbuf == NULL)
 			maxmsg = msg;
 		else
@@ -98,23 +103,36 @@ int do_read(int argc, char **argv)
 				continue;
 			}
 			readmesg(msg, (!strncmp(argv[0], "v", 1)));
-			printf("\n");
+			printf("--- end of message #%i --- \n", msg);
 			if (dot->receipt != NULL) {
-			printf("\aA receipt was asked for. Use the SR command to make one.\n");
+				getstr(str, LINESIZE, "\aA receipt was asked for, do we send one? (y/N): ");
+				if (!strcasecmp(str, "Y") || !strcasecmp (str, "YES") || !strcasecmp (str, "YE")) {
+                                /* Let's try to automate the receipt generator more */
+                                f = fopen(tempMesg, "w");
+                                fprintf(f, "From: %s <%s@%s>\n", fullname, username, hostname);
+                                strncpy (str, dot->from, LINESIZE);
+                                printf("Receipt going to: %s\n", str);
+                                fprintf(f,"To: %s\n", str);
+                                fprintf(f,"X-Mailer: %s\n",VERSION);
+                                fprintf(f,"X-Origin: Amateur Radio Services\n");
+                                fprintf(f,"Subject: axMail-FAX read receipt for \"%s\"\n", dot->subj);
+                                strncpy (str, dot->subj, LINESIZE);
+                                fprintf(f, "Your mail to %s <%s@%s> about \"%s\"\n", fullname, username, hostname, dot->subj);
+				fprintf(f,"written on %s has been read.\n\n", dot->date);
+				fprintf(f, "\n-----\nThis receipt is sent via axMail-FAX: Not your Elmer\'s Wlink!\n");
+                                fclose(f);
+	                        sprintf(str, "%s -oem -t < %s", BIN_AXMAIL_SENDMAIL, tempMesg);
+        	                system(str);
+                	        printf("Read receipt sent.\n");
+                		}
 			}
 		}
+
 	}
-	
 	if (argsmine)
 		for (i = 1; i < myargc; i++)
 			free(myargv[i]);
-
 	return 0;
-	                          if (dot->receipt != NULL) {
-                                printf("Receipt is needed\n");
-                                return 0;
-			}
-
 }
 
 /* Send a message (perhaps a reply) */
@@ -493,12 +511,12 @@ retry:
         getstr(str, LINESIZE, "Deliver (Y/n/c/?): ");
         if (!strcmp(str, "?")) {
                 printf("Answering \"N\" here will cancel the message. Answering \"C\" will\n");
-                printf("let you continue writing the message. Answering anything else will\n");
-                printf("proceed with delivering the message to the recipient.\n");
+                printf("let you continue writing the facsimile. Answering anything else will\n");
+                printf("proceed with delivering the facsimile to the recipient.\n");
                 goto retry;
         }
         if (!strcasecmp(str, "c")) {
-                printf("Continue entering message text\n(end with \"/ex\" or \".\" on a line by itself):\n");
+                printf("Continue entering facsimile text\n(end with \"/ex\" or \".\" on a line by itself):\n");
                 fflush(stdout);
                 goto cont;
         }
@@ -512,9 +530,9 @@ retry:
         if (strcasecmp(str, "n")) {
                 sprintf(str, "%s -oem -t < %s", BIN_AXMAIL_SENDMAIL, tempMesg);
                 system(str);
-                printf("Message sent.\n");
+                printf("Facsimile sent.\n");
         } else
-                printf("Message canceled.\n");
+                printf("Facsimile canceled.\n");
 
         if (remove(tempMesg)) {
                 printf("Ouch, could not remove temporary file.\n");
diff --git a/mbox.c b/mbox.c
index b1df805..3fedce1 100644
--- a/mbox.c
+++ b/mbox.c
@@ -221,6 +221,7 @@ rdexit:
 			this.m_size = 0;
 			this.m_lines = 0;
 			this.m_offset = offset;
+			this.receipt = NULL;
 			this.subj = NULL;
 			this.from = NULL;
 			this.date = NULL;
@@ -293,6 +294,8 @@ int readmesg(int msg, int verbose)
 	int inhdr = 1;
 	char buf[LINESIZE];
 	
+
+
 	if ((msg < 1) || (msg > messages)) {
 		printf("There's no message %i.\n", msg);
 		return -1;
@@ -336,6 +339,7 @@ int readmesg(int msg, int verbose)
 			    (!strncasecmp(buf, "From:", 5)) ||
 			    (!strncasecmp(buf, "To:", 3)) ||
 			    (!strncasecmp(buf, "Cc:", 3)) ||
+//			    (!strncasecmp(buf, "Disposition-Notification-To:", 3)) ||
 			    (!strncasecmp(buf, "Subject:", 8)))
 				printf("%s", buf);
 
diff --git a/quit.c b/quit.c
index ff46a1a..2aa69a2 100644
--- a/quit.c
+++ b/quit.c
@@ -54,7 +54,7 @@ int save_mbox(void)
 	mblen = ftell(mb);
 	
 	if (mblen < sysboxlen) {
-	    printf("Mailbox changed by another program. Mailbox not saved.");
+	    printf("Mailbox changed by another program. Mailbox not saved.\n");
 	    unlock_fd(fileno(mb));
 	    fclose(mb);
 	    return -1;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-hamradio/axmail.git



More information about the pkg-hamradio-commits mailing list