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)
                     [email protected]
sAID998F003775       15 Tue Nov 18 13:09 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID99Xx003776)
                     [email protected]
sAID7sxW003748      116 Tue Nov 18 13:07 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID7sQr003749)
                     [email protected]
sAID6QO1003700      117 Tue Nov 18 13:06 me
                 (Deferred: 421 4.3.0 collect: Cannot write ./dfsAID6Qda003701)
                     [email protected]
        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 [email protected]

1 Answer 1

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

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .