1

Due to a bug in another script, there were 1000's of mails in var/spool/mqueue.

I read somewhere that one should delete /var/spool/mqueue to prevent the messages from being sent.

Unfortunately, after doing so it seems that sendmail can't send mail! When I tried to send mail, I would never receive it.

Running mailq gave the following output:

MSP Queue status...
        /var/spool/mqueue-client (4 requests)
-----Q-ID----- --Size-- -----Q-Time----- ------------Sender/Recipient-----------
sAID7J0d003724       13 Tue Nov 18 13:07 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID7JS9003725)
                     dude@me.com
sAID998F003775       15 Tue Nov 18 13:09 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID99Xx003776)
                     dude@me.com
sAID7sxW003748      116 Tue Nov 18 13:07 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID7sQr003749)
                     me@dude.com
sAID6QO1003700      117 Tue Nov 18 13:06 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID6Qda003701)
                     me@dude.com
        Total requests: 4
MTA Queue status...
/var/spool/mqueue is empty
        Total requests: 0
me@mycomp:/var/spool/mqueue$ 

How do I fix this ?

EDIT: I normally send mail by doing:

echo "My message" | sendmail me@mymail.com
1

Create directory with below command

mkdir  /var/spool/mqueue

Make sure mqueue directory has correct permission

chown root:mail /var/spool/mqueue

Then restart Sendmail

service sendmail restart

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.