0

At first I tried fetchmail with the given config. The problem was that all mails in the inbox would be marked as read in IMAP server upon running fetchmail:

set postmaster danial
set no bouncemail
poll mail.tld.com protocol IMAP user "danial" there with password "secret" keep

Next I migrated to getmail6 which didn't mark mails as read on run, but it didn't mark them as read after reading them locally with mail or mutt too; even with --idle=MAILBOX option. Here is the config:

[retriever]
type=SimpleIMAPSSLRetriever
server=mail.tld.com
username=danial
password=secret

[destination] type=Mboxrd path=/var/mail/danial

[options] verbose=0 read_all=false delivered_to=false received=false message_log_syslog=true message_log_verbose=true

How can I make the read behavior correct?

  • Is there a reason you can't use a standard MUA like alpine, etc. to read your mail? Is there a reason you need a special process to run that transparently/automatically? – Thomas Ward Nov 13 '23 at 16:15
  • @ThomasWard I want my mails to be merged with my local mbox in /var/mail/ – Danial Behzadi Nov 13 '23 at 16:35
  • 1
    Both tools you've indicated only fetch mail. Fetchmail obeys IMAP syntax, that when an email is opened and fetched it removes the Unread flag. The other simply pulls your data down. Neither tool is capable of dual-direction sync between a local mailbox and a remote mailbox because there's no mechanisms in those tools to "sync" local against remote (especially with IMAP in play because IDs, etc. change in IMAP systems). If your intention is to have it only be marked as read on remote when you read it locally, there is no system for that. Other than an actual mail client. – Thomas Ward Nov 14 '23 at 01:04

0 Answers0