Nicolas George
2024-07-29 13:40:01 UTC
Hi.
I am looking for a tool that reads a mail from its input and stores it
into an IMAP mailbox:
cat mail_file | imapupload imaps://***@server/Mail/incoming
The goal would be to provide our users an alternative to forwarding
their mail to another mail provider that we will have to forbid lest the
other mail providers accuse us of spamming.
I got curl to work (I did not know that curl could do IMAP):
curl --user george --url imaps://server/Mail/testcurl --upload-file /tmp/mail
Unfortunately, curl hardcodes that mail uploaded that way are seen:
/* Send the APPEND command */
result = imap_sendf(data,
"APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
mailbox, data->state.infilesize);
… and I need them to be new.
Alternatively, I have considered using GNU mailutils:
movemail /tmp/mail imaps://***@server/Mail/testcurl
This time, the issue is it insists on finding the password in
~/.mu-tickets without an option to use another file or preferably a
pipe.
Does anybody here have an idea to make all this better?
Thanks in advance,
I am looking for a tool that reads a mail from its input and stores it
into an IMAP mailbox:
cat mail_file | imapupload imaps://***@server/Mail/incoming
The goal would be to provide our users an alternative to forwarding
their mail to another mail provider that we will have to forbid lest the
other mail providers accuse us of spamming.
I got curl to work (I did not know that curl could do IMAP):
curl --user george --url imaps://server/Mail/testcurl --upload-file /tmp/mail
Unfortunately, curl hardcodes that mail uploaded that way are seen:
/* Send the APPEND command */
result = imap_sendf(data,
"APPEND %s (\\Seen) {%" CURL_FORMAT_CURL_OFF_T "}",
mailbox, data->state.infilesize);
… and I need them to be new.
Alternatively, I have considered using GNU mailutils:
movemail /tmp/mail imaps://***@server/Mail/testcurl
This time, the issue is it insists on finding the password in
~/.mu-tickets without an option to use another file or preferably a
pipe.
Does anybody here have an idea to make all this better?
Thanks in advance,
--
Nicolas George
Nicolas George