Re: Trouble with --expunge option

Matthias Andree <[email protected]> Tue, 7 Nov 2023 23:54:04 +0100
Newsgroups gmane.mail.fetchmail.user
Message-ID <[email protected]>
Am 07.11.23 um 21:37 schrieb Norman Ramsey:
> I'm using fetchmail with IMAP, and it appears to be slamming my server
> pretty hard.  The issue shows when there are hundreds of messages
> waiting on the server; fetchmail appears to send an EXPUNGE after each
> message, and those are slow.
>
> In my configuration, I've set `expunge` to 500, but fetchmail still
> seems to be sending EXPUNGE after every message, and I've noticed no
> improvement in speed.
>
> I'm not sure if I misunderstand the use of the `expunge` parameter or
> if I'm overlooking something else.
>
> As per the FAQ,
>
>   1. My operating system is Debian GNU/Linux 12 (bookworm)
>
>   2. Fetchmail is installed from the Debian stable package repository.
>      Partial info:
>
>          Package: fetchmail
>          Status: install ok installed
>          Priority: optional
>          Section: mail
>          Installed-Size: 789
>          Maintainer: Laszlo Boszormenyi (GCS) <[email protected]>
>          Architecture: amd64
>          Version: 6.4.37-1
>
>   3. I'm not sure how to tell what IMAP server I am talking to, but I
>      got this info from telnet:
>
>          $ telnet imap.eecs.tufts.edu 143
>          Trying 130.64.23.48...
>          Connected to imap.eecs.tufts.edu.
>          Escape character is '^]'.
>          * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS LOGINDISABLED] Dovecot ready.
>
>   4. I used these command lines:
>
>          env LC_ALL=C fetchmail -V > version.out
>          env LC_ALL=C fetchmail -v -L verbose.log
>          env LC_ALL=C fetchmail -vvv -L vvv.log
>          env LC_ALL=C fetchmail --nodetach -vvv --nosyslog > vvv.1
>
>   5. Outputs are attached.
>
> Any help would be appreciated.

Norman,

thanks for a thorough report. What you are writing looks strange, and I
looked through the relevant source files (imap.c, driver.c, transact.c),
around the expunge_period variable, and it is confusing. There do not
appear to be strange patches inside Debian's package tracker, and I
think I will need to debug a bit deeper. Normally, Dovecot is also
well-behaved as a server and rather efficient, but if the host system is
under I/O strain and using mbox-like mailbox storage, it may be
inefficient with expunges because it might rewrite the mbox without the
expunged single message again and again - but then again the mailbox has
some mere 30 kByte in 10 messages, so that should not be it...   I am
not sure if the --all option spoils things - but nothing strikes my eye
in the source code.

Can you send only the .fetchmailrc part on imap.eecs.tufts.edu *without
password* so it's more concise to see?

Regards,
Matthias



_______________________________________________
Fetchmail-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/fetchmail-users