# Download (replace BINARY by: m2m, m2m_pi, m2m_osx, m2m_freebsd or m2m.exe)
wget -O BINARY https://gitlab.com/pepa65/m2m/-/jobs/artifacts/master/raw/BINARY?job=building
# Go install (if Golang is installed properly)
go install github.com/pepa65/m2m@latest
# Go clone/install (if Golang is installed properly)
git clone https://github.com/pepa65/m2m; cd m2m; go install
# Smaller binaries
CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -ldflags="-s -w"
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags="-s -w" -o m2m_pi
CGO_ENABLED=0 GOOS=freebsd GOARCH=amd64 go build -ldflags="-s -w" -o m2m_freebsd
CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags="-s -w" -o m2m_osx
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-s -w" -o m2m.exe
# More extreme shrinking:
upx --best --lzma m2m*
# Move them to the local binary directory (if in your PATH):
mv m2m* ~/bin/
# Or move to a manually managed binaries location:
sudo mv m2m* /usr/local/bin/
m2m v1.25.2 - Move from POP3 to Maildir
* Downloading emails from POP3 servers and moving them into Maildir folders.
* Repo: github.com/pepa65/m2m
* Usage: m2m [-s|--serial] [-q|--quiet] | [-h|--help]
-s/--serial: Check the accounts in order, do not check concurrently.
-q/--quiet: Output only on critical errors (on 'stderr').
-h/--help: Output this help text.
-V/--version: Output the version.
If mails are found, a minimal report goes to 'stdout'; errors to 'stderr'.
* The directory '~/.m2m.conf' contains all account config files, which are
checked concurrently by default (each filename is taken as the account name).
* Parameter names (lowercase!) in the configuration files:
active: true/false Account is active [default] or not
username: POP3 username [mandatory]
password: POP3 password [mandatory]
tlsdomain: Server domainname (as in its certificate) [mandatory]
port: Port [default: 995]
entryserver: Initial server IP/Domainname [default: not used]
proxyport: Proxy server (server:port) [default: not used]
tls: true/false Use TLS [default], or not
timeout: Poll timeout in seconds [default: 200]
keep: true/false Keep mails on POP3 server, or delete them [default]
maildir: Path to Maildir [default: '~/Maildir']