Unable to clear sendmail mqueue-client Announcing the arrival of Valued Associate #679: Cesar...

What is the evidence that custom checks in Northern Ireland are going to result in violence?

Who can become a wight?

Why is ArcGIS Pro not symbolizing my entire range of values?

Why not use the yoke to control yaw, as well as pitch and roll?

Like totally amazing interchangeable sister outfit accessory swapping or whatever

xkeyval -- read keys from file

Are there any AGPL-style licences that require source code modifications to be public?

Why did Europeans not widely domesticate foxes?

Why do people think Winterfell crypts is the safest place for women, children & old people?

How to leave only the following strings?

Lights are flickering on and off after accidentally bumping into light switch

Is "ein Herz wie das meine" an antiquated or colloquial use of the possesive pronoun?

What documents does someone with a long-term visa need to travel to another Schengen country?

Can a Knight grant Knighthood to another?

Can 'non' with gerundive mean both lack of obligation and negative obligation?

Putting Ant-Man on house arrest

Does Prince Arnaud cause someone holding the Princess to lose?

Protagonist's race is hidden - should I reveal it?

A journey... into the MIND

Grounding PCB Within Aluminum Enclosure

Can the van der Waals coefficients be negative in the van der Waals equation for real gases?

Does GDPR cover the collection of data by websites that crawl the web and resell user data

Can a Wizard take the Magic Initiate feat and select spells from the Wizard list?

How to get a single big right brace?



Unable to clear sendmail mqueue-client



Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern)
Come Celebrate our 10 Year Anniversary!Where to check log of sendmail?Sendmail disregarding mailertableHow to delete contents of sendmail's deferred queue?Is Postfix the same thing as Sendmail?fetchmail/sendmail/procmail alternativesendmail access tableDebugging sendmail - dsn=5.0.0Sendmail works fine but PHP is unable to use thatSendMail: Connection refused by [127.0.0.1]Sendmail - Sender verify failed





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}







0















drwxr-xr-x  2 smmsp smmsp  4.0K May  6 23:31 mqueue
drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client


As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to be likely from an internal function sending mail to localhost which is failing.



I've tried numerous attempts to clear the queue but none have succeeded. The result is a process using up significant CPU resources:



16287 smmsp     20   0 50212  44m 2416 R   85  4.4 965:35.45 sendmail-msp


I've tried killing the process, stopping the sendmail service, deleting the contents of the mqueue-client and even switching to the smmsp user. But none have worked. rm hangs when trying to remove the mail.



How can I go about emptying this queue?



Once I've done this I'll move everything over to Postfix.










share|improve this question














bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

    – Janne Pikkarainen
    May 8 '14 at 12:35











  • thanks @janne you helped me solve the problem, see my answer for more info

    – Brodie
    May 8 '14 at 19:30











  • Great! Have a nice weekend. :)

    – Janne Pikkarainen
    May 9 '14 at 9:41











  • To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

    – sanjayparmar
    Sep 18 '18 at 8:25


















0















drwxr-xr-x  2 smmsp smmsp  4.0K May  6 23:31 mqueue
drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client


As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to be likely from an internal function sending mail to localhost which is failing.



I've tried numerous attempts to clear the queue but none have succeeded. The result is a process using up significant CPU resources:



16287 smmsp     20   0 50212  44m 2416 R   85  4.4 965:35.45 sendmail-msp


I've tried killing the process, stopping the sendmail service, deleting the contents of the mqueue-client and even switching to the smmsp user. But none have worked. rm hangs when trying to remove the mail.



How can I go about emptying this queue?



Once I've done this I'll move everything over to Postfix.










share|improve this question














bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
















  • Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

    – Janne Pikkarainen
    May 8 '14 at 12:35











  • thanks @janne you helped me solve the problem, see my answer for more info

    – Brodie
    May 8 '14 at 19:30











  • Great! Have a nice weekend. :)

    – Janne Pikkarainen
    May 9 '14 at 9:41











  • To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

    – sanjayparmar
    Sep 18 '18 at 8:25














0












0








0


1






drwxr-xr-x  2 smmsp smmsp  4.0K May  6 23:31 mqueue
drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client


As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to be likely from an internal function sending mail to localhost which is failing.



I've tried numerous attempts to clear the queue but none have succeeded. The result is a process using up significant CPU resources:



16287 smmsp     20   0 50212  44m 2416 R   85  4.4 965:35.45 sendmail-msp


