On Sun, Nov 09, 2025 at 16:11:57 -0500, Jeffrey Walton wrote:
> On Sun, Nov 9, 2025 at 1:03 PM Nicolas George <[email protected]> wrote:
> >
> > [email protected] (HE12025-11-09):
> > > if i wanted to have the same results as my command above
> > > but wanted to do it so it didn't consume memory for storage
> > > and i didn't want to manage files
> > > what might a good alternate strategy be
> > > is there a replacement for mail that uses file storage
> >
> > Reality check: are you saying that you are concerned by the memory usage
> > of storing the output of your command but want to send it by mail? Are
> > there exceptional constraints that we do not know about?
> 
> It sounds like OP wants to use temporary files rather than memory.  Or
> I could be parsing "...is there a replacement for mail that uses file
> storage [instead of memory]" incorrectly.  That is also based on what
> Greg said:
> 
>     > The first command is writing to the "write end of the pipe", and any
>     > output it produces will be buffered in memory until it's read by
>     > the second command, mail.

I'm having a great deal of difficulty understanding what the OP wants.
They said "i didn't want to manage files" and "is there a replacement
for mail that uses file storage", which is so self-contradictory that
I can't make any sense of it.

The default pipe buffer size on Linux is 64kB, which is such a ludicrously
*small* amount of memory on today's systems that it's not even worth
thinking about.  I hope that's not what the OP is worried about.

If the OP is worried about the behavior of mail(1) with respect to
storing a (potentially) huge message in memory prior to passing it along
to the MTA, then that's a different matter.  But they have never told
us how big these messages are, or what issue they're even having.

At this point, for all we know there might not be *any* issue at all
other than the OP's baseless worries.

Reply via email to