fetchmailは電子メールをどこに保存しますか?

fetchmailは電子メールをどこに保存しますか?

procmailを削除した後、fetchmailがメッセージを保存する場所を探しています。

nicholas@mordor:~$ 
nicholas@mordor:~$ tail -f /var/log/fetchmail.log 
fetchmail: IMAP< A0003 OK [READ-WRITE] INBOX selected. (Success)
fetchmail: IMAP> A0004 SEARCH UNSEEN UNDELETED
fetchmail: IMAP< * SEARCH
fetchmail: IMAP< A0004 OK SEARCH completed (Success)
fetchmail: 36 messages (36 seen) for [email protected] at imap.gmail.com.
fetchmail: IMAP> A0005 LOGOUT
fetchmail: IMAP< * BYE LOGOUT Requested
fetchmail: IMAP< A0005 OK 73 good day (Success)
fetchmail: 6.4.27 querying imap.gmail.com (protocol IMAP) at Sat 16 Dec 2023 10:31:13 AM: poll completed
fetchmail: sleeping at Sat 16 Dec 2023 10:31:13 AM for 600 seconds
fetchmail: awakened by signal 10
fetchmail: awakened at Sat 16 Dec 2023 10:31:35 AM
fetchmail: 6.4.27 querying imap.gmail.com (protocol IMAP) at Sat 16 Dec 2023 10:31:35 AM: poll started
fetchmail: Trying to connect to 172.253.117.108/993...connected.
fetchmail: Loaded OpenSSL library 0x30000020 newer than headers 0x30000010, trying to continue.
fetchmail: Server certificate:
fetchmail: Issuer Organization: Google Trust Services LLC
fetchmail: Issuer CommonName: GTS CA 1C3
fetchmail: Subject CommonName: imap.gmail.com
fetchmail: Subject Alternative Name: imap.gmail.com
fetchmail: imap.gmail.com key fingerprint: F2:9D:84:CE:C0:26:90:FF:CF:0D:0E:93:86:49:55:F6
fetchmail: SSL/TLS: using protocol TLSv1.3, cipher TLS_AES_256_GCM_SHA384, 256/256 secret/processed bits
fetchmail: IMAP< * OK Gimap ready for requests from 172.103.152.184 il18mb33861268pjb
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER
fetchmail: will idle after poll
fetchmail: IMAP< A0001 OK Thats all she wrote! il18mb33861268pjb
fetchmail: IMAP> A0002 LOGIN "[email protected]" *
fetchmail: IMAP< * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 UIDPLUS COMPRESS=DEFLATE ENABLE MOVE CONDSTORE ESEARCH UTF8=ACCEPT LIST-EXTENDED LIST-STATUS LITERAL- SPECIAL-USE APPENDLIMIT=35651584
fetchmail: will idle after poll
fetchmail: IMAP< A0002 OK [email protected] authenticated (Success)
fetchmail: IMAP> A0003 SELECT "INBOX"
fetchmail: IMAP< * FLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $Junk $MDNSent $NotJunk $NotPhishing $Phishing $has_cal $label1 $label2 $label3 $label4 $label5 Junk NonJunk receipt-handled)
fetchmail: IMAP< * OK [PERMANENTFLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $Junk $MDNSent $NotJunk $NotPhishing $Phishing $has_cal $label1 $label2 $label3 $label4 $label5 Junk NonJunk receipt-handled \*)] Flags permitted.
fetchmail: IMAP< * OK [UIDVALIDITY 2] UIDs valid.
fetchmail: IMAP< * 36 EXISTS
fetchmail: IMAP< * 0 RECENT
fetchmail: IMAP< * OK [UIDNEXT 23505] Predicted next UID.
fetchmail: IMAP< * OK [HIGHESTMODSEQ 16033009]
fetchmail: IMAP< A0003 OK [READ-WRITE] INBOX selected. (Success)
fetchmail: IMAP> A0004 SEARCH UNSEEN UNDELETED
fetchmail: IMAP< * SEARCH
fetchmail: IMAP< A0004 OK SEARCH completed (Success)
fetchmail: 36 messages (36 seen) for [email protected] at imap.gmail.com.
fetchmail: IMAP> A0005 LOGOUT
fetchmail: IMAP< * BYE LOGOUT Requested
fetchmail: IMAP< A0005 OK 73 good day (Success)
fetchmail: 6.4.27 querying imap.gmail.com (protocol IMAP) at Sat 16 Dec 2023 10:31:35 AM: poll completed
fetchmail: sleeping at Sat 16 Dec 2023 10:31:35 AM for 600 seconds

