Subject: error during compile of mbxcvt

From: "Harondel J. Sibble" <[email-masked]>
Date: Sun, 02 Feb 2003 17:42:14 -0800

When I run a make in the mbxcvt directory, I get the following

 make
`cat ../imap/c-client/CCTYPE` -I../imap/c-client `cat ../imap/c-
client/CFLAGS` -o mbxcvt mbxcvt.o ../imap/c-client/c-client.a `cat ../imap/c-
client/LDFLAGS`
mbxcvt.o: In function `mm_login':
/usr/local/src/imap-2002b/mbxcvt/mbxcvt.c:357: the `gets' function is 
dangerous and should not be used.

Should I be concerned about the last line?
-- 
Harondel J. Sibble 
Sibble Computer Consulting
Creating solutions for the small business and home computer user.
[email-masked] (use pgp keyid 0x3AD5C11D) http://www.pdscc.com
(604) 739-3709 (voice/fax)      (604) 686-2253 (pager)

-- 
------------------------------------------------------------------
 For information about this mailing list, and its archives, see: 
 http://www.washington.edu/imap/c-client-list.html
------------------------------------------------------------------

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 Feb 2003 17:48:48 -0800 (PST)

> Should I be concerned about the last line?

No, you should not be.

It would be a concern if mbxcvt ran setuid to some other user or otherwise
with elevated privileges.  But it doesn't.

However, that leads to a different question; why are you using mbxcvt?
mailutil is bundled with imap-2002b and completely supercedes mbxcvt.

-- Mark --

http://staff.washington.edu/mrc
Science does not emerge from voting, party politics, or public debate.

---

From: "Harondel J. Sibble" <[email-masked]>
Date: Sun, 02 Feb 2003 18:14:28 -0800

> with elevated privileges.  But it doesn't.
About what I figured.

> mailutil is bundled with imap-2002b and completely supercedes mbxcvt.

I remember reading something about that when going through the docs, however 
the reason I am using mbxcvt is I am following the instructions here

http://linux-sxs.org/mbx.html

This was from the "changing location of mbx mailbox" thread from last week.

I decided to just go ahead with mbx in home dirs and work the cd backup 
around the change.

Is there a major advantage to using mailutil over mbxcvt?  On my test system 
mbxcvt seemed to work fine.  I am just about to run it on the real server 
with the user's mbox mailboxes some of which are up to 35mb+ in size.

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 Feb 2003 18:33:57 -0800 (Pacific Standard Time)

On Sun, 2 Feb 2003, Harondel J. Sibble wrote:
> Is there a major advantage to using mailutil over mbxcvt?

mailutil is supported.  mbxcvt is no longer supported.

mbxcvt should continue to work as well as it ever has, but no further
development will be done on it, and if you have a problem with it, the
answer will be "try mailutil".

-- Mark --

---

From: "Harondel J. Sibble" <[email-masked]>
Date: Sun, 02 Feb 2003 18:48:58 -0800

> mailutil is supported.  mbxcvt is no longer supported.
Gotcha.

The docs say

You can use the "mailutil copy" command to copy an existing mailbox to a new 
mailbox in mbx format. Read the man page provided with the mailutil program 
for details

But, there is no manpage for it on my system.  So by running mailutil without 
any args I get following:

 mailutil (copy | move) [-debug] [-verbose] old_mailbox new_mailbox
 ;; create new mailbox and copy/move messages

So to follow the "special case" of mbxcvt - mbxcvt INBOX mbx INBOX, with 
mailutil I'd do:

mailutil copy INBOX mbx INBOX or some other invocation? 

> answer will be "try mailutil".
Understood.

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 Feb 2003 18:54:47 -0800 (Pacific Standard Time)

On Sun, 2 Feb 2003, Harondel J. Sibble wrote:
> The docs say
>[snip]
> But, there is no manpage for it on my system.

Those docs *are* the man page.  Install them as the man page.

> mailutil copy INBOX mbx INBOX or some other invocation?

mailutil copy INBOX #driver.mbx/INBOX

Or just

mailutil create #driver.mbx/INBOX

then run any c-client application that opens INBOX.

-- Mark --

---

From: "Harondel J. Sibble" <[email-masked]>
Date: Sun, 02 Feb 2003 19:04:03 -0800

> Those docs *are* the man page.  Install them as the man page.
AHHH! <lightbulb clicks on>

> mailutil create #driver.mbx/INBOX

Okay great, now I understand, last question, is there a simple way to run 
this for all users in one go, so that I don't have to login as each user to 
do the conversion?

---

From: "Harondel J. Sibble" <[email-masked]>
Date: Sun, 02 Feb 2003 19:24:05 -0800

> mailutil copy INBOX #driver.mbx/INBOX

Hmmm, odd, that is not working, I've su'd to one of the user accounts.

[stapleto@server1 mail]$ mailutil copy INBOX #driver.mbx/INBOX                
 usage: mailutil copy [-debug] [-verbose] source destination

I just get back the usage info each time.

Am I missing something?

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 Feb 2003 20:32:50 -0800 (Pacific Standard Time)

>  usage: mailutil copy [-debug] [-verbose] source destination

Yup; "#" is probably the comment character for your shell.  So you need to
quote the second argument:

mailutil copy INBOX "#driver.mbx/INBOX"

-- Mark --

---

From: Mark Crispin <[email-masked]>
Date: Sun, 2 Feb 2003 20:33:55 -0800 (Pacific Standard Time)

> this for all users in one go, so that I don't have to login as each user to

At the current time, no.  But you could write a shell script to do it...

-- Mark --