免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: 大麻
打印 上一主题 下一主题

[Mail] qmail patchs for iGENUS 20060222 公开发布 [复制链接]

论坛徽章:
0
11 [报告]
发表于 2006-03-13 16:55 |只看该作者
我用了楼主的patch ,收邮件没有问题,但是,发邮件部是提示密码验证,好象密码不能通过。
我的smtp脚本是。
/usr/local/qmail/bin/tcpserver -H -R -l xxx.com -t 1 -c 100 -v -p -x/etc/qmail/tcp.smtp.cdb -u 519 -g 511 0 smtp /usr/local/qmail/bin/qmail-smtpd /home/vpopmail/bin/vchkpw /usr/bin/true /usr/local/qmail/bin/cmd5checkpw /usr/bin/true 2>&1 | /usr/local/qmail/bin/splogger &
请帮帮忙。

论坛徽章:
0
12 [报告]
发表于 2006-03-13 17:07 |只看该作者
#!/bin/sh
# qmail-smtpd startup with SMTP Authentication
QMAILDUID=`id -u qmaild`
QMAILDGID=`id -g qmaild`
HOSTNAME=`hostname`
exec softlimit -m 2000000 \
tcpserver -vR -l $HOSTNAME \
-u $QMAILDUID -g $QMAILDGID 0 smtp \
   /var/qmail/bin/qmail-smtpd /bin/cmd5checkpw /usr/bin/true 2>&1

论坛徽章:
1
荣誉版主
日期:2011-11-23 16:44:17
13 [报告]
发表于 2006-03-14 08:04 |只看该作者
大麻兄实在让人敬佩.

论坛徽章:
0
14 [报告]
发表于 2006-03-14 14:10 |只看该作者

刚刚配好的

我对大麻兄也很配服,我用了大麻兄的补丁,因此把我刚刚配好的qmail拿出来共享。不过,我没用大麻的smtp脚本,不知为什么,我用了报错。

免责声明:我个人水平不高,有些东西只知其然:-),拿网上的东西来拼的,所花的只是工夫,如有雷同,不要告我。
环境描述-as4   mysql 5.x  

qmail
1)tar zxf qmail-1.03.tar.gz
tar zxf qmail-igenus.patch.2006.0222.tgz
mv qmail-igenus.patch qmail-1.03
cd qmail-1.03
patch < qmail-igenus.patch
vi conf-qmail    修改第一行为/usr/local/qmail
vi qmail-smtpd.c //将函数straynewline中的451改为553 //将451改为553是为避免当其它服务器给你发来无效格式的邮件时,你的服务器陷入循环应答。当你的服务器收到无效格式的邮件时,一般会发送:"I am not going to accept that message at the moment,you can try again later",对方服务器收到后,几秒钟后又会发送同样的邮件给你,造成多次的重复。改为553后,你的服务器将直接发送:"I am not going to accept that message,don't try sending it again.",告诉对方的服务器不要再发这封无效的信件。
mkdir /usr/local/qmail
mkdir /usr/local/qmail/alias
userdel alias
userdel qmaild
userdel qmaill
userdel qmailp
userdel qmailq
userdel qmailr
userdel qmails
groupdel nofiles
groupdel qmail
groupadd nofiles
useradd -g nofiles -d /usr/local/qmail/alias alias
useradd -g nofiles -d /usr/local/qmail qmaild
useradd -g nofiles -d /usr/local/qmail qmaill
useradd -g nofiles -d /usr/local/qmail qmailp
groupadd qmail
useradd -g qmail -d /usr/local/qmail qmailq
useradd -g qmail -d /usr/local/qmail qmailr
useradd -g qmail -d /usr/local/qmail qmails
make
make setup check
./config-fast kkkkkk.com
cd /usr/local/qmail/alias
touch .qmail-postmaster .qmail-mailer-daemon .qmail-root
chmod 644 /usr/local/qmail/alias/.qmail*
cp /usr/local/qmail/boot/home /usr/local/qmail/rc
perl -i -pe 's/Mailbox/Maildir/' /usr/local/qmail/rc
killall sendmail
rpm -e fetchmail
rpm -e mutt
rpm -e --nodeps sendmail
chmod 0 /usr/lib/sendmail
chmod 0 /usr/sbin/sendmail
chmod 0 /usr/lib/sendmail.mx
mv /usr/lib/sendmail /usr/lib/sendmail.bak
mv /usr/sbin/sendmail /usr/sbin/sendmail.bak
rm -rf /usr/lib/sendmail
rm -rf /usr/sbin/sendmail
ln -s /usr/local/qmail/bin/sendmail /usr/lib/sendmail
ln -s /usr/local/qmail/bin/sendmail /usr/sbin/sendmail
echo "csh -cf '/usr/local/qmail/rc &'">>/etc/qmail/start
echo "/etc/qmail/smtp.sh">>/etc/qmail/start

