-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
El 2022-01-20 a las 14:52 -0500, Joe Acquisto-j4 escribió:
. . .
no real need to try again.
You can adjust all that.
For example, I sent all logs (verbose) via syslog, which adds timestamps.
With syslog configuration, you select what logfile it will be, normally
/var/log/mail. See mine :
<2.6> 2012-06-26 03:45:05 Telcontar fetchmail 31844 - - 6.3.19 querying imap.telefonica.net (protocol IMAP) at Tue Jun 26 03:45:05 2012: poll started
<2.6> 2012-06-26 03:45:05 Telcontar fetchmail 31844 - - Trying to connect to 213.4.149.65/143...connected.
...
Good to know, but /var/log/mail is already too hard to read. I prefer to keep
fetchmail separate if possible.
You can create a filter on syslog to have fetchmail entries delivered to a
different file.
All syslog logs are similar, you get used to reading them. Standar *unix
stuff. It is useful to have fetchmail and other mail log entries in the
same file, because you can follow a particular email progress.
Example
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - 958 messages for robin.listas2 at imap.telefonica.net (folder Inbox).
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP> A0005 FETCH 1:100 RFC822.SIZE
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP< * 1 FETCH (RFC822.SIZE 5106)
...
These are just verbose fetchmail entries, and you said you wanted them
verbose. Nothing extraordinary about them.
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP< * 100 FETCH (RFC822.SIZE 3863)
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP< A0005 OK FETCH complete
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP> A0006 FETCH 1 RFC822.HEADER
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - IMAP< * 1 FETCH (RFC822.HEADER {3882}
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - reading message robin.listas2@imap.telefonica.net:1 of 958 (3882 header octets)Trying to connect to ::1/25...connected.
<2.6> 2012-06-26 03:45:49 Telcontar postfix 31847 - - connect from localhost[::1]
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 220 Telcontar.valinor ESMTP Postfix
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP> EHLO Telcontar.valinor
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-Telcontar.valinor
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-PIPELINING
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-SIZE 30000000
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-VRFY
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-ETRN
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-ENHANCEDSTATUSCODES
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250-8BITMIME
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250 DSN
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP> MAIL FROM: BODY=7BIT SIZE=5106
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP< 250 2.1.0 Ok
<2.6> 2012-06-26 03:45:49 Telcontar fetchmail 31844 - - SMTP> RCPT TO:
<2.6> 2012-06-26 03:45:50 Telcontar postfix 31847 - - 10AF7C2954: client=localhost[::1]
postfix acknowledges it is receiving the email from fetchmail.
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - SMTP< 250 2.1.5 Ok
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - SMTP> DATA
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - SMTP< 354 End data with <CR><LF>.<CR><LF>
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< )
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< A0006 OK FETCH complete
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP> A0007 FETCH 1 BODY.PEEK[TEXT]
<2.6> 2012-06-26 03:45:50 Telcontar postfix 31941 - - 10AF7C2954: message-id=<1339851287.32185.5.camel@laran.leuenberger.net>
Notice the message-id, you see it later.
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< * 1 FETCH (BODY[TEXT] {1224}
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - (1224 body octets) (log message incomplete)
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< )
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< A0007 OK FETCH complete
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - SMTP>. (EOM)
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - SMTP< 250 2.0.0 Ok: queued as 10AF7C2954
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - flushed
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP> A0008 STORE 1 +FLAGS (\Seen \Deleted)
fetchmail has the email
<2.6> 2012-06-26 03:45:50 Telcontar postfix 17395 - - 10AF7C2954: from=, size=5422, nrcpt=1 (queue active)
passes it to postfix
<2.6> 2012-06-26 03:45:50 Telcontar amavis 22064 - - (22064-11) LMTP::10024 /var/spool/amavis/tmp/amavis-20120626T012043-22064: -> SIZE=5422 BODY=7BIT Received: from Telcontar.valinor ([127.0.0.1]) by localhost (Telcontar.valinor [127.0.0.1]) (amavisd-new, port 10024) with LMTP for ; Tue, 26 Jun 2012 03:45:50 +0200 (CEST)
who passes it on to amavis for scanning
So, follow that "22064-11"
<2.6> 2012-06-26 03:45:50 Telcontar amavis 22064 - - (22064-11) Checking: CvWR6vRzRTre MYNETS [IPv6:::1] ->
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< * 1 FETCH (FLAGS (\Deleted \Seen))
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP< A0008 OK STORE complete
<2.6> 2012-06-26 03:45:50 Telcontar fetchmail 31844 - - IMAP> A0009 FETCH 2 RFC822.HEADER
fetchmail is ready to continue with another post
<2.6> 2012-06-26 03:45:50 Telcontar postfix 31856 - - 452F6C2956: client=localhost[127.0.0.1]
...
<2.6> 2012-06-26 03:45:50 Telcontar amavis 22064 - - (22064-11) FWD via SMTP: -> ,BODY=7BIT 250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 452F6C2956
<2.5> 2012-06-26 03:45:50 Telcontar amavis 22064 - - (22064-11) Passed CLEAN, MYNETS LOCAL [IPv6:::1] [80.56.8.22] -> , Message-ID: <1339851287.32185.5.camel@laran.leuenberger.net>, mail_id: CvWR6vRzRTre, Hits: -, size: 5422, queued_as: 452F6C2956, 141 ms
amavis finished with it and passes it back to postfix
<2.6> 2012-06-26 03:45:50 Telcontar postfix 31942 - - 10AF7C2954: to=, orig_to=, relay=127.0.0.1[127.0.0.1]:10024, delay=0.53, delays=0.38/0/0/0.14, dsn=2.0.0, status=sent(250 2.0.0 from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 452F6C2956)
<2.6> 2012-06-26 03:45:50 Telcontar postfix 17395 - - 10AF7C2954: removed
Now, follow 452F6C2956
<2.6> 2012-06-26 03:45:57 Telcontar postfix 32025 - - 452F6C2956: to=, relay=local, delay=7.5, delays=0.07/0/0/7.5, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
<2.6> 2012-06-26 03:45:57 Telcontar postfix 17395 - - 452F6C2956: removed
postfix now passes it on to procmail (see the separate procmail log).
Later, the same message appears as spamd processes it:
<2.6> 2012-06-26 03:45:54 Telcontar spamd 32218 - - spamd: connection from localhost [127.0.0.1] at port 38864
<2.6> 2012-06-26 03:45:54 Telcontar spamd 32218 - - spamd: setuid to cer succeeded
<2.6> 2012-06-26 03:45:54 Telcontar spamd 17222 - - spamd: processing message <1339851287.32185.5.camel@laran.leuenberger.net> for cer:1000
<2.6> 2012-06-26 03:45:54 Telcontar spamd 32217 - - spamd: processing message for cer:1000
<2.6> 2012-06-26 03:45:57 Telcontar spamd 17222 - - spamd: result: . -1 - BAYES_00,RCVD_IN_DNSWL_HI,RDNS_NONE scantime=3.6,size=6006,user=cer,uid=1000,required_score=5.0,rhost=localhost,raddr=127.0.0.1,rport=38838,mid=<1339851287.32185.5.camel@laran.leuenberger.net>,bayes=0.000000,autolearn=disabled
See? That's how you use the mail log to follow the processing of any
single email and find out what happened to it. It is not complicated.
- --
Cheers
Carlos E. R.
(from openSUSE Leap 15.3 x86_64 (Minas Tirith))
-----BEGIN PGP SIGNATURE-----
iJIEAREIADoWIQQt/vKEw5659AgM/X2NrxRtxRYzXAUCYenR3Rwccm9iaW4ubGlz
dGFzQHRlbGVmb25pY2EubmV0AAoJEI2vFG3FFjNcmTwA/3H9oZrhMSTlx6KEGa/R
ASNkfMfr1hLyymjZAsewVQSiAP46d9yodD67gsUkpEdYQopPDu3gK9z1qpQG/0oe
8qR6gA==
=RFYF
-----END PGP SIGNATURE-----