qmail _ qmHandle _ queue-fix

# /var/qmail/bin/qmail-qstat
messages in queue: 984
messages in queue but not yet preprocessed: 0
-> queue 삭제 /var/qmail/queue/(remote, info, mess)

qmHandle로 큐삭제
wget http://jaist.dl.sourceforge.net/sourceforge/qmhandle/qmhandle-1.2.3.tar.bz2
프로그램다운 후 압축해제하면 qmHandle이라는 파일을 /usr/local/bin가 복사하면 설치는 끝난다

사용법은
qmHandle –help
qmHandle v1.2.3
Copyright 1998-2003 Michele Beltrame

Available parameters:
-a     : try to send queued messages now (qmail must be running)
-l     : list message queues
-L     : list local message queue
-R     : list remote message queue
-s     : show some statistics
-mN    : display message number N
-dN    : delete message number N
-Stext : delete all messages that have/contain text as Subject
-D     : delete all messages in the queue (local and remote)
-V     : print program version

Additional (optional) parameters:
-c     : display colored output
-N     : list message numbers only
(to be used either with -l, -L or -R)

You can view/delete multiple message i.e. -d123 -v456 -d567

qmHandle -l  (큐리스트를 보여준다.)
qmHandle -L (큐리스트를 자세히 보여준다.)
qmHandle -D (모든큐를 삭제한다. 삭제하면서 qmail서비스를 재시작한다.

queue-fix로 안전하게 삭제/복구하기
————————————————————————————–
– 작성자 : 김혁중(티니) [sky(golbangi or at)tini4u.net]
– 작성일 : 2006-07-26
– 사이트 : http://linux.tini4u.net/
– 원제목 : 큐안의 메일을 안전하게 삭제/복구 하기
– 환 경 : CentOS 4.3
– 키워드 : queue-fix
————————————————————————————–

메일서버를 운영하다보면 가끔 원치 않게 큐 디렉토리를 삭제해야 되는 일이 생깁니다.
그럴 경우에는 임의적으로 삭제/복구 하는 방법 보다는 Eric Huss가 제작한 queue-fix를
사용하는것이 안전하고 좋습니다.

1. queue-fix 다운로드

[root@localhost]# wget http://www.netmeridian.com/e-huss/queue-fix.tar.gz
[root@localhost]# tar xfz queue-fix.tar.gz
[root@localhost]# cd queue-fix
[root@localhost]# make

2. 큐메일 프로세스 정지

[root@localhost]# service qmail stop

3. 큐메일 디렉토리 삭제

[root@localhost]# rm -rf /var/qmail/queue

4. 큐메일 디렉토리 복구

[root@localhost]# ./queue-fix -i /var/qmail/queue

5. 큐메일 프로세스 시작

[root@localhost]# service qmail start

※ 여기서 중요한것은 큐메일 디렉토리를 삭제하고 복구를 했을 경우
일부 시스템에서는 리부팅을 해줘야만 완전히 복구 되는 경우가 있습니다

make시 아래와같이 오류가 날 경우
/usr/bin/ld: errno: TLS definition in /lib/libc.so.6 section .tbss mismatches no
/lib/libc.so.6: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [queue-fix] 오류 1

—–해결책
파일명 : conf-cc

수정전 : gcc -O2
수정후 : gcc -O2 –include /usr/include/errno.h  

출처:qmail 큐삭제  http://sig3067.egloos.com/5695514

 

Leave your Comment

Your email address will not be published. Required fields are marked *