I've tried killing the process, stopping the sendmail service, deleting the contents of the mqueue-client and even switching to the smmsp user. But none have worked. rm hangs when trying to remove the mail.



How can I go about emptying this queue?



Once I've done this I'll move everything over to Postfix.










share|improve this question














drwxr-xr-x  2 smmsp smmsp  4.0K May  6 23:31 mqueue
drwxrws--- 2 smmsp smmsp 29M May 8 10:40 mqueue-client


As you can see mqueue-client is filled with 29 megabytes of unsent mail. This seems to be likely from an internal function sending mail to localhost which is failing.



I've tried numerous attempts to clear the queue but none have succeeded. The result is a process using up significant CPU resources:



16287 smmsp     20   0 50212  44m 2416 R   85  4.4 965:35.45 sendmail-msp


I've tried killing the process, stopping the sendmail service, deleting the contents of the mqueue-client and even switching to the smmsp user. But none have worked. rm hangs when trying to remove the mail.



How can I go about emptying this queue?



Once I've done this I'll move everything over to Postfix.







email bash unix email-server sendmail






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked May 8 '14 at 9:44









BrodieBrodie

1056




1056





bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.







bumped to the homepage by Community 4 mins ago


This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.















  • Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

    – Janne Pikkarainen
    May 8 '14 at 12:35











  • thanks @janne you helped me solve the problem, see my answer for more info

    – Brodie
    May 8 '14 at 19:30











  • Great! Have a nice weekend. :)

    – Janne Pikkarainen
    May 9 '14 at 9:41











  • To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

    – sanjayparmar
    Sep 18 '18 at 8:25



















  • Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

    – Janne Pikkarainen
    May 8 '14 at 12:35











  • thanks @janne you helped me solve the problem, see my answer for more info

    – Brodie
    May 8 '14 at 19:30











  • Great! Have a nice weekend. :)

    – Janne Pikkarainen
    May 9 '14 at 9:41











  • To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

    – sanjayparmar
    Sep 18 '18 at 8:25

















Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

– Janne Pikkarainen
May 8 '14 at 12:35





Logs, my friend, logs. Have you read them at all? Boldly enter /var/log lair and see what it holds.

– Janne Pikkarainen
May 8 '14 at 12:35













thanks @janne you helped me solve the problem, see my answer for more info

– Brodie
May 8 '14 at 19:30





thanks @janne you helped me solve the problem, see my answer for more info

– Brodie
May 8 '14 at 19:30













Great! Have a nice weekend. :)

– Janne Pikkarainen
May 9 '14 at 9:41





Great! Have a nice weekend. :)

– Janne Pikkarainen
May 9 '14 at 9:41













To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

– sanjayparmar
Sep 18 '18 at 8:25





To remove multiple files you can use find command like find /path/to/files/ -type f -name '*.txt' -exec rm {} ;

– sanjayparmar
Sep 18 '18 at 8:25










1 Answer
1






active

oldest

votes


















0














As suggested by Janne in the comments, I looked over my syslog and found many mail failing to send errors which was causing them to be deferred thus pile up in the mqueue-client folder.



After doing some digging it turns out crontab is set to mail root on completion/notices/warnings/errors. By issuing crontab -e and adding MAILTO="" to the top of the config, no more mail is sent out, problem fixed!



Now I'm clearing out the 1.5 million or so bad emails from mqueue-client using this Bash script:



#!/usr/bin/env bash

cd mqueue-client

deleted=0

for i in `ls`
do
rm -f $i
percentage=$(bc <<< "scale=2; ($deleted / 1035435) * 100")
((deleted++))

echo "Deleted $i. Files deleted $deleted. $percentage% complete."
done


Run from /var/spool using ./filename



Update



Unfortunately after running this script all night the mail queue wasn't being significantly reduced. This was because I hadn't disabled the minute running CRON that was set to clear the queue but was resulting in the backlog growing. Hopefully now this is disabled everything should clear.






