On Sat, 13 Nov 2021 23:31, Carlos E. R.
El 2021-11-13 a las 23:20 +0100, Yamaban escribió:
On Sat, 13 Nov 2021 22:20, Carlos E. R.
wrote: <snip> The result should be an mbox file:
...
cer@minas-tirith:~>
Hint: man procmail, quote: "To make `egrepping' of headers more consistent, procmail concatenates all continued header fields; but only internally. When delivering the mail, line breaks will appear as before."
IFAIKS procmail itself has no option to make this concatenation permanent.
The tool you look fot is "formail" esp. with the "-c" option.
man formail, quote: "-c Concatenate continued fields in the header. Might be convenient when postprocessing mail with standard (line oriented) text utilities."
In my personal .procmailrc after sorting out hard spam, I use a recipy to pipe every mail through formail with the -c -f and -z options, example:
[code] # ======================================END of SPAM, unfold header lines. : 0 fhw | formail -cfz [/code]
I hope this gives you an idea to go forward.
No, sorry, I don't understand what you are trying to say.
My purpose is very simple: fetch some mail with fetchmail and put it directly into a single mbox folder, no filtering done, no sorting at all. Just read from remote folder and put on local folder. Simple.
I have copied the recipe from here:
https://unix.stackexchange.com/questions/206628/fetchmail-fetch-sent-mail-to...
He does in fetchmail:
poll mail.example.com protocol imap user "me.there" password "password" is "me.here"
and in procmail:
MAILDIR="$HOME/Dropbox/Mail" DEFAULT="inbox/" LOGFILE="$HOME/.procmail.log"
# [cut several lines]
: 0 * ^List-Id:.*macports-changes.lists.macosforge.org macports-changes/
: 0 * ^List-Id:.*macports-users.lists.macosforge.org macports-users/
# [etc.]
That's all, and it is not working. He is using maildir, and I need mbox; but the result I get is not mbox.
It is the first time I use 'mda' in fetchmail and "-m".
in your .procmailrc before the deliver to folder part: [your code] # Everything goes to a single folder. # testing. :0 $HOME/Mail/alpine_r_tl_tmp [/your code] with my pipe: (formail is called as $FORMAIL in your case) [new code] # Everything goes to a single folder. :0 fhw | $FORMAIL -cfz # testing. :0 $HOME/Mail/alpine_r_tl_tmp [/new code] more clear / non-ambiguous now? - Yamaban