Is it possible for sendmail to not use all the output from a bash subshell piped to it?In what order do piped...

Gravitational Force Between Numbers

Why did OJ Simpson's trial take 9 months?

To exponential digit growth and beyond!

How can I minimize the damage of an unstable nuclear reactor to the surrounding area?

Papers on ArXiv as main references

What did the 'turbo' button actually do?

How can I get a refund from a seller who only accepts Zelle?

How would a developer who mostly fixed bugs for years at a company call out their contributions in their CV?

Why'd a rational buyer offer to buy with no conditions precedent?

Is "vegetable base" a common term in English?

How to query/filter by the value of a lightswitch

What is to the west of Westeros?

Was this scene in S8E06 added because of fan reactions to S8E04?

Is there a simple example that empirical evidence is misleading?

Storing voxels for a voxel Engine in C++

I want to ask company flying me out for office tour if I can bring my fiance

Are PMR446 walkie-talkies legal in Switzerland?

How does Dreadhorde Arcanist interact with split cards?

If I arrive in the UK, and then head to mainland Europe, does my Schengen visa 90 day limit start when I arrived in the UK, or mainland Europe?

Who wrote “A writer only begins a book. A reader finishes it.”?

Is keeping the forking link on a true fork necessary (Github/GPL)?

Why did it take so long for Germany to allow electric scooters / e-rollers on the roads?

Time complexity of an algorithm: Is it important to state the base of the logarithm?

Complications of displaced core material?



Is it possible for sendmail to not use all the output from a bash subshell piped to it?


In what order do piped commands run?Apache mail sending flowchart / workflow?Rule for invoking subshell in Bash?sendmail configuration to use CNAME domain as the from FQDNHow to use the bash builtin to replace the output of a subshell or functionExecuting command for sendmail not workingCapture the output of a shell function without a subshellSubshell for Bash ScriptWhat are all the ways to create a subshell in bash?Why bash does not spawn a subshell for simple commands?Why is the output on this ping outside the subshell?






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















( GNU bash, version 4.2.50(1)-release (powerpc-ibm-aix6.1.2.0))



(
echo "a"
echo "b"
echo "c"
)| sendmail -F "Sender" recipients@a.com


This runs inside a .sh file, and the log (when ran with the -x option) show the sendmail before echo "c".



I am trying to debug why sendmail fails sporadically. Since the subshell and sendmail run in parallel, is it possible for sendmail to not wait for the whole subshell to be over, and use only the partial output until echo b and proceed to send an incomplete email and then fail? (There are no error messages in stderr though, the email just doesn't show up in my inbox mysteriously for some executions)



For more context:
The echo commands I wrote above are just placeholders, I am actually trying to prepare an email as in this answer https://stackoverflow.com/a/3335377/11521011 and pipe it to sendmail










share|improve this question









New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

    – Jesse_b
    2 days ago













  • Also see In what order do piped commands run?

    – steeldriver
    2 days ago











  • @Jesse_b Thanks, I rephrased and added more context

    – dbza
    18 hours ago


















0















( GNU bash, version 4.2.50(1)-release (powerpc-ibm-aix6.1.2.0))



(
echo "a"
echo "b"
echo "c"
)| sendmail -F "Sender" recipients@a.com


This runs inside a .sh file, and the log (when ran with the -x option) show the sendmail before echo "c".



I am trying to debug why sendmail fails sporadically. Since the subshell and sendmail run in parallel, is it possible for sendmail to not wait for the whole subshell to be over, and use only the partial output until echo b and proceed to send an incomplete email and then fail? (There are no error messages in stderr though, the email just doesn't show up in my inbox mysteriously for some executions)



For more context:
The echo commands I wrote above are just placeholders, I am actually trying to prepare an email as in this answer https://stackoverflow.com/a/3335377/11521011 and pipe it to sendmail










share|improve this question









New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.















  • 2





    I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

    – Jesse_b
    2 days ago













  • Also see In what order do piped commands run?

    – steeldriver
    2 days ago











  • @Jesse_b Thanks, I rephrased and added more context

    – dbza
    18 hours ago














0












0








0








( GNU bash, version 4.2.50(1)-release (powerpc-ibm-aix6.1.2.0))



(
echo "a"
echo "b"
echo "c"
)| sendmail -F "Sender" recipients@a.com


This runs inside a .sh file, and the log (when ran with the -x option) show the sendmail before echo "c".



I am trying to debug why sendmail fails sporadically. Since the subshell and sendmail run in parallel, is it possible for sendmail to not wait for the whole subshell to be over, and use only the partial output until echo b and proceed to send an incomplete email and then fail? (There are no error messages in stderr though, the email just doesn't show up in my inbox mysteriously for some executions)



For more context:
The echo commands I wrote above are just placeholders, I am actually trying to prepare an email as in this answer https://stackoverflow.com/a/3335377/11521011 and pipe it to sendmail










share|improve this question









New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











( GNU bash, version 4.2.50(1)-release (powerpc-ibm-aix6.1.2.0))



(
echo "a"
echo "b"
echo "c"
)| sendmail -F "Sender" recipients@a.com


This runs inside a .sh file, and the log (when ran with the -x option) show the sendmail before echo "c".



I am trying to debug why sendmail fails sporadically. Since the subshell and sendmail run in parallel, is it possible for sendmail to not wait for the whole subshell to be over, and use only the partial output until echo b and proceed to send an incomplete email and then fail? (There are no error messages in stderr though, the email just doesn't show up in my inbox mysteriously for some executions)



For more context:
The echo commands I wrote above are just placeholders, I am actually trying to prepare an email as in this answer https://stackoverflow.com/a/3335377/11521011 and pipe it to sendmail







bash sendmail subshell






share|improve this question









New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










share|improve this question









New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








share|improve this question




share|improve this question








edited 16 hours ago







dbza













New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.








asked 2 days ago









dbzadbza

11




11




New contributor



dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




New contributor




dbza is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.










  • 2





    I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

    – Jesse_b
    2 days ago













  • Also see In what order do piped commands run?

    – steeldriver
    2 days ago











  • @Jesse_b Thanks, I rephrased and added more context

    – dbza
    18 hours ago














  • 2





    I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

    – Jesse_b
    2 days ago













  • Also see In what order do piped commands run?

    – steeldriver
    2 days ago











  • @Jesse_b Thanks, I rephrased and added more context

    – dbza
    18 hours ago








2




2





I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

– Jesse_b
2 days ago







I'm guessing you're actual issue doesn't involve simply echoing a,b,c? There may be something else going on. Also what logs?

– Jesse_b
2 days ago















Also see In what order do piped commands run?

– steeldriver
2 days ago





Also see In what order do piped commands run?

– steeldriver
2 days ago













@Jesse_b Thanks, I rephrased and added more context

– dbza
18 hours ago





@Jesse_b Thanks, I rephrased and added more context

– dbza
18 hours ago










1 Answer
1






active

oldest

votes


















0














You have not used -i in sendmail's command line options.



It makes sendmail treat "single dot only line" as end of message.





share
























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "106"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: false,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });






    dbza is a new contributor. Be nice, and check out our Code of Conduct.










    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f519716%2fis-it-possible-for-sendmail-to-not-use-all-the-output-from-a-bash-subshell-piped%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You have not used -i in sendmail's command line options.



    It makes sendmail treat "single dot only line" as end of message.





    share




























      0














      You have not used -i in sendmail's command line options.



      It makes sendmail treat "single dot only line" as end of message.





      share


























        0












        0








        0







        You have not used -i in sendmail's command line options.



        It makes sendmail treat "single dot only line" as end of message.





        share













        You have not used -i in sendmail's command line options.



        It makes sendmail treat "single dot only line" as end of message.






        share











        share


        share










        answered 8 mins ago









        AnFiAnFi

        1,113510




        1,113510






















            dbza is a new contributor. Be nice, and check out our Code of Conduct.










            draft saved

            draft discarded


















            dbza is a new contributor. Be nice, and check out our Code of Conduct.













            dbza is a new contributor. Be nice, and check out our Code of Conduct.












            dbza is a new contributor. Be nice, and check out our Code of Conduct.
















            Thanks for contributing an answer to Unix & Linux Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f519716%2fis-it-possible-for-sendmail-to-not-use-all-the-output-from-a-bash-subshell-piped%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Taj Mahal Inhaltsverzeichnis Aufbau | Geschichte | 350-Jahr-Feier | Heutige Bedeutung | Siehe auch |...

            Baia Sprie Cuprins Etimologie | Istorie | Demografie | Politică și administrație | Arii naturale...

            Nicolae Petrescu-Găină Cuprins Biografie | Opera | In memoriam | Varia | Controverse, incertitudini...