emailをバックアップしたり
$ dpkg -l getmail|tail -1 ii getmail 5.13-1 all mail retriever with support for POP3, IMAP4 and SDPS
$ mkdir -m 700 ~/.getmail $ mkdir -p ~/getmail/mail/cur $ mkdir -p ~/getmail/mail/new $ mkdir -p ~/getmail/mail/tmp
$ vi ~/.getmail/getmailrc
gmailでの例
[retriever] type = SimpleIMAPSSLRetriever server = imap.gmail.com #mailboxes = ("Inbox", "[Gmail]/Sent Mail") # optional - leave this line out to just grab inbox username = USER password = PASS [destination] type = Maildir path = ~/getmail/mail/ [options] verbose = 1 message_log = ~/.getmail/log # retrieve only new messages # if set to true it will re-download ALL messages every time! read_all = false # do not alter messages delivered_to = false received = false
gmailのアプリパスワードはこのページから取得 https://myaccount.google.com/apppasswords
$ getmail
$ crontab -l|grep getmail 3 2 * * * getmail --quiet --new --dont-delete
コメント