Por que o fetchmail não funciona de repente?

2

Eu corri um chmod 777 * na minha pasta pessoal. (Eu sei, eu sei. Eu nunca farei isso novamente.)

Desde então, fetchmail parece estar quebrado.

Eu o uso para buscar mensagens de uma caixa de correio do Exchange 2003 por meio do DAVMail e do OWA.

O problema é que fetchmail reclama de uma "incompatibilidade de expunge" sempre que recebo uma nova mensagem. Exclui a mensagem da caixa de correio do Exchange, mas nunca a encaminha. Parece haver um problema no processamento de correspondência, mas não consegui identificar onde.

Qualquer ajuda seria apreciada.

Aqui estão os arquivos de configuração relevantes.

~/fetchmailrc :

set no bouncemail
defaults:
  antispam -1
  batchlimit 100
poll localhost with protocol imap and port 1143
user domain\user password Password is root
no rewrite
mda "/usr/bin/procmail -f %F -d %T";

~/procmailrc :

:0
* ^Subject.*ack
| expand | sed -e 's/[ ]*$//g' | sed -e 's/^/ /' > /usr/local/nagios/libexec/mail_acknowledgement

~/.forward :

| "/usr/bin/procmail"

E aqui está a saída quando eu corro fetchmail -f /root/.fetchmailrc -vv :

fetchmail: WARNING: Running as root is discouraged.
Old UID list from localhost: <empty>
Scratch list of UIDs: <empty>
fetchmail: 6.3.19 querying localhost (protocol IMAP) at Tue 03 Jul 2012 09:46:36 AM EDT: poll started
Trying to connect to 127.0.0.1/1143...connected.
fetchmail: IMAP< * OK [CAPABILITY IMAP4REV1 AUTH=LOGIN] IMAP4rev1 DavMail 3.9.7-1870 server ready
fetchmail: IMAP> A0001 CAPABILITY
fetchmail: IMAP< * CAPABILITY IMAP4REV1 AUTH=LOGIN
fetchmail: IMAP< A0001 OK CAPABILITY completed
fetchmail: Protocol identified as IMAP4 rev 1
fetchmail: GSSAPI error gss_inquire_cred: Unspecified GSS failure.  Minor code may provide more information
fetchmail: GSSAPI error gss_inquire_cred:
fetchmail: No suitable GSSAPI credentials found. Skipping GSSAPI authentication.
fetchmail: If you want to use GSSAPI, you need credentials first, possibly from kinit.
fetchmail: IMAP> A0002 LOGIN "domain\user" *
fetchmail: IMAP< A0002 OK Authenticated
fetchmail: selecting or re-polling default folder
fetchmail: IMAP> A0003 SELECT "INBOX"
fetchmail: IMAP< * 1 EXISTS
fetchmail: IMAP< * 1 RECENT
fetchmail: IMAP< * OK [UIDVALIDITY 1]
fetchmail: IMAP< * OK [UIDNEXT 344]
fetchmail: IMAP< * FLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded Junk)
fetchmail: IMAP< * OK [PERMANENTFLAGS (\Answered \Deleted \Draft \Flagged \Seen $Forwarded Junk)]
fetchmail: IMAP< A0003 OK [READ-WRITE] SELECT completed
fetchmail: 1 message waiting after first poll
fetchmail: IMAP> A0004 EXPUNGE
fetchmail: IMAP< A0004 OK EXPUNGE completed
fetchmail: 1 message waiting after expunge
fetchmail: IMAP> A0005 SEARCH UNSEEN
fetchmail: IMAP< * SEARCH 1
fetchmail: 1 is unseen
fetchmail: IMAP< A0005 OK SEARCH completed
fetchmail: 1 is first unseen
1 message for domain\user at localhost.
fetchmail: IMAP> A0006 FETCH 1 RFC822.SIZE
fetchmail: IMAP< * 1 FETCH (UID 343 RFC822.SIZE 1350)
fetchmail: IMAP< A0006 OK FETCH completed
fetchmail: IMAP> A0007 FETCH 1 RFC822.HEADER
fetchmail: IMAP< * 1 FETCH (UID 343 RFC822.HEADER  {1350}
reading message domain\user@localhost:1 of 1 (1350 header octets) fetchmail: about to deliver with: /usr/bin/procmail -f '[email protected]' -d 'root'
#
fetchmail: IMAP<
fetchmail: IMAP<
fetchmail: IMAP< Bonne journ=E9e..
fetchmail: IMAP<
fetchmail: IMAP< Company Name
fetchmail: IMAP< My Name
fetchmail: IMAP< IT
fetchmail: IMAP< Tel: (XXX) XXX-XXXX xXXX
fetchmail: IMAP< www.domain.com=20
fetchmail: IMAP<
fetchmail: IMAP<
fetchmail: IMAP< -----Message d'origine-----
fetchmail: IMAP< De=A0: User [mailto:[email protected]]=20
fetchmail: IMAP< Envoy=E9=A0: 2 juillet 2012 15:50
fetchmail: IMAP< =C0=A0: Informatique
fetchmail: IMAP< Objet=A0: PROBLEM: photo
fetchmail: IMAP<
fetchmail: IMAP< Notification Type: PROBLEM
fetchmail: IMAP< Author:=20
fetchmail: IMAP< Comment:=20
fetchmail: IMAP<
fetchmail: IMAP< Host: Photos
fetchmail: IMAP< Hostname: photo
fetchmail: IMAP< State: DOWN
fetchmail: IMAP< Address: XXX.XX.X.XX
fetchmail: IMAP<
fetchmail: IMAP< Date/Time: Mon Jul 2 15:49:38 EDT 2012
fetchmail: IMAP<
fetchmail: IMAP< Info: CRITICAL - XXX.XX.X.XX: rta nan, lost 100%
fetchmail: IMAP<
fetchmail: IMAP<
fetchmail: IMAP< )
fetchmail: IMAP< A0007 OK FETCH completed
fetchmail: IMAP> A0008 FETCH 1 BODY.PEEK[TEXT]
fetchmail: IMAP< * 1 FETCH (UID 343 BODY[TEXT] {539}
 (539 body octets) *******************************
fetchmail: IMAP< )
fetchmail: IMAP< A0008 OK FETCH completed
 flushed
