¥½¡¼¥¹¤Î¥À¥¦¥ó¥í¡¼¥É

qmail-1.03.tar.gz

²¼½àÈ÷

ɬÍפʥǥ£¥ì¥¯¥È¥ê¤ä¥°¥ë¡¼¥×¡¦¥¢¥«¥¦¥ó¥È¤òÁ°¤â¤Ã¤Æ¤Ä¤¯¤Ã¤Æ¤ª¤¯

mkdir /var/qmail
/usr/sbin/groupadd nofiles
/usr/sbin/useradd -g nofiles -d /var/qmail/alias alias
/usr/sbin/useradd -g nofiles -d /var/qmail -s /bin/false qmaild
/usr/sbin/useradd -g nofiles -d /var/qmail -s /bin/false qmaill
/usr/sbin/useradd -g nofiles -d /var/qmail -s /bin/false qmailp
/usr/sbin/groupadd qmail
/usr/sbin/useradd -g qmail -d /var/qmail -s /bin/false qmailq
/usr/sbin/useradd -g qmail -d /var/qmail -s /bin/false qmailr
/usr/sbin/useradd -g qmail -d /var/qmail -s /bin/false qmails

¥¤¥ó¥¹¥È¡¼¥ë

makeÁ°¤ËɬÍפȤʤë¥Ñ¥Ã¥Á¤òÁ°¤â¤Ã¤Æ¥À¥¦¥ó¥í¡¼¥É
¡Êundefined reference to `errno' ¤È¤¤¤¦¥¨¥é¡¼¤òËɤ°¥Ñ¥Ã¥Á¡£»²¹Í¡Ë
qmail-date-localtime.patch

/usr/local/src ¤ËÃÖ¤¤¤ÆŸ³«

# tar xvfz qmail-1.03.tar.gz
# cd qmail-1.03
# patch < ../qmail-date-localtime.patch
# make

make»þ¤Ë¼¡¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬½Ð¤¿¾ì¹ç

 : undefined reference to `errno'
