Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Tuesday 10 December 2013

Mail stucked in /var/spool/mqueue




Problem:
mails get stucked in /var/spool/mqueue
Note: If this document does not resolve your problem, please check or troubleshoot your sendmail.cf configuration file.
Solution:
nimserver(/usr/spool)#ls -ld /var/spool/mail
drwxrwxr--    2 bin      mail            256 Feb 04 13:39 /var/spool/mail
nimserver(/usr/spool)#

After changing permission of /var/spool/mail to 775.

nimserver(/usr/spool)#ls -ld /var/spool/mail
drwxrwxr-x    2 bin      mail            256 Feb 04 13:39 /var/spool/mail
nimserver(/usr/spool)#

Check how many mails get stuck, in my case its just two..

nimserver(/var/spool/mqueue)#ls -ltr
total 40
-rw-------    1 root     system         5086 Feb 04 09:58 dfr14FwhRe5177576
-rw-------    1 root     system            5 Feb 04 10:01 dfr14G1ps77471166
-rw-------    1 root     system          804 Feb 04 10:18 qfr14FwhRe5177576
-rw-------    1 root     system          729 Feb 04 10:22 qfr14G1ps77471166
nimserver(/var/spool/mqueue)#

Lets push them…

nimserver(/)#sendmail -v -q
Running /var/spool/mqueue/r14G1ps77471166 (sequence 1 of 2)
afzal_tahir@yourdomain.com... Connecting to smtp01.yourdomain.com. via relay...
220 smtp01.yourdomain.com ESMTP Service (Lotus Domino Release 8.5.2FP2 HF252) ready at Mon, 4 Feb 2013 14:50:56 -0500
>>> EHLO nimserver.yourdomain.com
250-smtp01.yourdomain.com Hello nimserver.yourdomain.com ([192.168.2.30]), pleased to meet you
250-HELP
250-SIZE 25600000
250 PIPELINING
>>> MAIL From: SIZE=412
250 afzalt@nimserver.yourdomain.com... Sender OK
>>> RCPT To:
>>> DATA
250 afzal_tahir@yourdomain.com... Recipient OK
354 Enter message, end with "." on a line by itself
>>> .
250 Message accepted for delivery
afzal_tahir@yourdomain.com... Sent (Message accepted for delivery)
Running /var/spool/mqueue/r14FwhRe5177576 (sequence 2 of 2)
>>> RSET
250 Reset state
afzal_tahir@yourdomain.com... Using cached ESSMTP connection to smtp01.yourdomain.com. via relay...
>>> MAIL From: SIZE=5553
250 afzalt@nimserver.yourdomain.com... Sender OK
>>> RCPT To:
>>> DATA
250 afzal_tahir@yourdomain.com... Recipient OK
354 Enter message, end with "." on a line by itself
>>> .
250 Message accepted for delivery
afzal_tahir@yourdomain.com... Sent (Message accepted for delivery)
Closing connection to smtp01.yourdomain.com.
>>> QUIT
221 smtp01.yourdomain.com SMTP Service closing transmission channel
root@nimserver(/)#

Check again!
nimserver(/var/spool/mqueue)#ls -ltr
total 0
nimserver(/var/spool/mqueue)#

No comments:

Post a Comment