E D R , A S I H C RSS

FrontPage qmail_badung

qmail ;;
emerge -C sendmail ssmtp

qmail과 courier-authlib과 courier-imap설치
# USE="maildir ssl imap" emerge qmail courier-authlib courier-imap queue-fix

개인 정보 입력
# cat /var/qmail/control/servercert.cnf
# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/servercert.cnf,v
1.2 2004/07/18 03:29:51 dragonheart Exp $ # Robin H. Johnson <robbat2@gentoo.org> - October 17, 2003 # This is the openssl config file to generate keys for qmail # It is read by mkservercert

req
# you can increase this value, but be aware that it will make things much slower # this should be a power of 2!
default_bits = 1024
# leave the rest of these alone!
encrypt_key = yes
distinguished_name = req_dn
prompt = no

req_dn
# 2-Letter ISO country code
C=US
# FULL name of state/province/district
# NO abbreviations!ST=Alabama
# FULL name of city
# NO abbreviations!
L=Seoul
# Full Name of your organization
# NO abbreviations!
O=badung mail
# Leave this alone unless specifically need to change it!
OU=Automatically-generated Qmail SMTP SSL key
# This should be a FQDN that resolves to the IP of your server
CN=kkanari.info
# This should be the email address for the administrator of the server emailAddress=postmaster@badung.dnip.net

# Leave this alone!
cert_type
nsCertType = server

# ebuild /var/db/pkg/mail-mta/qmail-1.03-r13/qmail-1.03-r13.ebuild config
# cd /var/qmail/alias
# echo tongseob > .qmail-root
# echo tongseob > .qmail-postmaster
# echo tongseob > .qmail-mailer-daemon

# rc-update add svscan default
# /etc/init.d/svscan start
# cd /service
# ln -s /var/qmail/supervise/qmail-send qmail-send
# queue-fix /var/qmail/queue

# ssh badung@badung
# maildirmake .maildir 또는 Maildir
# qmail-inject badung << EOF
est badung e-mail!!
OF
# cd ~/.maildir/new
# ls -al
-rw------- 1 badung users 321 1월 12 00:59 1105459142.16894.badung,S=246



이상 qmail끝

courier pop/imap
저도 몰랐는데 courier-authlib하고 courier-imap을 둘다 설치해야 한다네요; 위에서 설치 했으므로;
# cd /etc/courier/authlib
# nano authdaemonrc 여기서 authmodulelist를 authmodulelist="authpam authuserdb authshadow authcustom"
이렇게 했습니다 원래 authmysql 이 있었지만 mysql을 안써서 빼버렸어요 다른건 손댄거 없구요

# cd /etc/courier-imap
# vi pop3d.cnf

req
default_bits = 1024
encrypt_key = yes
distinguished_name = req_dn
x509_extensions = cert_type
prompt = no

req_dn
C=US
ST=KoreaO=Courier Mail Server
OU=Automatically-generated POP3 SSL key
CN=badung
emailAddress=postmaster@badung.dnip.net


cert_type
nsCertType = server

# mkpop3dcert
# rc-update add courier-pop3d-ssl default
# /etc/init.d/courier-pop3d-ssl start

# nano imapd.cnf
내용은 pop3d.cnf랑 같아요 Seoul Badung Korea 이런것만 바꾸었어요
# mkimapdcert
# rc-update add courier-imapd-ssl default
# /etc/init.d/courier-imapd-ssl start

# cd /var/qmail/control
# nano conf-smtpd


# Configuration file for qmail-smtpd
# $Header: /var/cvsroot/gentoo-x86/mail-mta/qmail/files/conf-smtpd,v 1.3
2005/01
/03 21:31:33 hansmi Exp $

# Stuff to run before tcpserver
#QMAIL_TCPSERVER_PRE=""
# Stuff to run qmail-smtpd
#QMAIL_SMTP_PRE=""
# Stuff to after qmail-smtpd
#QMAIL_SMTP_POST=""

# this turns off the IDENT grab attempt on connecting TCPSERVER_OPTS="${TCPSERVER_OPTS} -R"

# fixcrio inserts missing CRs at the ends of lines. See:
# http://cr.yp.to/ucspi-tcp/fixcrio.html
# http://cr.yp.to/docs/smtplf.html
#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} fixcrio"