cdb.a(cdb.o)(.text+0xce): more undefined references to `errno' follow
collect2: ld ¤Ï¥¹¥Æ¡¼¥¿¥¹ 1 ¤Ç½ªÎ»¤·¤Þ¤·¤¿
make: *** [tcpserver] ¥¨¥é¡¼ 1

¤µ¤é¤Ë¥Ñ¥Ã¥Á¤ò¤¢¤Æ¤ëɬÍפ¬¤¢¤ë¡£ ¡Ê»²¹Í¡Ë
ucspi-tcp-glibc.patch

# patch < ../ucspi-tcp-glibc.patch

make»þ¤Ë¼¡¤Î¤è¤¦¤Ê¥¨¥é¡¼¤¬½Ð¤¿¾ì¹ç

/lib64/libc.so.6: could not read symbols: Bad value

¤ª¤Þ¤¸¤Ê¤¤¤ò¼Â¹Ô¤·¤Æ¤«¤éºÆÅÙ make

echo "gcc -O2 --include /usr/include/errno.h" > conf-cc

512¥Ð¥¤¥È°Ê¾å¤ÎDNS±þÅú¤Ï¥¨¥é¡¼¤È¤Ê¤ë¤è¤¦¤Ê¤Î¤Ç¡¢qmail-103.patch¤âÅö¤Æ¤Æ¤ª¤­¤Þ¤·¤ç¤¦¡£
qmail¤Çdeferral CNAME_lookup_failed_temporarily

¥¤¥ó¥¹¥È¡¼¥ë

# make setup check

¥¤¥ó¥¹¥È¡¼¥ë¸å¤ÎÀßÄê

# ./config
# cat /var/qmail/control/me

¤È¤·¤Æ¡¢Àµ¤·¤¤¥µ¡¼¥Ð¡¼Ì¾¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ì¤Ð£Ï£Ë

¥À¥á¤Ê¾ì¹ç

# ./config-fast ¥Þ¥·¥ó̾.¥É¥á¥¤¥ó̾(.com¤ä.co.jp¤Þ¤Ç)

¤È¤·¤Æ¡¢ÀßÄê¤À¤±¤ò´°Î»

¥á¡¼¥ëÍѥǥ£¥ì¥¯¥È¥ê¤ÎºîÀ®

¼ÂºÝ¤Ë¥á¡¼¥ë¤ò»È¤¤¤¿¤¤¥¢¥«¥¦¥ó¥È¤Ë¤Ê¤Ã¤Æºî¶È¤¹¤ë
Î㤨¤Ð¡¢¥¢¥«¥¦¥ó¥È hogehoge ¤Î¾ì¹ç

# su hogehoge
$ cd
$ /var/qmail/bin/maildirmake ./Maildir

¤µ¤é¤Ë¡¢¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ë .qmail ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò³Æ¥¢¥«¥¦¥ó¥ÈËè¤ËÃÖ¤¤¤Æ¡¢qmail¤ÎÆ°ºîÀßÄê¤ò¥¨¥Ç¥£¥¿Åù¤Çµ­½Ò¤¹¤ë

¥á¡¼¥ë¤ò¥Ç¥£¥ì¥¯¥È¥ê¤ËÊݸ¤¹¤ë¾ì¹ç

./Maildir/

¥á¡¼¥ë¤òÆÃÄê¤Î¥¢¥É¥ì¥¹¤ØžÁ÷¤¹¤ë¾ì¹ç

&xxxx@example.com~

ɬÍפʥ¢¥«¥¦¥ó¥Èʬ¡¢¤³¤Îºî¶È¤ò¤·¤Æ¤ª¤¯

¤µ¤é¤Ë´ÉÍýÍѤΥ¢¥«¥¦¥ó¥È¤ò /var/qmail/alias ¤ÎÃæ¤ËÀßÄꤷ¤Æ¤ª¤¯

ºÇÄã¸ÂɬÍפʥ¢¥«¥¦¥ó¥È¡§ root¡¢mailer-daemon¡¢postmaster
¡Êroot¥¢¥«¥¦¥ó¥È¤Ë¼Â¹Ô¥Õ¥¡¥¤¥ëÅù¤òʶ¤ì¹þ¤Þ¤µ¤ì¤ë¤Î¤òËɤ°¤¿¤á¡¢qmail¤Ç¤Ï¼ÂºÝ¤Îroot¥¢¥«¥¦¥ó¥È¤Ë¥á¡¼¥ë¤ÏÆϤ«¤Ê¤¤¡Ë

¼ÂºÝ¤Ë¤Ï¡¢

# su alias

¤Çqmail¤Îalias ¥¢¥«¥¦¥ó¥È¤Ë¤Ê¤Ã¤Æ¤«¤é¡¢¼ÂºÝ¤Ë¡¢¤³¤Î¥¨¥ê¥¢¥¹¥¢¥«¥¦¥ó¥È¤Î¥á¡¼¥ë¤òÁ÷¤ê¤¿¤¤¥¢¥É¥ì¥¹¤ò½ñ¤¯

$ echo "&tanaka@xxxxxxx.co.jp" > .qmail-root
$ echo "&tanaka@xxxxxxx.co.jp" > .qmail-mailer-daemon
$ echo "&tanaka@xxxxxxx.co.jp" > .qmail-postmaster

°Ê¾å¤Çɬ¿Ü¥¢¥«¥¦¥ó¥È¤ÎÅÐÏ¿¤Ï½ªÎ»¡£
¤¢¤È¤Ï

$ echo "&yassu@xxxxxxx.co.jp" > .qmail-webmaster

¤È¤¹¤ì¤Ð webmaster@xxxxxxx.co.jp °¸¤Î¥á¡¼¥ë¤¬ yassu@xxxxxxx.co.jp °¸¤ËÆϤ¯¤·¡¢

$ echo "&yakkun@xxxxxxx.co.jp" > .qmail-yassu

¤È¤·¤Æ¤ª¤¯¤È yassu@xxxxxxx.co.jp °¸¤Î¥á¡¼¥ë¤¬ yakkun@xxxxxxx.co.jp °¸¤ËÆϤ¯¡¢¤È¤¤¤Ã¤¿ÀßÄ꤬²Äǽ

µ¯Æ°¥¹¥¯¥ê¥×¥È¤Î½àÈ÷

qmail¤Îµ¯Æ°¥¹¥¯¥ê¥×¥È¤ò¥³¥Ô¡¼¤·¤Æ»ÈÍÑ

# cp /var/qmail/boot/home /var/qmail/rc
# vi /var/qmail/rc

¤È¤·¤Æ¡¢ÅÓÃæ¤Ë¤¢¤ë ./Mailbox ¤ÎÉôʬ¤ò ./Maildir/ (¢«ºÇ¸å¤Î¥¹¥é¥Ã¥·¥å¤¬½ÅÍ×)¤È¤·¤Æ¤ª¤¯

¼¡¤Ë¡¢µ¯Æ°¥¹¥¯¥ê¥×¥È¤òºîÀ®
¥Ñ¥¹¤È¥Õ¥¡¥¤¥ë̾¤Ï /etc/rc.d/init.d/qmaild

#!/bin/sh
############
# Startup script for the Qmail by Penta
#
# chkconfig: 345 55 15
# description: QMAIL SMTP & POP3¥µ¡¼¥Ð¡¼
# processname: qmaild
# pidfile: /var/run/qmaild.pid
# filename /etc/rc.d/init.d/qmaild
#
# Source function library.
. /etc/rc.d/init.d/functions

# See how we were called.
case "$1" in
  start)
        echo -n "Starting qmaild: "
        /usr/local/bin/tcpserver -H -R -x /etc/tcp.smtp.cdb \
         -c 100 -u qmaild -g nofiles 0 smtp \
          /var/qmail/bin/qmail-smtpd 2>&1 \
            /var/qmail/bin/splogger smtpd &
        /usr/local/bin/tcpserver 0 pop3 \
         /var/qmail/bin/qmail-popup ¥Þ¥·¥ó̾.¥É¥á¥¤¥ó̾ \
          /bin/checkpassword /var/qmail/bin/qmail-pop3d Maildir 2>&1 \
            /var/qmail/bin/splogger pop3d &
        /var/qmail/rc &
        echo "ok"
        touch /var/lock/subsys/qmaild
        ;;
  stop)
        echo -n "Shutting down qmail: "
        kill $(/sbin/pidof tcpserver)
        kill $(/sbin/pidof qmail-send)
        echo "ok"
        rm -f /var/lock/subsys/qmaild
        ;;
  restart)
        $0 stop
        $0 start
        ;;
  *)
        echo "Usage: $0 {startstoprestart}"
        exit 1
esac
exit 0
# chmod 755 /etc/rc.d/init.d/qmaild
# /sbin/chkconfig --add qmaild

¼õ¿®Â¦¤ÎÀßÄê

¼õ¿®¤¹¤ë¥Û¥¹¥È¤òÀßÄꤹ¤ë¤Î¤Ï /var/qmail/control/locals ¥¨¥Ç¥£¥¿¤Ç³«¤¤¤Æ¡¢

sv.xxxxx.co.jp
sv
localhost
xxxxx.co.jp

¤³¤³¤Ç¤Ï¡¢sv¤¬¥Þ¥·¥ó̾¡¢xxxxx.co.jp¤¬¥É¥á¥¤¥ó̾¾å¤«¤é½çÈ֤ˡÖÀµ³Î¤Ê¥Û¥¹¥È̾¡×¡Ö¥Û¥¹¥È̾¤Î¥Þ¥·¥ó̾¤ÎÉôʬ¡×¡Ö¥í¡¼¥«¥ë(¥Þ¥·¥óÆâÉô¤«¤é¤ÎÀܳÍѡס֥ɥᥤ¥ó̾(LAN·Ðͳ)¡×

Á÷¿®Â¦¤ÎÀßÄê

smtp¤ËÁ÷¤é¤ì¤Æ¤­¤¿¥á¡¼¥ë¤ò³°¸þ¤±¤ËÁ÷¿®¤¹¤ë¤Î¤«¡¢¥í¡¼¥«¥ë¤ËÊݸ¤¹¤ë¤Î¤«¤ò·è¤á¤ë¤Î¤Ï /var/qmail/control/rcpthosts ¥¨¥Ç¥£¥¿¤Ç³«¤¤¤Æ¡¢¤µ¤Ã¤­¤ÈƱ¤¸¤è¤¦¤ËÊÔ½¸

sv.xxxxx.co.jp
sv
localhost
xxxxx.co.jp

¥À¥Ö¥ë¥Ð¥¦¥ó¥¹¤Îºï½üÀßÄê

¼õ¿®¼Ô¡¢Á÷¿®¼Ô¤È¤â¤Ë¸ºß¤·¤Ê¤¤¥á¡¼¥ë¤ÏÇË´þ¤¹¤ë¤è¤¦¤Ë¤¹¤ë¾ì¹ç¡¢°Ê²¼¤ò¹Ô¤Ê¤¦

# touch /var/qmail/control/doublebounceto

¼õ¿®¼Ô¤ÎÅÐÏ¿

¤³¤³¤ÇÀßÄꤷ¤Æ¤ª¤¯¤È yassu-fan¤È¤«¡¢¼ÂºÝ¤Î¥á¡¼¥ë¥¢¥«¥¦¥ó¥È̾¤Î¸å¤í¤Ë¥Ï¥¤¥Õ¥ó¡Ö-¡×¤òÉÕ¤±¤¿¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬Í­¸ú¤Ë¤Ê¤ë
Linux¾å¤Î¥Ñ¥¹¥ï¡¼¥É¥Õ¥¡¥¤¥ë¤ò¥³¥Ô¡¼

# cp /etc/passwd /var/qmail/users/passwd
# cd /var/qmail/users
# /var/qmail/bin/qmail-pw2u < passwd > assign
# vi assign

ÉÔÍפʹԤϺï½ü¤¹¤ë

=yassu:yassu:500:500:/home/yassu:::
+:yassu:500:500:/home/yassu:-::
=alias:alias:501:501:/var/qmail/alias:::
+:alias:501:501:/var/qmail/alias:-::
.

ºÇ¸å¤Î¥É¥Ã¥È[.]¤À¤±¤Î¹Ô¤Ï¡¢É¬ÍפʤΤǾ䵤ʤ¤¤³¤È

# /var/qmail/bin/qmail-newu

¥æ¡¼¥¶¡¼¥Ç¡¼¥¿¥Ù¡¼¥¹¤Ç¤¢¤ë cdb ¤¬½ÐÍè¤ë¸å¤Ç¡¢¿·¤·¤¤¥¢¥«¥¦¥ó¥È¤òÄɲä·¤¿¤¤»þ¤Ë¤â alias ¤òÊѹ¹¤·¤Æ¡¢Æ±¤¸¤è¤¦¤Ë¼Â¹Ô¤¹¤ë

¥Ø¥ë¥Ñ¡¼¥Ç¡¼¥â¥ó¤ÎÀßÄê

qmail¤ÏñÂΤȤ·¤Æ¤ÏÆ°¤«¤Ê¤¤¤Î¤Ç tcpserver ¤ò»ÈÍѤ¹¤ë

http://cr.yp.to/tcpip.html

# cd /usr/local/src
# tar xvfz ucspi-tcp-0.88.tar.gz
# cd ucspi-tcp-0.88
# make
# make setup check

/usr/local/bin ¤Ë tcpserver ¤Ê¤É¼Â¹Ô¥Õ¥¡¥¤¥ë¤¬½ÐÍè¤ë

¼¡¤Ë¥ë¡¼¥ë¥Ç¡¼¥¿¥Ù¡¼¥¹¤òºîÀ®

¤³¤³¤Ç¤Ï smtpÀìÍѤΥ롼¥ë¤È¤·¤Æ¡¢/etc ¤ÎÃæ¤Ë tcp.smtp.txt ¤òºîÀ®

# vi /etc/tcp.smtp.txt
127.0.0.1:allow,RELAYCLIENT=""
:allow

¤³¤ì¤Ç³°¤«¤é¤â·Ò¤²¤Æ¡¢locals Åù¤ÇÀßÄꤷ¤¿¼«Ê¬¤Î¥É¥á¥¤¥ó°Ê³°¤«¤é¤Ï¥á¡¼¥ë¤ò¼õ¤±ÉÕ¤±¤Ê¤¤

# /usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.txt < /etc/tcp.smtp.txt

/etc/tcp.smtp.cdb ¤¬¤Ç¤­¤ì¤Ð£Ï£Ë

POP3¥µ¡¼¥Ð¡¼¤Î½àÈ÷

qmail ¤ËÉÕ°¤·¤Æ¤¤¤ë qmail-pop3d ¤ò»ÈÍÑ
http://cr.yp.to/checkpwd/install.html

# cd /usr/local/src
# tar xvfz checkpassword-0.90.tar.gz
# cd checkpassword-0.90
# make
# make setup check

qmail¤ÎÆ°ºî¥Æ¥¹¥È

sendmail¤¬Æ°¤¤¤Æ¤¤¤ì¤ÐÄä»ß

# /etc/rc.d/init.d/sendmail stop

qmail¤òµ¯Æ°

# /etc/rc.d/init.d/qmaild start
# echo to: root | /var/qmail/bin/qmail-inject

¤Ç¥á¡¼¥ëÁ÷¿®³Îǧ

°Ê²¼¤Î¥µ¥¤¥ÈÅù¤ÇÉÔÀµÃæ·Ñ¤¬¤Á¤ã¤ó¤È¤Ç¤­¤Ê¤¯¤Ê¤Ã¤Æ¤¤¤ë¤«¤É¤¦¤«³Îǧ

sendmail¤Îºï½ü

sendmail¤¬Æþ¤Ã¤Æ¤¤¤ë¾ì¹ç¤Ïºï½ü

# rpm -qa | grep sendmail

¤Ç¡¢¥Ð¡¼¥¸¥ç¥ó¤Þ¤Ç³Îǧ

# rpm -e sendmailx.xx.xx

¤Ç¡¢ºï½ü

´ØÏ¢¤¹¤ëRPM¥Ñ¥Ã¥±¡¼¥¸¤¬Æþ¤Ã¤Æ¤¤¤ë¤È¡¢¤¦¤Þ¤¯ºï½ü¤Ç¤­¤Ê¤¤¤Î¤Ç¤½¤ì¤â¤¢¤ï¤»¤Æºï½ü

ºÇ¸å¤Ë¡¢¥³¥Þ¥ó¥É¥é¥¤¥ó¤äcgi¤«¤é»È¤ï¤ì¤ësendmail¥³¥Þ¥ó¥É¤òqmail¤Îsendmail¥é¥Ã¥Ñ¡¼¥³¥Þ¥ó¥É¤¹¤ë

# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail
# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail

»²¹Í ±¿ÍÑ´ØÏ¢¥È¥é¥Ö¥ë¥·¥å¡¼¥Æ¥£¥ó¥°½¸ ¥¢¥Ã¥È¥Þ¡¼¥¯¡¦¥¢¥¤¥Æ¥£ÍÍm(__)m

¡Ö-¡×¤«¤é»Ï¤Þ¤ë¥á¡¼¥ë¥¢¥É¥ì¥¹¤ËÁ÷¿®¤Ç¤­¤Ê¤¤¡ª¡©

¥ª¥×¥·¥ç¥ó¤¬ÉÔÀµ¤ÈȽÃǤµ¤ì¤ÆÍî¤Á¤ë¤³¤È¤¬¤¢¤ê¤Þ¤¹

Perl¤Ç¥á¡¼¥ëÁ÷¿®¤·¤¿¾ì¹çApache¤Ë¤Ï¤³¤Î¤è¤¦¤Ê¥í¥°¤¬»Ä¤ê¡¢¥á¡¼¥ëÁ÷¿®¥í¥°¤Ë¤Ï²¿¤â»Ä¤ê¤Þ¤»¤ó

sendmail: illegal option -- a
sendmail: usage: sendmail [ -t ] [ -fsender ] [ -Fname ] [ -bp ] [ -bs ] [ arg ... ]

°Ê²¼¤Î¤è¤¦¤Ë¤·¤ÆÁ÷¿®¤·¤Þ¤·¤ç¤¦

/usr/lib/sendmail -- -hogehoge@example.com

´Ä¶­ÊÑ¿ô¤ò³èÍѤ¹¤ë

dot-qmail¤«¤é¥×¥í¥°¥é¥à¤Ë¥ê¥À¥¤¥ì¥¯¥È¤¹¤ë¾ì¹ç¤Ï´Ä¶­ÊÑ¿ô¤òÍøÍѤ¹¤ë¤Î¤¬ÊØÍø¤½¤¦¤Ç¤¹

Perl

  • $ENV{'SENDER'} : Á÷¿®¸µ
  • $ENV{'RECIPIENT'} : Á÷¿®Àè

¾¤Ë¤Ï¤³¤Á¤é¤ò»²¹Í http://man.qmail.jp/jman8/qmail-command.html

¥í¡¼¥«¥ë¥µ¡¼¥Ð¡¼¤«¤é¤Î¥á¡¼¥ëÁ÷¿® OB25BÂкö

/var/qmail/control/smtproutes ¤òºîÀ®

example.com:example.jp:587 username password
(¥É¥á¥¤¥ó̾:žÁ÷Àè:¥Ý¡¼¥ÈÈÖ¹æ ¥æ¡¼¥¶¡¼Ì¾ ¥Ñ¥¹¥ï¡¼¥É)

¥È¥Ã¥×   ÊÔ½¸ Åà·ë º¹Ê¬ ¥Ð¥Ã¥¯¥¢¥Ã¥× źÉÕ Ê£À½ ̾Á°Êѹ¹ ¥ê¥í¡¼¥É   ¿·µ¬ °ìÍ÷ ¸¡º÷ ºÇ½ª¹¹¿·   ¥Ø¥ë¥×   ºÇ½ª¹¹¿·¤ÎRSS
Last-modified: 2021-09-19 (Æü) 19:09:33