¥½¡¼¥¹¤Î¥À¥¦¥ó¥í¡¼¥É †²¼½àÈ÷ †É¬Íפʥǥ£¥ì¥¯¥È¥ê¤ä¥°¥ë¡¼¥×¡¦¥¢¥«¥¦¥ó¥È¤òÁ°¤â¤Ã¤Æ¤Ä¤¯¤Ã¤Æ¤ª¤¯ 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Á°¤ËɬÍפȤʤë¥Ñ¥Ã¥Á¤òÁ°¤â¤Ã¤Æ¥À¥¦¥ó¥í¡¼¥É /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 ¤µ¤é¤Ë¥Ñ¥Ã¥Á¤ò¤¢¤Æ¤ëɬÍפ¬¤¢¤ë¡£
¡Ê»²¹Í¡Ë # 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¤âÅö¤Æ¤Æ¤ª¤¤Þ¤·¤ç¤¦¡£ ¥¤¥ó¥¹¥È¡¼¥ë # make setup check ¥¤¥ó¥¹¥È¡¼¥ë¸å¤ÎÀßÄê †# ./config # cat /var/qmail/control/me ¤È¤·¤Æ¡¢Àµ¤·¤¤¥µ¡¼¥Ð¡¼Ì¾¤¬¥»¥Ã¥È¤µ¤ì¤Æ¤¤¤ì¤Ð£Ï£Ë ¥À¥á¤Ê¾ì¹ç # ./config-fast ¥Þ¥·¥ó̾.¥É¥á¥¤¥ó̾(.com¤ä.co.jp¤Þ¤Ç) ¤È¤·¤Æ¡¢ÀßÄê¤À¤±¤ò´°Î» ¥á¡¼¥ëÍѥǥ£¥ì¥¯¥È¥ê¤ÎºîÀ® †¼ÂºÝ¤Ë¥á¡¼¥ë¤ò»È¤¤¤¿¤¤¥¢¥«¥¦¥ó¥È¤Ë¤Ê¤Ã¤Æºî¶È¤¹¤ë # su hogehoge $ cd $ /var/qmail/bin/maildirmake ./Maildir ¤µ¤é¤Ë¡¢¥Û¡¼¥à¥Ç¥£¥ì¥¯¥È¥ê¤Ë .qmail ¤È¤¤¤¦¥Õ¥¡¥¤¥ë¤ò³Æ¥¢¥«¥¦¥ó¥ÈËè¤ËÃÖ¤¤¤Æ¡¢qmail¤ÎÆ°ºîÀßÄê¤ò¥¨¥Ç¥£¥¿Åù¤Çµ½Ò¤¹¤ë ¥á¡¼¥ë¤ò¥Ç¥£¥ì¥¯¥È¥ê¤ËÊݸ¤¹¤ë¾ì¹ç ./Maildir/ ¥á¡¼¥ë¤òÆÃÄê¤Î¥¢¥É¥ì¥¹¤ØžÁ÷¤¹¤ë¾ì¹ç &xxxx@example.com~ ɬÍפʥ¢¥«¥¦¥ó¥Èʬ¡¢¤³¤Îºî¶È¤ò¤·¤Æ¤ª¤¯ ¤µ¤é¤Ë´ÉÍýÍѤΥ¢¥«¥¦¥ó¥È¤ò /var/qmail/alias ¤ÎÃæ¤ËÀßÄꤷ¤Æ¤ª¤¯ ºÇÄã¸ÂɬÍפʥ¢¥«¥¦¥ó¥È¡§ root¡¢mailer-daemon¡¢postmaster ¼ÂºÝ¤Ë¤Ï¡¢ # 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/ (¢«ºÇ¸å¤Î¥¹¥é¥Ã¥·¥å¤¬½ÅÍ×)¤È¤·¤Æ¤ª¤¯ ¼¡¤Ë¡¢µ¯Æ°¥¹¥¯¥ê¥×¥È¤òºîÀ® #!/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¤È¤«¡¢¼ÂºÝ¤Î¥á¡¼¥ë¥¢¥«¥¦¥ó¥È̾¤Î¸å¤í¤Ë¥Ï¥¤¥Õ¥ó¡Ö-¡×¤òÉÕ¤±¤¿¥á¡¼¥ë¥¢¥É¥ì¥¹¤¬Í¸ú¤Ë¤Ê¤ë # 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 ¤ò»ÈÍѤ¹¤ë # 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 ¤ò»ÈÍÑ # 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
¾¤Ë¤Ï¤³¤Á¤é¤ò»²¹Í http://man.qmail.jp/jman8/qmail-command.html ¥í¡¼¥«¥ë¥µ¡¼¥Ð¡¼¤«¤é¤Î¥á¡¼¥ëÁ÷¿® OB25BÂкö †/var/qmail/control/smtproutes ¤òºîÀ® example.com:example.jp:587 username password (¥É¥á¥¤¥ó̾:žÁ÷Àè:¥Ý¡¼¥ÈÈÖ¹æ ¥æ¡¼¥¶¡¼Ì¾ ¥Ñ¥¹¥ï¡¼¥É) |