##########----------ucspi-tcp-0.88 install---------############
tar zxf ucspi-tcp-0.88.tar.gz
cp ucspi-tcp-0.88.errno.patch ucspi-tcp-0.88
cd ucspi-tcp-0.88
patch ucspi-tcp-0.88.errno.patch
make
make setup check
QMAILDUID=`/usr/bin/id -u qmaild`
NOFILESGID=`/usr/bin/id -g qmaild`
echo "/usr/local/bin/tcpserver -H -R -l kkkkkk.com -t 1 -c 100 -v -p -x/etc/qmail/tcp.smtp.cdb -u $QMAILDUID -g $NOFILESGID 0 smtp /usr/local/qmail/bin/qmail-smtpd /home/vpopmail/bin/vchkpw /usr/bin/true /bin/cmd5checkpw /usr/bin/true 2>&1 | /usr/local/qmail/bin/splogger &">/etc/qmail/smtp.sh
chmod 755 /etc/qmail/smtp.sh
echo "127.0.0.1:allow,RELAYCLIENT="\"\" > /etc/qmail/tcp.smtp
/usr/local/bin/tcprules /etc/qmail/tcp.smtp.cdb /etc/qmail/tcp.smtp.tmp < /etc/qmail/tcp.smtp

#########---------cmd5checkpw install ---------##############
tar xzf cmd5checkpw-0.22.tar.gz
mkdir -p /usr/local/qmail/man/man8
cd cmd5checkpw-0.22
make
make install
#########----------vpopmail install----------##############
下载 vpopmail-5.4.13.tar.gz
mkdir -p /home/vpopmail
userdel vpopmail
groupdel vchkpw
groupadd vchkpw
useradd -g vchkpw -d /home/vpopmail vpopmail
echo "/etc/qmail/start">>/etc/rc.d/rc.local
mkdir -p /home/vpopmail/etc
echo "kkkkkk.com" > /home/vpopmail/etc/defaultdomain

在mysql中建立vpopmail的数据库,并分配账号。


# 设置MySQL信息,第一个vpopmail是帐号,xukixu为密码,第二个vpopmail是数据库
echo "localhost|0|vpopmail|123456|vpopmail" > /home/vpopmail/etc/vpopmail.mysql
chmod 640 /home/vpopmail/etc/vpopmail.mysql
chown -R vpopmail.vchkpw /home/vpopmail/etc

tar xzf vpopmail-5.4.13.tar.gz
cd vpopmail-5.4.13
//以前的数据库、邮箱大小、默认域名都不用了
./configure --prefix=/home/vpopmail  --enable-passwd=n --enable-tcprules-prog=/usr/local/bin/tcprules --enable-ip-alias-domains=n  --enable-sqwebmail-pass=y --enable-qmaildir=/usr/local/qmail --enable-roaming-users=y --enable-auth-module=mysql --enable-incdir=/usr/local/mysql/include --enable-libdir=/usr/local/mysql/lib
make
make install-strip

QMAILDUID=`/usr/bin/id -u qmaild`
NOFILESGID=`/usr/bin/id -g qmaild`
echo "/usr/local/bin/tcpserver -c 100 -v -l kkkkkk.com -U -H -R 0 pop3 /usr/local/qmail/bin/qmail-popup kkkkkk.com /home/vpopmail/bin/vchkpw /usr/local/qmail/bin/qmail-pop3d Maildir 2>&1 | /usr/local/qmail/bin/splogger &">/etc/qmail/pop.sh
chmod 755 /etc/qmail/pop.sh
echo "/etc/qmail/pop.sh">>/etc/qmail/start
chmod 6755 /home/vpopmail/bin/vchkpw
~vpopmail/bin/vadddomain kkkkkk.com 1234
/home/vpopmail/etc/vlimits.default为vpopmail的环境参数调整,包括默认大小,邮件数量等

[ 本帖最后由 hailang101 于 2006-3-14 14:14 编辑 ]

论坛徽章:
0
15 [报告]
发表于 2006-03-14 14:29 |只看该作者
谢谢楼上的支持,有时间我写一个较为详细的安装和使用说明。

论坛徽章:
0
16 [报告]
发表于 2006-03-14 16:35 |只看该作者
大麻兄,你的这个补丁有apf ,我想知道如何启用这个apf?目前apf的参考网站打不开了。谢谢。

