Discussion:
mailutil
Jim McKinney
2012-06-01 13:13:28 UTC
Permalink
Hi,

We have a user who has been storing their thunderbird mail in local
files on their PC and has recently seen the light and would like to move
them to our IMAP server so that they are available from all locations
and don't have to be moved every time they upgrade their machine. We
have exported the folders to mbox format and I've been trying to use
mailutil to upload the messages to our server. Unfortunately I've run
into a couple of issues that I haven't found the right magic to resolve.

1) Is there a way to have mailutil look in an alternate location rather
than my home directory? I've looked at the man page and don't see any
way to override this using either a flag or environment variable.

2) I have been trying to use the transfer option but have run into a
problem. Based on my experiments it looks like mailutil is using the
name of the file as the name of the mail folder it creates and creates
parent folders based on the directory structure. That is working well.
However, I have some instances where a folder will contain both messages
and subfolders and, other than managing multiple passes, I can't have a
directory and a file with a common name in the same location. What I
would really like to find is a way to say "take the file Local_Mail.mbox
and transfer it to {imap.server}a.b.c.e" and put the messages in the
folder named e

Finally, is there a reference with examples of the various driver
options, etc beyond the man page?

Many thanks in advance!

thanx
-jmck
Mabry Tyson
2012-06-01 17:03:02 UTC
Permalink
When people do this at my site, I just have them create IMAP folders
and then just COPY the messages within their mail reader from their
local folders to their IMAP folders. (I don't use "move" because I have
run into problems (probably in their mail client) trying to move 1000s
of messages at once.)
Post by Jim McKinney
Hi,
We have a user who has been storing their thunderbird mail in local
files on their PC and has recently seen the light and would like to move
them to our IMAP server so that they are available from all locations
and don't have to be moved every time they upgrade their machine. We
have exported the folders to mbox format and I've been trying to use
mailutil to upload the messages to our server. Unfortunately I've run
into a couple of issues that I haven't found the right magic to resolve.
...
Many thanks in advance!
thanx
-jmck
Jim McKinney
2012-06-01 17:18:53 UTC
Permalink
I agree, and I've seen the same issue with the local client falling over
when we try that. At this point I'm just trying to solve a problem that I
got brought into late in the process.

Part of the reason for the original posting is that I feel like I'm
missing some documentation, besides the source code, that might have
additional information beyond the man page. I may be wrong, but I just
want to confirm that one way or the other.

thanx
-jmck


--
Jim McKinney ***@ece.cmu.edu
System Administrator Manager, ECE Office: HHA205
Carnegie Mellon University (412) 268-5141
You need only two tools: WD-40 and Duct Tape. If it doesn't move and
it should, use WD-40. If it moves and shouldn't, use the duct tape.
Post by Mabry Tyson
When people do this at my site, I just have them create IMAP folders
and then just COPY the messages within their mail reader from their
local folders to their IMAP folders. (I don't use "move" because I have
run into problems (probably in their mail client) trying to move 1000s
of messages at once.)
Post by Jim McKinney
Hi,
We have a user who has been storing their thunderbird mail in local
files on their PC and has recently seen the light and would like to move
them to our IMAP server so that they are available from all locations
and don't have to be moved every time they upgrade their machine. We
have exported the folders to mbox format and I've been trying to use
mailutil to upload the messages to our server. Unfortunately I've run
into a couple of issues that I haven't found the right magic to resolve.
...
Many thanks in advance!
thanx
-jmck
_______________________________________________
Imap-uw mailing list
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Oscar del Rio
2012-06-01 19:58:15 UTC
Permalink
Post by Jim McKinney
1) Is there a way to have mailutil look in an alternate location rather
than my home directory? I've looked at the man page and don't see any
way to override this using either a flag or environment variable.
Try using double slash. For example,

% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}testmailbox"

to transfer /tmp/test.mbox file to users IMAP testmailbox.

% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}//spool/username/testmailbox"

might work if mailboxes are not on the user's home dir.

% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}#driver.mix/testmailbox"

to specify a mailbox format...
Post by Jim McKinney
Finally, is there a reference with examples of the various driver
options, etc beyond the man page?
The mailing list archives, I supposed. Mark provided great support and
gave lots of advice on the list.
Richard Ketcham
2012-06-12 20:51:34 UTC
Permalink
If you need to use mailutil to operate on user accounts from the root
account, then you can do this:

su - $user --shell=/bin/bash -c /usr/bin/mailutil ...

This is also useful for accessing users' mail on the mail server with
"alpine":

su - $user --shell=/bin/bash -c /usr/bin/alpine

(Useful because alpine is the only non-gui client that can operate
locally on "MIX" formated mail folders)

Richard Ketcham
Post by Oscar del Rio
Post by Jim McKinney
1) Is there a way to have mailutil look in an alternate location rather
than my home directory? I've looked at the man page and don't see any
way to override this using either a flag or environment variable.
Try using double slash. For example,
% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}testmailbox"
to transfer /tmp/test.mbox file to users IMAP testmailbox.
% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}//spool/username/testmailbox"
might work if mailboxes are not on the user's home dir.
% mailutil copy -kw //tmp/test.mbox
"{server:143/imap/novalidate-cert/notls/user=username}#driver.mix/testmailbox"
to specify a mailbox format...
Post by Jim McKinney
Finally, is there a reference with examples of the various driver
options, etc beyond the man page?
The mailing list archives, I supposed. Mark provided great support
and gave lots of advice on the list.
_______________________________________________
Imap-uw mailing list
http://mailman2.u.washington.edu/mailman/listinfo/imap-uw
Joel Reicher
2012-06-02 04:54:14 UTC
Permalink
Post by Jim McKinney
Finally, is there a reference with examples of the various driver
options, etc beyond the man page?
This, perhaps?

http://www.washington.edu/imap/documentation/naming.txt.html

It's also in the source tarball.

Cheers,

- Joel
Loading...