fetchmail: IMAP> A0009 STORE 1 +FLAGS (\Seen \Deleted)
fetchmail: IMAP< * 1 FETCH (UID 343 FLAGS (\Seen \Deleted))
fetchmail: IMAP< * 1 EXPUNGE
fetchmail: IMAP< A0009 OK STORE completed
fetchmail: IMAP> A0010 EXPUNGE
fetchmail: IMAP< A0010 OK EXPUNGE completed
fetchmail: mail expunge mismatch (0 actual != 1 expected)
fetchmail: IMAP> A0011 LOGOUT
fetchmail: IMAP< * BYE Closing connection
fetchmail: IMAP< A0011 OK LOGOUT completed
fetchmail: client/server synchronization error while fetching from domain\user@localhost
fetchmail: 6.3.19 querying localhost (protocol IMAP) at Tue 03 Jul 2012 09:46:36 AM EDT: poll completed
Merged UID list from localhost: <empty>
fetchmail: Query status=7 (ERROR)
fetchmail: normal termination, status 7
    
por SirCharlo 03.07.2012 / 16:28

1 resposta

2

Se alguém encontrar esse problema, a solução foi embaraçosa.

Nós clonamos a VM do Ubuntu na qual o fetchmail estava sendo executado periodicamente. Como resultado, as tarefas cron responsáveis por buscar mensagens estavam sendo executadas simultaneamente, em ambas as máquinas.

Isso é o que causou os estranhos erros de fetchmail que eu estava vendo, pois dois clientes estavam buscando o mesmo e-mail exatamente ao mesmo tempo.

    
por SirCharlo 28.09.2012 / 16:54