Fetchmail only writes the most recent mail

daniel_1983--- via Fetchmail-users <[email protected]>
Newsgroups gmane.mail.fetchmail.user
Message-ID <nf6RVhUG7gvL7xS0MwVYJDSkpzpQcxp69Vz2rY6avpIofVJ8791NcVTWgefOCNOQsuLzqHpRgd6TaJlGrZC1JwOQpTSvj2ox1lZGh6F5Sfc=@protonmail.com>
Hello !

I'm trying fetchmail on the command line, here's what I came up with

fetchmail -p IMAP \ # use the IMAP protocol
-r "INBOX.Brigands" \ # to fetch mail from the Brigands folder
-k \ # keep mail on the server
-a \ # retrieve seen and unseen mail
-u user@domain mail.server.com \ # my username
--mda "/bin/sh -c 'cat > /mnt/partage_local/DATA/MAIL/principale-fetchmail/DRAFT/new/$(date +%''s_%N)'" # my MDA



Here's what output on the terminal

ychaouche#ychaouche-PC 11:52:46 ~ $ fetchmail -r "INBOX.Brigands" [...]
reading message user@[email protected]:1 of 6 (2149 header octets) (1994 body octets) not flushed
reading message user@[email protected]:2 of 6 (2103 header octets) (72981 body octets) not flushed
reading message user@[email protected]:3 of 6 (2204 header octets) (71475 body octets) not flushed
reading message user@[email protected]:4 of 6 (1966 header octets) (1348 body octets) not flushed
reading message user@[email protected]:5 of 6 (1874 header octets) (1267 body octets) not flushed
reading message user@[email protected]:6 of 6 (2351 header octets) (71410 body octets) not flushed
ychaouche#ychaouche-PC 11:53:26 ~ $


Mail should be put in /mnt/partage_local/DATA/MAIL/principale-fetchmail/DRAFT/new/, but here's the only thing I see :

ychaouche#ychaouche-PC 12:19:47 /mnt/partage_local/DATA/MAIL/principale-fetchmail/DRAFT/new $ ls
total 72K
-rwxrwxrwx 1 root root 72K Aug  9 12:19 1533813591_348482458
ychaouche#ychaouche-PC 12:19:59 /mnt/partage_local/DATA/MAIL/principale-fetchmail/DRAFT/new $


And it's not an mbox file with multilpe emails, it's really just one e-mail, the most recent one to be more precise.

Anybody want to help me fix this ?





------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.