File imapsync.spec of Package imapsync
#
# spec file for package imapsync
#
# Copyright (c) 2022 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: imapsync
Summary: IMAP synchronisation, sync, copy or migration tool
License: WTFPL
Group: Productivity/Networking/Email/Utilities
Version: 2.200
Release: 0
URL: https://github.com/imapsync/imapsync/
Source0: https://github.com/computersalat/imapsync/archive/%{version}/%{name}-%{version}.tar.gz
BuildArch: noarch
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildRequires: lsb-release
BuildRequires: openSUSE-release
BuildRequires: procps
BuildRequires: time
BuildRequires: perl(App::cpanminus)
BuildRequires: perl(Authen::NTLM)
BuildRequires: perl(CGI)
BuildRequires: perl(Compress::Zlib)
BuildRequires: perl(Crypt::OpenSSL::RSA)
BuildRequires: perl(Data::Uniqid)
BuildRequires: perl(Digest::HMAC)
BuildRequires: perl(Dist::CheckConflicts)
BuildRequires: perl(Encode::IMAPUTF7)
BuildRequires: perl(File::Copy::Recursive)
BuildRequires: perl(File::Tail)
BuildRequires: perl(HTML::Entities)
BuildRequires: perl(IO::Socket::INET6)
BuildRequires: perl(IO::Socket::IP)
BuildRequires: perl(IO::Socket::SSL)
BuildRequires: perl(IO::Tee)
BuildRequires: perl(JSON::WebToken)
BuildRequires: perl(LWP::UserAgent)
BuildRequires: perl(Mail::IMAPClient)
BuildRequires: perl(Module::Implementation)
BuildRequires: perl(Module::ScanDeps)
BuildRequires: perl(Net::SSLeay)
BuildRequires: perl(PAR::Packer)
BuildRequires: perl(Package::Stash)
BuildRequires: perl(Readonly)
BuildRequires: perl(Regexp::Common)
BuildRequires: perl(Sys::MemInfo)
BuildRequires: perl(Term::ReadKey)
BuildRequires: perl(Test::Deep)
BuildRequires: perl(Test::Fatal)
BuildRequires: perl(Test::Mock::Guard)
BuildRequires: perl(Test::MockObject)
BuildRequires: perl(Test::NoWarnings)
BuildRequires: perl(Test::Pod)
BuildRequires: perl(Test::Requires)
BuildRequires: perl(Test::Simple)
BuildRequires: perl(Test::Warn)
BuildRequires: perl(URI::Escape)
BuildRequires: perl(Unicode::String)
#
Requires: perl(Compress::Zlib)
Requires: perl(Crypt::OpenSSL::RSA)
Requires: perl(Date::Manip)
Requires: perl(Digest::HMAC)
Requires: perl(Encode::IMAPUTF7)
Requires: perl(File::Copy::Recursive)
Requires: perl(File::Tail)
Requires: perl(HTML::Entities)
Requires: perl(IO::Tee)
Requires: perl(JSON::WebToken)
Requires: perl(LWP::UserAgent)
Requires: perl(Mail::Box)
Requires: perl(Mail::IMAPClient)
Requires: perl(Readonly)
Requires: perl(Regexp::Common)
Requires: perl(Sys::MemInfo)
Requires: perl(Term::ReadKey)
Requires: perl(Test::MockObject)
Requires: perl(Test::More)
Requires: perl(Time::HiRes)
Requires: perl(Time::Local)
Requires: perl(Unicode::String)
#
Recommends: perl(Authen::NTLM)
Recommends: perl(Data::Uniqid)
Recommends: perl(IO::Socket::INET6)
Recommends: perl(IO::Socket::IP)
Recommends: perl(IO::Socket::SSL)
Recommends: perl(Net::SSLeay)
Recommends: perl(URI::Escape)
#
Suggests: perl(App::cpanminus)
%description
The command imapsync is a tool allowing incremental and
recursive imap transfer from one mailbox to another.
By default all folders are transferred, recursively.
We sometimes need to transfer mailboxes from one imap server to
another. This is called migration.
imapsync is a good tool because it reduces the amount
of data transferred by not transferring a given message if it
is already on both sides. Same headers
and the transfer is done only once. All flags are
preserved, unread will stay unread, read will stay read,
deleted will stay deleted. You can stop the transfer at any
time and restart it later, imapsync works well with bad
connections.
You can decide to delete the messages from the source mailbox
after a successful transfer (it is a good feature when migrating).
In that case, use the --delete option. Option --delete implies
also option --expunge so all messages marked deleted on host1
will be really deleted.
(you can use --noexpunge to avoid this but I don't see any
real world scenario for the combinaison --delete --noexpunge).
You can also just synchronize a mailbox A from another mailbox B
in case you just want to keep a "live" copy of B in A (--delete2
may help)
imapsync is not adequate for maintaining two active imap accounts
in synchronization where the user plays independently on both sides.
Use offlineimap (written by John Goerzen) or mbsync (written by
Michael R. Elkins) for 2 ways synchronizations.
%prep
%setup -q -n %{name}-%{version}
### RPMLINT
pushd examples
rm .htaccess *.bat
chmod 644 *
perl -p -i -e 's|\r\n|\n|' *.sh
popd
pushd FAQ.d
rm .htaccess htaccess.txt memo
chmod 644 *
perl -p -i -e 's|\r\n|\n|' *.txt
popd
sed -i 's@\(^#!/usr/bin/\)env.*@\1perl@' %{name}
%build
%install
%{__make} install DESTDIR=%{buildroot}
%clean
%{__rm} -rf %{buildroot}
%files
%defattr(-,root,root)
%license LICENSE
%doc ChangeLog CREDITS FAQ README TODO VERSION
%doc examples FAQ.d
%{_bindir}/%{name}
%{_mandir}/man1/%{name}.1*
%changelog