[ 本帖最后由 hailang101 于 2006-3-15 16:42 编辑 ]

论坛徽章:
0
17 [报告]
发表于 2006-03-15 18:09 |只看该作者
大麻兄,这个补丁是只针对qmail1.03么?
如果我用的netqmail1.05呢,还需要打这个补丁么?

论坛徽章:
0
18 [报告]
发表于 2006-03-15 18:13 |只看该作者
还有,如果需要,我现在用的是netqmail1.05,已经打过qmail-toaster-0.8.1.patch补丁了

我打这个补丁前是不是要重新编译

patch < qmail-igenus.patch

make clean

make

停qmail

make setup check

chown -R vpopmail:vchkpw /var/qmail/spam

我这样可以么

论坛徽章:
0
19 [报告]
发表于 2006-03-15 19:41 |只看该作者
igenus-qmail patch 已经整合了 netqmail 内容,所以没有必要再 netqmail1.05 了。

论坛徽章:
0
20 [报告]
发表于 2006-03-16 10:10 |只看该作者

我是linux菜鸟,急救!!!至13楼的大哥,请各位大大虾帮忙,

先谢谢您的文档,我按您的文档进行qmail安装配置,执行完
make
信息如下:
mail:~/qmail-1.03# make
( cat warn-auto.sh; \
echo CC=\'`head -1 conf-cc`\'; \
echo LD=\'`head -1 conf-ld`\' \
) > auto-ccld.sh
cat auto-ccld.sh make-load.sh > make-load
chmod 755 make-load
cat auto-ccld.sh find-systype.sh > find-systype
chmod 755 find-systype
./find-systype > systype
( cat warn-auto.sh; ./make-load "`cat systype`" ) > load
chmod 755 load
cat auto-ccld.sh make-compile.sh > make-compile
chmod 755 make-compile
( cat warn-auto.sh; ./make-compile "`cat systype`" ) > \
compile
chmod 755 compile
( ( ./compile tryvfork.c && ./load tryvfork ) >/dev/null \
2>&1 \
&& cat fork.h2 || cat fork.h1 ) > fork.h
rm -f tryvfork.o tryvfork
./compile qmail-local.c
qmail-local.c: In function `main':
qmail-local.c:461: warning: return type of `main' is not `int'
./compile qmail.c
./compile quote.c
./compile now.c
./compile gfrom.c
./compile myctime.c
./compile slurpclose.c
cat auto-ccld.sh make-makelib.sh > make-makelib
chmod 755 make-makelib
( cat warn-auto.sh; ./make-makelib "`cat systype`" ) > \
makelib
chmod 755 makelib
./compile case_diffb.c
./compile case_diffs.c
./compile case_lowerb.c
./compile case_lowers.c
./compile case_starts.c
./compile case_startb.c
./makelib case.a case_diffb.o case_diffs.o case_lowerb.o \
case_lowers.o case_starts.o case_startb.o
./compile getln.c
./compile getln2.c
./makelib getln.a getln.o getln2.o
./compile subgetopt.c
./compile sgetopt.c
./makelib getopt.a subgetopt.o sgetopt.o
./compile sig_alarm.c
( ( ./compile trysgprm.c && ./load trysgprm ) >/dev/null \
2>&1 \
&& echo \#define HASSIGPROCMASK 1 || exit 0 ) > hassgprm.h
rm -f trysgprm.o trysgprm
./compile sig_block.c
( ( ./compile trysgact.c && ./load trysgact ) >/dev/null \
2>&1 \
&& echo \#define HASSIGACTION 1 || exit 0 ) > hassgact.h
rm -f trysgact.o trysgact
./compile sig_catch.c
./compile sig_pause.c
./compile sig_pipe.c
./compile sig_child.c
./compile sig_hup.c
./compile sig_term.c
./compile sig_bug.c
./compile sig_misc.c
./makelib sig.a sig_alarm.o sig_block.o sig_catch.o \
sig_pause.o sig_pipe.o sig_child.o sig_hup.o sig_term.o \
sig_bug.o sig_misc.o
./compile open_append.c
./compile open_excl.c
./compile open_read.c
./compile open_trunc.c
./compile open_write.c
./makelib open.a open_append.o open_excl.o open_read.o \
open_trunc.o open_write.o
./compile seek_cur.c
./compile seek_end.c
./compile seek_set.c
./compile seek_trunc.c
./makelib seek.a seek_cur.o seek_end.o seek_set.o \
seek_trunc.o
( ( ./compile tryflock.c && ./load tryflock ) >/dev/null \
2>&1 \
&& echo \#define HASFLOCK 1 || exit 0 ) > hasflock.h
rm -f tryflock.o tryflock
./compile lock_ex.c
./compile lock_exnb.c
./compile lock_un.c
./makelib lock.a lock_ex.o lock_exnb.o lock_un.o
./compile fd_copy.c
./compile fd_move.c
./makelib fd.a fd_copy.o fd_move.o
( ( ./compile trywaitp.c && ./load trywaitp ) >/dev/null \
2>&1 \
&& echo \#define HASWAITPID 1 || exit 0 ) > haswaitp.h
rm -f trywaitp.o trywaitp
./compile wait_pid.c
./compile wait_nohang.c
./makelib wait.a wait_pid.o wait_nohang.o
./compile env.c
./compile envread.c
./makelib env.a env.o envread.o
./compile stralloc_eady.c
./compile stralloc_pend.c
./compile stralloc_copy.c
./compile stralloc_opys.c
./compile stralloc_opyb.c
./compile stralloc_cat.c
./compile stralloc_cats.c
./compile stralloc_catb.c
./compile stralloc_arts.c
./makelib stralloc.a stralloc_eady.o stralloc_pend.o \
stralloc_copy.o stralloc_opys.o stralloc_opyb.o \
stralloc_cat.o stralloc_cats.o stralloc_catb.o \
stralloc_arts.o
./compile alloc.c
./compile alloc_re.c
./makelib alloc.a alloc.o alloc_re.o
./compile strerr_sys.c
./compile strerr_die.c
./makelib strerr.a strerr_sys.o strerr_die.o
./compile substdio.c
./compile substdi.c
./compile substdo.c
./compile subfderr.c
./compile subfdout.c
./compile subfdouts.c
./compile subfdin.c
./compile subfdins.c
./compile substdio_copy.c
./makelib substdio.a substdio.o substdi.o substdo.o \
subfderr.o subfdout.o subfdouts.o subfdin.o subfdins.o \
substdio_copy.o
./compile error.c
./compile error_str.c
./compile error_temp.c
./makelib error.a error.o error_str.o error_temp.o
./compile str_len.c
./compile str_diff.c
./compile str_diffn.c
./compile str_cpy.c
./compile str_chr.c
./compile str_rchr.c
./compile str_start.c
./compile byte_chr.c
./compile byte_rchr.c
./compile byte_diff.c
./compile byte_copy.c
./compile byte_cr.c
./compile byte_zero.c
./makelib str.a str_len.o str_diff.o str_diffn.o str_cpy.o \
str_chr.o str_rchr.o str_start.o byte_chr.o byte_rchr.o \
byte_diff.o byte_copy.o byte_cr.o byte_zero.o
./compile fmt_str.c
./compile fmt_strn.c
./compile fmt_uint.c
./compile fmt_uint0.c
./compile fmt_ulong.c
./compile scan_ulong.c
./compile scan_8long.c
./makelib fs.a fmt_str.o fmt_strn.o fmt_uint.o fmt_uint0.o \
fmt_ulong.o scan_ulong.o scan_8long.o
./compile datetime.c
./compile datetime_un.c
./makelib datetime.a datetime.o datetime_un.o
./compile auto-str.c
auto-str.c:9: warning: conflicting types for built-in function `puts'
auto-str.c: In function `main':
auto-str.c:17: warning: return type of `main' is not `int'
./load auto-str substdio.a error.a str.a
./auto-str auto_qmail `head -1 conf-qmail` > auto_qmail.c
./compile auto_qmail.c
./compile auto-int8.c
auto-int8.c:11: warning: conflicting types for built-in function `puts'
auto-int8.c: In function `main':
auto-int8.c:19: warning: return type of `main' is not `int'
./load auto-int8 substdio.a error.a str.a fs.a
./auto-int8 auto_patrn `head -1 conf-patrn` > auto_patrn.c
./compile auto_patrn.c
( ( ./compile trylsock.c && \
./load trylsock -lsocket -lnsl ) >/dev/null 2>&1 \
&& echo -lsocket -lnsl || exit 0 ) > socket.lib
rm -f trylsock.o trylsock
./compile maildirquota.c
./compile maildirgetquota.c
./compile maildiropen.c
./compile maildirparsequota.c
./compile overmaildirquota.c
./compile strtimet.c
./compile strpidt.c
./load qmail-local qmail.o quote.o now.o gfrom.o myctime.o \
slurpclose.o case.a getln.a getopt.a sig.a open.a seek.a \
lock.a fd.a wait.a env.a stralloc.a alloc.a strerr.a \
substdio.a error.a str.a fs.a datetime.a auto_qmail.o \
auto_patrn.o  `cat socket.lib` maildirquota.o maildirgetquota.o \
    maildiropen.o maildirparsequota.o overmaildirquota.o strtimet.o strpidt.o
( ( ./compile tryulong32.c && ./load tryulong32 && \
./tryulong32 ) >/dev/null 2>&1 \
&& cat uint32.h2 || cat uint32.h1 ) > uint32.h
rm -f tryulong32.o tryulong32
./compile qmail-lspawn.c
( ./compile trysysel.c >/dev/null 2>&1 \
&& cat select.h2 || cat select.h1 ) > select.h
rm -f trysysel.o trysysel
./compile chkspawn.c
chkspawn.c: In function `main':
chkspawn.c:12: warning: return type of `main' is not `int'
./compile auto-int.c
auto-int.c:11: warning: conflicting types for built-in function `puts'
auto-int.c: In function `main':
auto-int.c:19: warning: return type of `main' is not `int'
./load auto-int substdio.a error.a str.a fs.a
./auto-int auto_spawn `head -1 conf-spawn` > auto_spawn.c
./compile auto_spawn.c
./load chkspawn substdio.a error.a str.a fs.a auto_spawn.o
./chkspawn
./compile spawn.c
spawn.c: In function `main':
spawn.c:186: warning: return type of `main' is not `int'
./compile chkshsgr.c
chkshsgr.c: In function `main':
chkshsgr.c:3: warning: return type of `main' is not `int'
./load chkshsgr
./chkshsgr || ( cat warn-shsgr; exit 1 )
( ( ./compile tryshsgr.c \
&& ./load tryshsgr && ./tryshsgr ) >/dev/null 2>&1 \
&& echo \#define HASSHORTSETGROUPS 1 || exit 0 ) > \
hasshsgr.h
rm -f tryshsgr.o tryshsgr
./compile prot.c
./compile coe.c
./compile cdb_hash.c
./compile cdb_unpack.c
./compile cdb_seek.c
./makelib cdb.a cdb_hash.o cdb_unpack.o cdb_seek.o
./compile auto-uid.c
auto-uid.c: In function `main':
auto-uid.c:22: warning: return type of `main' is not `int'
./load auto-uid substdio.a error.a str.a fs.a
./compile auto-gid.c
auto-gid.c: In function `main':
auto-gid.c:22: warning: return type of `main' is not `int'
./load auto-gid substdio.a error.a str.a fs.a
( ./auto-uid auto_uida `head -1 conf-users` \
&&./auto-uid auto_uidd `head -2 conf-users | tail -1` \
&&./auto-uid auto_uidl `head -3 conf-users | tail -1` \
&&./auto-uid auto_uido `head -4 conf-users | tail -1` \
&&./auto-uid auto_uidp `head -5 conf-users | tail -1` \
&&./auto-uid auto_uidq `head -6 conf-users | tail -1` \
&&./auto-uid auto_uidr `head -7 conf-users | tail -1` \
&&./auto-uid auto_uids `head -8 conf-users | tail -1` \
&&./auto-gid auto_gidq `head -1 conf-groups` \
&&./auto-gid auto_gidn `head -2 conf-groups | tail -1` \
) > auto_uids.c.tmp && mv auto_uids.c.tmp auto_uids.c
fatal: unable to find group qnofiles
make: *** [auto_uids.c] 错误 111
执行make setup check
出现提示错误:
mail:~/qmail-1.03# make setup check
( ./auto-uid auto_uida `head -1 conf-users` \
&&./auto-uid auto_uidd `head -2 conf-users | tail -1` \
&&./auto-uid auto_uidl `head -3 conf-users | tail -1` \
&&./auto-uid auto_uido `head -4 conf-users | tail -1` \
&&./auto-uid auto_uidp `head -5 conf-users | tail -1` \
&&./auto-uid auto_uidq `head -6 conf-users | tail -1` \
&&./auto-uid auto_uidr `head -7 conf-users | tail -1` \
&&./auto-uid auto_uids `head -8 conf-users | tail -1` \
&&./auto-gid auto_gidq `head -1 conf-groups` \
&&./auto-gid auto_gidn `head -2 conf-groups | tail -1` \
) > auto_uids.c.tmp && mv auto_uids.c.tmp auto_uids.c
fatal: unable to find group qnofiles
make: *** [auto_uids.c] 错误 111
可是你得文档中并没有提示要建一个qnofiles组啊?我该如何处理?
我一直在线,请各位帮忙看一下,万分感谢!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP