Index: qmapop-smtp-auth/README.auth.qmapop diff -u /dev/null qmapop-smtp-auth/README.auth.qmapop:1.1.2.2 --- /dev/null Wed Sep 20 12:32:57 2006 +++ qmapop-smtp-auth/README.auth.qmapop Wed Sep 20 12:32:39 2006 @@ -0,0 +1,49 @@ +This is qmail-smtpd-auth patch intended to use with cmd5apoppw(*). + +(*)http://www.gentei.org/~yuuji/software/qmapop-smtp-auth/ + +This patch can take only CRAM-MD5 method and suppress +plain text authentication. + +The cmd5apoppw utility using imapext's password manipulation schema, +where each user's password is saved in ~/.apop. Therefore any user can +update their password by themselves. +Of cource, administrator can avoid the chance to know many mail passwords. + +... Japanese text below ... + +[[Installation]] + +1. Extract netqmail-1.05 source and apply patch (sh collate.sh). +2. Get qmail-smtpd-auth-0.31.tar.gz + http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz + +3. Read instructions in README.auth in qmail-smtpd-auth patch. + % cd + % cp ../*.auth ../base64* . + % cat ../auth.patch | patch + +4. Apply this patch + % cat qmapop-smtp-auth-Version.diff | patch + +5. Build them. + % su + # make && make setup check + + +- - - - - - - - - + + +http://members.elysium.pl/brush/qmail-smtpd-auth/ の qmail-smtpd-auth +をベースに、CRAM-MD5認証のみをサポートさせるように変えたものです。 +TLSなどを使わない場合を想定し、平文でパスワード交換をする PLAIN と LOGIN +を抑止します。 + +http://www.gentei.org/~yuuji/software/qmapop-smtp-auth/ +にある cmd5apoppw と組み合わせて使うことを想定しています。 +cmd5apoppw は、「UW-IMAPDてんこもり拡張パック」 +http://www.gentei.org/~yuuji/software/imapext/ +と同じパスワードファイル(~/.apop)を認証パスワードとして使用します。 +ユーザ権限でPOPパスワード(+SMTPパスワード)を登録できるので、 +管理者がいちいち登録しなくてもよく、ユーザのパスワードを見なくて +済みます。 Index: qmapop-smtp-auth/conf-cc diff -u qmapop-smtp-auth/conf-cc:1.1.1.1 qmapop-smtp-auth/conf-cc:1.1.1.1.4.1 --- qmapop-smtp-auth/conf-cc:1.1.1.1 Wed Sep 20 11:33:27 2006 +++ qmapop-smtp-auth/conf-cc Wed Sep 20 11:44:32 2006 @@ -1,3 +1,3 @@ -cc -O2 +cc -O2 -DAUTHCRAMONLY This will be used to compile .c files. Index: qmapop-smtp-auth/qmail-smtpd.c diff -u qmapop-smtp-auth/qmail-smtpd.c:1.1.1.1.2.1 qmapop-smtp-auth/qmail-smtpd.c:1.1.1.1.2.1.2.1 --- qmapop-smtp-auth/qmail-smtpd.c:1.1.1.1.2.1 Wed Sep 20 11:40:07 2006 +++ qmapop-smtp-auth/qmail-smtpd.c Wed Sep 20 11:44:32 2006 @@ -242,7 +242,10 @@ void smtp_ehlo(arg) char *arg; { smtp_greet("250-"); -#ifdef AUTHCRAM +#ifdef AUTHCRAMONLY + out("\r\n250-AUTH CRAM-MD5"); + out("\r\n250-AUTH=CRAM-MD5"); +#elif defined(AUTHCRAM) out("\r\n250-AUTH LOGIN CRAM-MD5 PLAIN"); out("\r\n250-AUTH=LOGIN CRAM-MD5 PLAIN"); #else @@ -488,6 +491,7 @@ return 0; /* yes */ } +#ifndef AUTHCRAMONLY int auth_login(arg) char *arg; { int r; @@ -511,7 +515,9 @@ if (!user.len || !pass.len) return err_input(); return authenticate(); } +#endif +#ifndef AUTHCRAMONLY int auth_plain(arg) char *arg; { int r, id = 0; @@ -535,6 +541,7 @@ if (!user.len || !pass.len) return err_input(); return authenticate(); } +#endif #ifdef AUTHCRAM int auth_cram() @@ -581,10 +588,15 @@ char *text; int (*fun)(); } authcmds[] = { +#ifndef AUTHCRAMONLY { "login", auth_login } , { "plain", auth_plain } +#endif #ifdef AUTHCRAM -, { "cram-md5", auth_cram } +#ifndef AUTHCRAMONLY +, +#endif + { "cram-md5", auth_cram } #endif , { 0, err_noauth } };