予想される結果なし:

nicholas@mordor:~$ 
nicholas@mordor:~$ ll /var/spool/mail/nicholas 
-rw------- 1 nicholas mail 0 Nov 27 15:52 /var/spool/mail/nicholas
nicholas@mordor:~$ 
nicholas@mordor:~$ ll /var/mail/nicholas 
-rw------- 1 nicholas mail 0 Nov 27 15:52 /var/mail/nicholas
nicholas@mordor:~$ 

Alpine メールクライアントを使用する場合、ホームディレクトリの Mail の下にいくつかのメールがありますが、mbox ファイルの中で fetchmail のアクティビティと一致する最新のアクティビティはありません。

Fetchmailは次のように構成されています。

nicholas@mordor:~$ 
nicholas@mordor:~$ cat .fetchmailrc
set postmaster "saunders"
set daemon 60
set invisible
set postmaster administrator
set syslog
set logfile /var/log/fetchmail.log


set daemon 600
poll imap.gmail.com with proto IMAP
   user '[email protected]' there with password 'xxx' is local_user here options ssl fetchlimit 1
   keep
#   folder "fetching"
nicholas@mordor:~$ 

fetchmailの制限は、メールがどこに保存されているかを知ることです。

"imap.gmail.com"ポーリングは正しいですか? 2FAの解決策として、Alpineが使用する「アプリ」パスワードを使用してください。パスワードの問題はありません。設定を確認するだけです。

特定のディレクトリまたはフォルダを明示的に使用するようにfetchmailを設定できますか?

何もない「~/.fetchids」にあります。

ポート25にはリッスンしているエントリはありません。

ログには以下が表示されます。

fetchmail: awakened by signal 10
fetchmail: restarting fetchmail (/home/nicholas/.fetchmailrc changed)
fetchmail: starting fetchmail 6.4.27 daemon
fetchmail: 31 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: 31 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: restarting fetchmail (/home/nicholas/.fetchmailrc changed)
fetchmail: starting fetchmail 6.4.27 daemon
fetchmail: 31 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: 31 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: awakened by signal 10
fetchmail: 32 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: reading message [email protected]@imap.gmail.com:32 of 32 (613 header octets) (log message incomplete)
fetchmail: Connection errors for this poll:
name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.
fetchmail: SMTP connect to localhost failed
fetchmail: SMTP transaction error while fetching from [email protected]@imap.gmail.com and delivering to SMTP host localhost
fetchmail: Query status=10 (SMTP)
fetchmail: 32 messages (31 seen) for [email protected] at imap.gmail.com.
fetchmail: reading message [email protected]@imap.gmail.com:32 of 32 (613 header octets) (log message incomplete)
fetchmail: Connection errors for this poll:
name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused.
fetchmail: SMTP connect to localhost failed
fetchmail: SMTP transaction error while fetching from [email protected]@imap.gmail.com and delivering to SMTP host localhost
fetchmail: Query status=10 (SMTP)

メッセージをインポートしてローカルに保存したいだけです。 fetchmailの設定を変更することはできますが、保存した電子メールがどこに保存されているかを把握するまで、あまりにも多くの電子メールのダウンロードを開始することを躊躇します。

nicholas@mordor:~$ 
nicholas@mordor:~$ telnet localhost 25
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
nicholas@mordor:~$ 
nicholas@mordor:~$ hostname -f
mordor.saundersconsulting.tech
nicholas@mordor:~$ 
nicholas@mordor:~$ telnet mordor.saundersconsulting.tech 25
Trying 127.0.1.1...
telnet: Unable to connect to remote host: Connection refused
nicholas@mordor:~$ 

ベストアンサー1

ログファイルを見ると、SMTPを使用してメールを配信できませんでした。

fetchmail: Connection errors for this poll: name 0: connection to
localhost:smtp [127.0.0.1/25] failed: Connection refused. fetchmail:
SMTP connect to localhost failed fetchmail: SMTP transaction error while fetching from [email protected]@imap.gmail.com and delivering to SMTP host localhost

だから何も見えません。

ローカルMTAを有効にするか、fetchmailローカルに直接送信するように構成

おすすめ記事