share|improve this answer


























    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "2"
    };
    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: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    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
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fserverfault.com%2fquestions%2f593865%2funable-to-clear-sendmail-mqueue-client%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














    As suggested by Janne in the comments, I looked over my syslog and found many mail failing to send errors which was causing them to be deferred thus pile up in the mqueue-client folder.



    After doing some digging it turns out crontab is set to mail root on completion/notices/warnings/errors. By issuing crontab -e and adding MAILTO="" to the top of the config, no more mail is sent out, problem fixed!



    Now I'm clearing out the 1.5 million or so bad emails from mqueue-client using this Bash script:



    #!/usr/bin/env bash

    cd mqueue-client

    deleted=0

    for i in `ls`
    do
    rm -f $i
    percentage=$(bc <<< "scale=2; ($deleted / 1035435) * 100")
    ((deleted++))

    echo "Deleted $i. Files deleted $deleted. $percentage% complete."
    done


    Run from /var/spool using ./filename



    Update



    Unfortunately after running this script all night the mail queue wasn't being significantly reduced. This was because I hadn't disabled the minute running CRON that was set to clear the queue but was resulting in the backlog growing. Hopefully now this is disabled everything should clear.






    share|improve this answer






























      0














      As suggested by Janne in the comments, I looked over my syslog and found many mail failing to send errors which was causing them to be deferred thus pile up in the mqueue-client folder.



      After doing some digging it turns out crontab is set to mail root on completion/notices/warnings/errors. By issuing crontab -e and adding MAILTO="" to the top of the config, no more mail is sent out, problem fixed!



      Now I'm clearing out the 1.5 million or so bad emails from mqueue-client using this Bash script:



      #!/usr/bin/env bash

      cd mqueue-client

      deleted=0

      for i in `ls`
      do
      rm -f $i
      percentage=$(bc <<< "scale=2; ($deleted / 1035435) * 100")
      ((deleted++))

      echo "Deleted $i. Files deleted $deleted. $percentage% complete."
      done


      Run from /var/spool using ./filename



      Update



      Unfortunately after running this script all night the mail queue wasn't being significantly reduced. This was because I hadn't disabled the minute running CRON that was set to clear the queue but was resulting in the backlog growing. Hopefully now this is disabled everything should clear.






      share|improve this answer




























        0












        0








        0







        As suggested by Janne in the comments, I looked over my syslog and found many mail failing to send errors which was causing them to be deferred thus pile up in the mqueue-client folder.



        After doing some digging it turns out crontab is set to mail root on completion/notices/warnings/errors. By issuing crontab -e and adding MAILTO="" to the top of the config, no more mail is sent out, problem fixed!



        Now I'm clearing out the 1.5 million or so bad emails from mqueue-client using this Bash script:



        #!/usr/bin/env bash

        cd mqueue-client

        deleted=0

        for i in `ls`
        do
        rm -f $i
        percentage=$(bc <<< "scale=2; ($deleted / 1035435) * 100")
        ((deleted++))

        echo "Deleted $i. Files deleted $deleted. $percentage% complete."
        done


        Run from /var/spool using ./filename



        Update



        Unfortunately after running this script all night the mail queue wasn't being significantly reduced. This was because I hadn't disabled the minute running CRON that was set to clear the queue but was resulting in the backlog growing. Hopefully now this is disabled everything should clear.






        share|improve this answer















        As suggested by Janne in the comments, I looked over my syslog and found many mail failing to send errors which was causing them to be deferred thus pile up in the mqueue-client folder.



        After doing some digging it turns out crontab is set to mail root on completion/notices/warnings/errors. By issuing crontab -e and adding MAILTO="" to the top of the config, no more mail is sent out, problem fixed!



        Now I'm clearing out the 1.5 million or so bad emails from mqueue-client using this Bash script:



        #!/usr/bin/env bash

        cd mqueue-client

        deleted=0

        for i in `ls`
        do
        rm -f $i
        percentage=$(bc <<< "scale=2; ($deleted / 1035435) * 100")
        ((deleted++))

        echo "Deleted $i. Files deleted $deleted. $percentage% complete."
        done


        Run from /var/spool using ./filename



        Update



        Unfortunately after running this script all night the mail queue wasn't being significantly reduced. This was because I hadn't disabled the minute running CRON that was set to clear the queue but was resulting in the backlog growing. Hopefully now this is disabled everything should clear.







        share|improve this answer














        share|improve this answer



        share|improve this answer








        edited May 9 '14 at 12:21

























        answered May 8 '14 at 16:39









        BrodieBrodie

        1056




        1056






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Server Fault!


            • 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%2fserverfault.com%2fquestions%2f593865%2funable-to-clear-sendmail-mqueue-client%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

            117736 Шеррод Примітки | Див. також | Посилання | Навігаційне...

            As a Security Precaution, the user account has been locked The Next CEO of Stack OverflowMS...

            Маріан Котлеба Зміст Життєпис | Політичні погляди |...