# You might want to use rblsmtpd with this, but you need to fill in a RBL server here first
# see http://cr.yp.to/ucspi-tcp/rblsmtpd.html for more details #QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} rblsmtpd -r RBL-SERVER"
# If you are interested in providing POP or IMAP before SMTP type relaying,
# emerge relay-ctrl, then uncomment the next 2 lines #QMAIL_TCPSERVER_PRE="${QMAIL_TCPSERVER_PRE} envdir /etc/relay-ctrl relay-ctrl-c hdir"
#QMAIL_SMTP_PRE="${QMAIL_SMTP_PRE} relay-ctrl-check"
# In /etc/courier-imap/authdaemonrc add the next line to the end:
#authmodulelist="${authmodulelist} relay-ctrl-allow"
# Then in /etc/courier-imap/{imapd,imapd-ssl,pop3d,pop3d-ssl}
# Add this at the end
#PRERUN="${PRERUN} envdir /etc/relay-ctrl relay-ctrl-chdir"

# This next block is for SMTP-AUTH
# This provides the LOGIN, PLAIN and CRAM-MD5 types
# the 'cmd5checkpw' used in $QMAIL_SMTP_AUTHCHECKPASSWORD supports CRAM-MD5
# and reads it's data from /etc/poppasswd # see the manpage for cmd5checkpw for details on the passwords
# uncomment the next four lines to enable SMTP-AUTH
QMAIL_SMTP_AUTHHOST=$(<${QMAIL_CONTROLDIR}/me)
-z "${QMAIL_SMTP_POST}" && QMAIL_SMTP_POST=/bin/true QMAIL_SMTP_CHECKPASSWORD="/bin/cmd5checkpw"
QMAIL_SMTP_POST="${QMAIL_SMTP_AUTHHOST} ${QMAIL_SMTP_CHECKPASSWORD} ${QMAIL_SMTP _POST}"


맨 마지막에 5줄 정도 # 주석 있던거 풀어 줬어요

QMAIL_SMTP_CHECKPASSWORD to /var/vpopmail/bin/vchkpw) 이거는 vpopmail사용 자에게 해당되더군요;;

# nano servercert.cnf 열어서 파일 내용 고대로 저장 했구요
# rm -rf *.pem
# mkservercert 혹시 뭔가 달라질까 아까 ebuild ~ config했지만 *.pem파일 지우고 다시 생성
# cd /service
# ln -s /var/qmail/supervise/qmail-smtpd qmail-smtpd
# /etc/init.d/svscan restart 여기 까지구요 제가 실패했던 이유는 /service에 qmail-pop3d를 실행시켜 버려서 cou rier-imap하고 충돌나서 인증이안됐었어요 ㅠ.ㅜ 보고 이상한 부분 말씀해 주세요

# cat 각종 파일;
/var/qmail/control의 me locals rcpthosts등등은 badung.dnip.net으로 통일 rcpthosts는 smtp사용해서 메일 보낼때 이 안에 주소가 없으면 허용이 안되더군요 badung@badung /var/qmail/control $ cat rcpthosts badung.dnip.net hanafos.com nate.com msn.com

이렇게;
참 /var/qmail/control/conf-pop3d에서
QMAIL_POP3_CHECKPASSWORD="/bin/cmd5checkpw"
이 부분 주석 풀었어요

그리고 저는 badung가 유저 네임이고 이메일 인증 비번은 실제로 쉘 암호로 접속했어요 jenix옹 말로는 인증 방식을 바꾸고 해야 비번 변경이 가능하데요 일단 여기까지;


* 추가메일 1번
천둥새 기준으로 설정하실때요
pop3 sms ssl 체크해서 9xx포트 쓰면 되구요
smtp는 ssl이 아니라 TLS체크 하셔야 해요
그리고 pop3 메일인증 암호는 까날옹 쉘 접속할때 비번이구요
smtp 는 /etc/poppasswd파일 안에 id:pw식으로 지정해주시면 그거 사용해요
고로 그 파일 들키면 스팸메일의 근원지가 되요;
꺄르륵

* 추가메일 2번
오늘 아침에 jenix옹이 알려 주신건데요 천둥새에서 계정 추가 하고 pop와
smtp사용시 자꾸 인증 창 뜨면요 /etc/courier-imap/pop3d.cnf하고
/var/qmail/control/server...cnf 이 파일 내에서 CN= 이 부분은 까나리 이렇
게만 하지 마시고 실제 도메인을 적어야 해요 저같은 경우
badung@badung.dnip.net중에 badung.dnip.net부분만 적어줬어요 저렇게 고쳐
주신 후에는 각 각 디렉토리의 pop3d.pem하고 server...pem을 지우시고 mkpop
거시기랑 mkserver거시기를 각 각 실행하시고 천둥새를 새로 실행 하시고 인
증서 관련 말 뜨면 항상 허용하겠다고 체크 한번씩만 해주시면 다음부터 안뜨
네요 꾸벅.
Valid XHTML 1.0! Valid CSS! powered by MoniWiki
last modified 2005-01-12 17:13:31
Processing time 0.0419 sec