顯示具有 imap 標籤的文章。 顯示所有文章
顯示具有 imap 標籤的文章。 顯示所有文章

2026/02/10

最近google一直出現要停用pop3收信的通知

所以找個之後能處理信件的方法 找到了 imapsync 


https://github.com/imapsync/imapsync


因為是用 perl 寫的 可以直接下載來執行或跑docker

如果要直接執行需要補很多perl的元件

所以選擇跑docker

mail server 打開 imaps

設定檔案如下 將所有監聽埠開啟

/etc/dovecot/conf.d/10-master.conf

service imap-login {

  inet_listener imap {

    port = 143

  }

  inet_listener imaps {

    port = 993

    ssl = yes

  }

}


service pop3-login {

  inet_listener pop3 {

    port = 110

  }

  inet_listener pop3s {

    port = 995

    ssl = yes

  }

}


設定 SSL 策略


為了讓 110 與 143 也能正常運作,你的 SSL 設定不能過於強硬。 編輯 /etc/dovecot/conf.d/10-ssl.conf:

ssl = yes 


允許不加密的連線同時支援強制加密連線


重啟 dovecot


再來google 要使用 應用程式專用密碼 而不是登入密碼

所以要開啟二階段驗証並設定 應用程式專用密碼


















以上都設定完成後 同步指令如下

測試先 dry run

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --dry


實際執行

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2


只同步收件夾

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2  --folder INBOX


同步後刪除來源端信件

docker run gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --delete1 --expunge1


執行後刪除container

docker run --rm gilleslamiral/imapsync imapsync --host1 mail.abc.tw --port1 993 --user1 test --password1 your_passwd --host2 imap.gmail.com --user2 user@google.com --password2 your_app_password --ssl1 --ssl2 --delete1 --expunge1

2015/08/19

一直以來都有個需求
就是如何把郵件軟体匯出的大量eml檔再匯入到thunderbird或outlook或其他webmail中使用
剛好今天又有user打來問
就記一下
首先要安裝thunderbird
在設定帳號時看要使用imap或pop3
再來thunderbird要安裝importexporttools
但直接從附加元件是找不到的
必須從網頁下載後再手動安裝
















安裝後建立一個資料夾
再到工具 - 以mbox/eml 格式導出導入即可

2013/08/26

早上有人反應webmail打不開
查了一下log
發現如下的情況

Aug 26 09:44:09 mail dovecot: master: Warning: service(imap): process_limit reached, client connections are being dropped
Aug 26 09:45:20 mail dovecot: master: Warning: service(imap): process_limit reached, client connections are being dropped
Aug 26 09:46:25 mail dovecot: master: Warning: service(imap): process_limit reached, client connections are being dropped
Aug 26 09:49:32 mail dovecot: master: Warning: service(imap): process_limit reached, client connections are being dropped

imap 超過預設值了

修改/etc/dovecot/conf.d/10-master.conf
#default_process_limit = 100
default_process_limit = 2000
#default_client_limit = 1000
default_client_limit = 4003

service auth {
加上
client_limit=6048
}

dovecot restart後再觀察看看
dovecot restart時如果預設值有問題
會顯示應該調整的參數

升到centos 6 後不管是postfix或是dovecot 預設值都滿低的
只能夠碰到問題再來慢慢調整了


2013/08/12

如何使用telnet 跟imap溝通

telnet localhost 143
登入 (01 要連同輸入)

01 login cross@ssorc.tw 123456
列出有那些信件夾

02 list "" "*"
信件夾狀態

03 status [MAILBOX] [MESSAGES|RECENT|UNSEEN]
進入 INBOX 這信件夾

04 select INBOX
列出 INBOX 裡的信件

05 fetch 1:* flags
列出信件表示為1 的信件表頭(header)

06 fetch 1 body[header]
列出信件表示為1 的信件內容(body)

07 fetch 1 body[text]
如果要看其它封,一定要先

08 fetch 2:* flags
刪除信件

09 store 1 flags \Deleted

http://itindex.net/detail/43564-telnet-%E6%8C%87%E4%BB%A4-imap