[GRLUG] Forwarding email files from maildir
Grand Rapids Linux Users Group
grlug at grlug.org
Mon May 18 09:07:23 EDT 2020
To clarify how you'd do that:
for x in /path/to/files/*; do
(
echo "HELO localhost"
echo "MAIL FROM: <sender at address>"
echo "RCPT TO: <recipient at address>"
echo "DATA"
cat ${x}
echo ""
echo "."
) | sendmail -B
done
Note I don't actually use sendmail, I use exim, and I know it supports
batch smtp input. I'm not 100% sure what the right arguments are for
sendmail to support it, or whether you might need some
extra/seperate program to support it.
On Mon, May 18, 2020 at 9:01 AM megadave at gmail.com <megadave at gmail.com>
wrote:
> Use BSMTP. The headers will get passed through as actual headers.
>
>
> On Thu, May 14, 2020 at 5:27 PM Grand Rapids Linux Users Group <
> grlug at grlug.org> wrote:
>
>> ----- Message Text -----
>> Have a bunch of emails in Maildir format, and need to forward to a
>> different email address.
>>
>> Tthe normal "mail new at somewhere.com < filemane" works, but it forwards
>> the
>> raw file; it would be a lot cleaner if it was possible to strip off the
>> headers first.
>>
>> Thanks!
>> --
>> grlug mailing list
>> grlug at grlug.org
>> https://shinobu.grlug.org/mailman/listinfo/grlug
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://shinobu.grlug.org/pipermail/grlug/attachments/20200518/42fe90c9/attachment.html>
More information about the grlug
mailing list