commit 5bb1b3a29bc434c006ce0f4886059de3fa0d9801
parent aaa384af6ec7054f5e16086b1e54b8f3740723a6
Author: Rich Lane <rlane@club.cc.cmu.edu>
Date: Sun, 28 Feb 2010 13:13:27 -0800
deprecate imap and mbox+ssh sources
Diffstat:
3 files changed, 20 insertions(+), 51 deletions(-)
diff --git a/bin/sup b/bin/sup
@@ -179,6 +179,26 @@ begin
Index.load
Index.start_sync_worker unless $opts[:no_threads]
+ if Redwood::SourceManager.sources.any? { |x| x.is_a? Redwood::MBox::SSHLoader }
+ $stderr.puts <<EOS
+mbox+ssh sources are deprecated and will be removed in the next release.
+Running rsync in your before-poll hook is a good alternative.
+
+Press enter to continue.
+EOS
+ $stdin.gets
+ end
+
+ if Redwood::SourceManager.sources.any? { |x| x.is_a? Redwood::IMAP }
+ $stderr.puts <<EOS
+IMAP sources are deprecated and will be removed in the next release.
+Running offlineimap or fetchmail in your before-poll hook is a good alternative.
+
+Press enter to continue.
+EOS
+ $stdin.gets
+ end
+
$die = false
trap("TERM") { |x| $die = true }
trap("WINCH") { |x| BufferManager.sigwinch_happened! }
diff --git a/bin/sup-add b/bin/sup-add
@@ -20,15 +20,6 @@ For mbox files on local disk, use the form:
mbox:<path to mbox file>, or
mbox://<path to mbox file>
-For mbox files on remote machines, use the form:
- mbox+ssh://<machine name>/<path to mbox file>
-
-For IMAP folders, use the form (note no username or password!):
- imap://<machine name>/ # unsecure, "INBOX" folder
- imap://<machine name>/<folder> # unsecure, arbitrary
- imaps://<machine name>/ # secure, "INBOX" folder
- imaps://<machine name>/<folder> # secure, arbitrary folder
-
For Maildir folders, use the form:
maildir:<path to Maildir directory>; or
maildir://<path to Maildir directory>
@@ -106,14 +97,6 @@ begin
source =
case parsed_uri.scheme
- when "mbox+ssh"
- say "For SSH connections, if you will use public key authentication, you may leave the username and password blank."
- say ""
- username, password = get_login_info uri, Redwood::SourceManager.sources
- Redwood::MBox::SSHLoader.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
- when "imap", "imaps"
- username, password = get_login_info uri, Redwood::SourceManager.sources
- Redwood::IMAP.new uri, username, password, nil, !$opts[:unusual], $opts[:archive], nil, labels
when "maildir"
Redwood::Maildir.new uri, nil, !$opts[:unusual], $opts[:archive], nil, labels
when "mbox"
diff --git a/bin/sup-config b/bin/sup-config
@@ -44,9 +44,6 @@ def add_source
menu.prompt = "What type of mail source is it? "
menu.choice("mbox file") { type = :mbox }
menu.choice("maildir directory") { type = :maildir }
- menu.choice("remote mbox file (accessible via ssh)") { type = :mboxssh }
- menu.choice("IMAP server (secure)") { type = :imaps }
- menu.choice("IMAP server (unsecure)") { type = :imap }
menu.choice("Get me out of here!") { return }
end
@@ -70,37 +67,6 @@ def add_source
$last_fn = fn
[Redwood::Maildir.suggest_labels_for(fn),
{ :scheme => "maildir", :path => fn }]
- when :mboxssh
- $last_server ||= "localhost"
- srv = axe "What machine is the mbox file located on?", $last_server
- return if srv.nil? || srv.empty?
- $last_server = srv
-
- fn = axe "What's the path to the mbox file?", $last_fn
- return if fn.nil? || fn.empty?
- $last_fn = fn
- fn = "/#{fn}" # lame
- [Redwood::MBox::SSHLoader.suggest_labels_for(fn),
- { :scheme => "mbox+ssh", :host => srv, :path => fn }]
- when :imap, :imaps
- $last_server ||= "localhost"
- srv = axe "What is the IMAP server (host, or host:port notation)?", $last_server
- return if srv.nil? || srv.empty?
- $last_server = srv
-
- $last_folder ||= "INBOX"
- fn = axe "What's the folder path?", $last_folder
- return if fn.nil? || fn.empty?
- $last_folder = fn
-
- fn = "/#{fn}"
- if srv =~ /^(\S+):(\d+)$/
- host, port = $1, $2.to_i
- else
- host, port = srv, nil
- end
- [Redwood::IMAP.suggest_labels_for(fn),
- { :scheme => type.to_s, :host => host, :port => port, :path => fn }]
end
uri = begin