Duet3D Logo Duet3D
    • Tags
    • Documentation
    • Order
    • Register
    • Login

    Execonmcode + msmtp

    Scheduled Pinned Locked Moved
    Plugins for DWC and DSF
    3
    8
    346
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scumdeadundefined
      scumdead
      last edited by

      Good morning,

      I can’t get this command to work:
      echo "Subject: Scub\nImpression terminée" | msmtp scumdead@gmx.fr

      This works on the sbc, so msmtp is correctly installed.

      Thank you for your help.

      chrishammundefined 1 Reply Last reply Reply Quote 0
      • chrishammundefined
        chrishamm administrators @scumdead
        last edited by

        @scumdead It looks like ExecOnMCode is missing the networkAccess permission, so msmtp cannot communicate with external services. @Falcounet you may want to add it to the next version (see also here for a list of other permissions).

        To work-around it, you could probably enable sudo support (see here) and run something like this instead:

        sudo bash -c 'echo "Subject: Scub\nImpression terminée" | msmtp scumdead@gmx.fr'
        

        Duet software engineer

        Falcounetundefined 1 Reply Last reply Reply Quote 1
        • Falcounetundefined
          Falcounet @chrishamm
          last edited by

          @scumdead @chrishamm I may release a version to fix that.
          I didn't wanted to add all the required permissions but it looks like I have to (except superUser) as that kind of plugin allow the user to do almost anything on the system.

          1 Reply Last reply Reply Quote 0
          • scumdeadundefined
            scumdead
            last edited by

            @chrishamm said in Execonmcode + msmtp:

            sudo bash -c 'echo "Subject: Scub\nImpression terminée" | msmtp scumdead@gmx.fr'

            Thank you for your answers, but it’s not working.

            Falcounetundefined 1 Reply Last reply Reply Quote 0
            • Falcounetundefined
              Falcounet @scumdead
              last edited by Falcounet

              @scumdead I've released v0.3 to fix the plugins permissions : https://github.com/LoicGRENON/DSF_ExecOnMcode_Plugin/releases/download/v0.3/ExecOnMcode-0.3.zip

              For the workaround to work, you first need to enable sudo support but that should not be needed with v0.3

              1 Reply Last reply Reply Quote 0
              • scumdeadundefined
                scumdead
                last edited by

                Thanks for the new version.
                Msmtp does not seem to want to work, the msmtprc file cannot exist for the DSF user.

                Thank you for your help.

                Falcounetundefined 1 Reply Last reply Reply Quote 0
                • Falcounetundefined
                  Falcounet @scumdead
                  last edited by

                  @scumdead DSF user doesn't have HOME so yes you can't define a user configuration for it but you can still use the system configuration located at /etc/msmtprc

                  1 Reply Last reply Reply Quote 0
                  • scumdeadundefined
                    scumdead
                    last edited by

                    It works after: chown dsf etc/msmtprc.
                    Do not use sudo, otherwise the body of the message does not appear.
                    Thanks, with your plugin, my printers will notify their status now.

                    1 Reply Last reply Reply Quote 0
                    • First post
                      Last post
                    Unless otherwise noted, all forum content is licensed under CC-BY-SA