Greetings,
I recently upgraded from nmh-1.0 to nmh-1.0.3 (due to
the security advisory.)
Since upgrading, I've been getting the following errors
while attempting to process some MIME messages:
1) part 2 text/x-vcard 324 Card for Douglas Dalrymple
Press <return> to show content...
Syntax error: Unterminated quoted string
exit 2
and
2) line 1/10 (END)Segmentation fault (core dumped)
(2) appears to be due to the testing of an unset pointer in
mhshowsbr.c:show_multi_aux(). (1) appears to be caused by
mis-quoting a filename being handed to the shell in
mhshowsbr.c:show_content_aux().
Resolving the pointer reference issue in mhshowsbr.c:show_multi_aux().
turned up a similar mis-quoting problem in the routine.
I've attached my patch to mhshowsbr.c, my .mh_profile, and the
two example messages I used to debug and test the patch.
Thanks,
Eric Schnoebelen
--
Eric Schnoebelen [EMAIL PROTECTED] http://www.cirr.com
And just remember -- a sucking chest wound is Nature's way of telling
you to stay out of a firefight... -- Mary Gentle, Grunts, p.317
--- uip/mhshowsbr.c.orig Sun Mar 26 19:43:12 2000
+++ uip/mhshowsbr.c Tue Mar 28 16:29:47 2000
@@ -405,7 +405,16 @@
case 'f':
/* insert filename containing content */
- snprintf (bp, buflen, "%s", file);
+ snprintf (bp, buflen, "'%s'", file);
+ /* since we've quoted the file argument, set things up
+ * to look past it, to avoid problems with the quoting
+ * logic below. (I know, I should figure out what's
+ * broken with the quoting logic, but..)
+ */
+ len = strlen(bp);
+ buflen -= len;
+ bp += len;
+ pp = bp;
break;
case 'p':
@@ -869,8 +878,9 @@
quoted = 0;
/* Now parse display string */
- for ( ; *cp; cp++) {
+ for ( ; *cp && buflen > 0; cp++) {
if (*cp == '%') {
+ pp = bp;
switch (*++cp) {
case 'a':
/* insert parameters from Content-Type field */
@@ -923,6 +933,10 @@
buflen -= len;
s = " ";
}
+ /* set our starting pointer back to bp, to avoid
+ * requoting the filenames we just added
+ */
+ pp = bp;
}
break;
Path: Mail
Editor: mhvi
Aliasfile: lib/aliases
Folder-Protect: 0711
Msg-Protect: 0600
Draft-Folder: drafts
showproc: /usr/bin/less
moreproc: /usr/bin/less
Alternate-Mailboxes: [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED], [EMAIL PROTECTED],
[EMAIL PROTECTED], [EMAIL PROTECTED]
comp: -form lib/components
show: -noheader
repl: -cc all -nocc me -fcc +trashbox -filter lib/repl.format -form lib/replcomps
forw: -form lib/forwcomps
newsspam: -form lib/forw.newsspam
mailspam: -form lib/forw.mailspam
rmf: -interactive
mhshow-show-application/pdf: %pxpdf -err %F
mhshow-show-message/delivery-status: %pless %F
mhshow-show-application/x-pgp: %pless %F
mhshow-show-application/pgp: %pless %F
mhshow-show-application/report: %pless %F
mhshow-show-image/jpeg: %pshowpicture %F
mhshow-show-image/jpg: %pshowpicture %F
mhshow-show-image/gif: %pshowpicture %F
mhshow-show-image/tiff: %pshowpicture %F
mhshow-show-image/tif: %pshowpicture %F
mhshow-show-image/x-ms-bmp: %pxv %F
mhshow-show-image/bmp: %pxv %F
mhshow-show-text/plain: %pless '%F'
mhshow-show-text/rfc822: %pless '%F'
mhshow-show-text/x-pgp: %pless %F
mhshow-show-text/enriched: %pless %F
mhshow-show-text/report: %pless %F
mhshow-show-text/x-vcard: %pless %F
mhshow-show-text/html: %plynx -force_html file://%F
mhshow-show-message/news: %pless %F
mhshow-show-multipart/report: %pless %F
mhshow-show-multipart/signed: %pless %F
mhshow-show-x-sun-attachment/: %pless %F
mhshow-charset-iso-8859-1: %s
Check the documentation at:
http://www.billmax.com/doc/docs/II.E.7.a.1.html
for configuration information.
"Jeffrey D. LaCoursiere" wrote:
>
(snip)
> The second hurdle is getting ICVerify to export the result file in the
> format we are looking for. I think Doug has played more with this than I;
> maybe he can fill in some pointers to look for.
>
> Thanks,
>
> Jeff LaCoursiere
> BillMax ISP Billing Solutions
> The iSpark Group, Inc.
begin:vcard
n:Dalrymple;Douglas
tel;work:817-429-5263
x-mozilla-html:FALSE
url:http://www.billmax.com
org:FastLane Communications, Inc
version:2.1
email;internet:[EMAIL PROTECTED]
title:Systems Integrator
adr;quoted-printable:;;307 West 7th Street=0D=0ASuite 850=0D=0A;Fort Worth;TX;76102;US
fn:Douglas Dalrymple
end:vcard
----- The following recipients were processed by MTA mail14.prontomail.com ...
[EMAIL PROTECTED]; Action: Failed; Status: 5.2.2 (mailbox full)
Reporting-MTA: dns; mail14.prontomail.com
Received-from-MTA: smtp; mail14.prontomail.com (Local)
Arrival-Date: Wed, 22 Mar 2000 23:46:21 -0800
Final-Recipient: rfc822; [EMAIL PROTECTED]
Action: Failed
Status: 5.2.2 (mailbox full)
--
>>>> This is a multi-part message in MIME format.
**** Command 'this' not recognized.
>>>>
>>>> ------=_NextPart_000_0025_01BF949A.664F2300
**** Command '------=_nextpart_000_0025_01bf949a.664f2300' not recognized.
>>>> Content-Type: text/plain;
**** Command 'content-type:' not recognized.
>>>> charset="iso-8859-1"
**** Command 'charset="iso-8859-1"' not recognized.
>>>> Content-Transfer-Encoding: quoted-printable
**** Command 'content-transfer-encoding:' not recognized.
>>>>
>>>> subscribe * india times
**** The address you supplied, india times
**** does not seem to be a legal Internet address. You may have supplied
**** your full name instead of your address, or you may have included your
**** name along with your address in a manner that does not comply with
**** Internet standards for addresses.
**** It is also possible that you are using a mailer that wraps long lines
**** and the end of your request ended up on the following line. If the
**** latter is true, try using backslashes to split long lines. (Split the
**** line between words, then put a backslash at the end of all but the
**** last line.)
**** subscribe: invalid address 'india times'
>>>>
>>>> ------=_NextPart_000_0025_01BF949A.664F2300
**** Command '------=_nextpart_000_0025_01bf949a.664f2300' not recognized.
>>>> Content-Type: text/html;
**** Command 'content-type:' not recognized.
>>>> charset="iso-8859-1"
**** Command 'charset="iso-8859-1"' not recognized.
>>>> Content-Transfer-Encoding: quoted-printable
**** Command 'content-transfer-encoding:' not recognized.
>>>>
>>>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
**** Command '<!doctype' not recognized.
>>>> <HTML><HEAD>
**** Command '<html><head>' not recognized.
>>>> <META content=3D"text/html; charset=3Diso-8859-1" =
**** Command '<meta' not recognized.
>>>> http-equiv=3DContent-Type>
**** Command 'http-equiv=3dcontent-type>' not recognized.
>>>> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR>
**** Command '<meta' not recognized.
>>>> <STYLE></STYLE>
**** Command '<style></style>' not recognized.
>>>> </HEAD>
**** Command '</head>' not recognized.
>>>> <BODY bgColor=3D#ffffff>
**** Command '<body' not recognized.
>>>> <DIV>subscribe * india times</DIV></BODY></HTML>
**** Command '<div>subscribe' not recognized.
>>>>
>>>> ------=_NextPart_000_0025_01BF949A.664F2300--
**** Command '------=_nextpart_000_0025_01bf949a.664f2300--' not recognized.
>>>>
**** Help for [EMAIL PROTECTED]:
This help message is being sent to you from the Majordomo mailing list
management system at [EMAIL PROTECTED]
This is version 1.94.4-cirr-2 of Majordomo.
If you're familiar with mail servers, an advanced user's summary of
Majordomo's commands appears at the end of this message.
Majordomo is an automated system which allows users to subscribe
and unsubscribe to mailing lists, and to retrieve files from list
archives.
You can interact with the Majordomo software by sending it commands
in the body of mail messages addressed to "[EMAIL PROTECTED]".
Please do not put your commands on the subject line; Majordomo does
not process commands in the subject line.
You may put multiple Majordomo commands in the same mail message.
Put each command on a line by itself.
If you use a "signature block" at the end of your mail, Majordomo may
mistakenly believe each line of your message is a command; you will
then receive spurious error messages. To keep this from happening,
either put a line starting with a hyphen ("-") before your signature,
or put a line with just the word
end
on it in the same place. This will stop the Majordomo software from
processing your signature as bad commands.
Here are some of the things you can do using Majordomo:
I. FINDING OUT WHICH LISTS ARE ON THIS SYSTEM
To get a list of publicly-available mailing lists on this system, put the
following line in the body of your mail message to [EMAIL PROTECTED]:
lists
Each line will contain the name of a mailing list and a brief description
of the list.
To get more information about a particular list, use the "info" command,
supplying the name of the list. For example, if the name of the list
about which you wish information is "demo-list", you would put the line
info demo-list
in the body of the mail message.
II. SUBSCRIBING TO A LIST
Once you've determined that you wish to subscribe to one or more lists on
this system, you can send commands to Majordomo to have it add you to the
list, so you can begin receiving mailings.
To receive list mail at the address from which you're sending your mail,
simply say "subscribe" followed by the list's name:
subscribe demo-list
If for some reason you wish to have the mailings go to a different address
(a friend's address, a specific other system on which you have an account,
or an address which is more correct than the one that automatically appears
in the "From:" header on the mail you send), you would add that address to
the command. For instance, if you're sending a request from your work
account, but wish to receive "demo-list" mail at your personal account
(for which we will use "[EMAIL PROTECTED]" as an example), you'd put
the line
subscribe demo-list [EMAIL PROTECTED]
in the mail message body.
Based on configuration decisions made by the list owners, you may be added
to the mailing list automatically. You may also receive notification
that an authorization key is required for subscription. Another message
will be sent to the address to be subscribed (which may or may not be the
same as yours) containing the key, and directing the user to send a
command found in that message back to [EMAIL PROTECTED] (This can be
a bit of extra hassle, but it helps keep you from being swamped in extra
email by someone who forged requests from your address.) You may also
get a message that your subscription is being forwarded to the list owner
for approval; some lists have waiting lists, or policies about who may
subscribe. If your request is forwarded for approval, the list owner
should contact you soon after your request.
Upon subscribing, you should receive an introductory message, containing
list policies and features. Save this message for future reference; it
will also contain exact directions for unsubscribing. If you lose the
intro mail and would like another copy of the policies, send this message
to [EMAIL PROTECTED]:
intro demo-list
(substituting, of course, the real name of your list for "demo-list").
III. UNSUBSCRIBING FROM MAILING LISTS
Your original intro message contains the exact command which should be
used to remove your address from the list. However, in most cases, you
may simply send the command "unsubscribe" followed by the list name:
unsubscribe demo-list
(This command may fail if your provider has changed the way your
address is shown in your mail.)
To remove an address other than the one from which you're sending
the request, give that address in the command:
unsubscribe demo-list [EMAIL PROTECTED]
In either of these cases, you can tell [EMAIL PROTECTED] to remove
the address in question from all lists on this server by using "*"
in place of the list name:
unsubscribe *
unsubscribe * [EMAIL PROTECTED]
IV. FINDING THE LISTS TO WHICH AN ADDRESS IS SUBSCRIBED
To find the lists to which your address is subscribed, send this command
in the body of a mail message to [EMAIL PROTECTED]:
which
You can look for other addresses, or parts of an address, by specifying
the text for which Majordomo should search. For instance, to find which
users at my-isp.com are subscribed to which lists, you might send the
command
which my-isp.com
Note that many list owners completely or fully disable the "which"
command, considering it a privacy violation.
V. FINDING OUT WHO'S SUBSCRIBED TO A LIST
To get a list of the addresses on a particular list, you may use the
"who" command, followed by the name of the list:
who demo-list
Note that many list owners allow only a list's subscribers to use the
"who" command, or disable it completely, believing it to be a privacy
violation.
VI. RETRIEVING FILES FROM A LIST'S ARCHIVES
Many list owners keep archives of files associated with a list. These
may include:
- back issues of the list
- help files, user profiles, and other documents associated with the list
- daily, monthly, or yearly archives for the list
To find out if a list has any files associated with it, use the "index"
command:
index demo-list
If you see files in which you're interested, you may retrieve them by
using the "get" command and specifying the list name and archive filename.
For instance, to retrieve the files called "profile.form" (presumably a
form to fill out with your profile) and "demo-list.9611" (presumably the
messages posted to the list in November 1996), you would put the lines
get demo-list profile.form
get demo-list demo-list.9611
in your mail to [EMAIL PROTECTED]
VII. GETTING MORE HELP
To contact a human site manager, send mail to [EMAIL PROTECTED]
To contact the owner of a specific list, send mail to that list's
approval address, which is formed by adding "-approval" to the user-name
portion of the list's address. For instance, to contact the list owner
for [EMAIL PROTECTED], you would send mail to [EMAIL PROTECTED]
To get another copy of this help message, send mail to [EMAIL PROTECTED]
with a line saying
help
in the message body.
VIII. COMMAND SUMMARY FOR ADVANCED USERS
In the description below items contained in []'s are optional. When
providing the item, do not include the []'s around it. Items in angle
brackets, such as <address>, are meta-symbols that should be replaced
by appropriate text without the angle brackets.
It understands the following commands:
subscribe [<list>] [<address>]
Subscribe yourself (or <address> if specified) to the named <list>.
unsubscribe [<list>] [<address>]
Unsubscribe yourself (or <address> if specified) from the named <list>.
"unsubscribe *" will remove you (or <address>) from all lists. This
_may not_ work if you have subscribed using multiple addresses.
get [<list>] <filename>
Get a file related to <list>.
index [<list>]
Return an index of files you can "get" for <list>.
which [<address>]
Find out which lists you (or <address> if specified) are on.
who [<list>]
Find out who is on the named <list>.
info [<list>]
Retrieve the general introductory information for the named <list>.
intro [<list>]
Retrieve the introductory message sent to new users. Non-subscribers
may not be able to retrieve this.
lists
Show the lists served by this Majordomo server.
help
Retrieve this message.
end
Stop processing commands (useful if your mailer adds a signature).
Commands should be sent in the body of an email message to
"[EMAIL PROTECTED]" or to "<list>[EMAIL PROTECTED]".
The <list> parameter is only optional if the message is sent to an address
of the form "<list>[EMAIL PROTECTED]".
Multiple commands can be processed provided
each occurs on a separate line.
Commands in the "Subject:" line are NOT processed.
If you have any questions or problems, please contact
"[EMAIL PROTECTED]".