免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 1656 | 回复: 4
打印 上一主题 下一主题

[Mail] 朋友门请帮忙 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-02-22 09:24 |只看该作者 |倒序浏览
由于qmail.te8.com网站我无法访问,所以请有一下redhat9 下qmail的如下补丁的朋友和我联系,谢谢

ucspi-tcp-0.88.a_record.patch
ucspi-tcp-0.88.errno.patch
ucspi-tcp-0.88.nobase.patch

qmail-1.03.errno.patch
qmail-1.03.qmail_local.patch

谢谢!!

论坛徽章:
0
2 [报告]
发表于 2005-02-22 10:35 |只看该作者

朋友门请帮忙

ucspi-tcp-0.88.a_record.patch

  1. diff -ruN --exclude conf-* ucspi-tcp-0.88/rblsmtpd.c ucspi-tcp-0.88.fix/rblsmtpd.c
  2. --- ucspi-tcp-0.88/rblsmtpd.c        Sat Mar 18 10:18:42 2000
  3. +++ ucspi-tcp-0.88.fix/rblsmtpd.c        Wed Aug  9 16:42:33 2000
  4. @@ -60,16 +60,54 @@

  5. void rbl(char *base)
  6. {
  7. +  int i;
  8. +  char *altreply = 0;
  9.    if (decision) return;
  10.    if (!stralloc_copy(&tmp,&ip_reverse)) nomem();
  11. +  i = str_chr(base, ':');
  12. +  if (base[i]) {
  13. +    base[i] = 0;
  14. +    altreply = base+i+1;
  15. +  }
  16.    if (!stralloc_cats(&tmp,base)) nomem();
  17. -  if (dns_txt(&text,&tmp) == -1) {
  18. -    flagmustnotbounce = 1;
  19. -    if (flagfailclosed) {
  20. -      if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  21. -      decision = 2;
  22. +  if (altreply) {
  23. +    if (dns_ip4(&text,&tmp) == -1) {
  24. +      flagmustnotbounce = 1;
  25. +      if (flagfailclosed) {
  26. +        if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  27. +        decision = 2;
  28. +      }
  29. +      return;
  30. +    }
  31. +    if (text.len) {
  32. +      if(!stralloc_copys(&text, "")) nomem();
  33. +      while(*altreply) {
  34. +        char *x;
  35. +        i = str_chr(altreply, '%');
  36. +        if(!stralloc_catb(&text, altreply, i)) nomem();
  37. +        if(altreply[i] &&
  38. +           altreply[i+1]=='I' &&
  39. +           altreply[i+2]=='P' &&
  40. +           altreply[i+3]=='%') {
  41. +          if(!stralloc_catb(&text, ip_env, str_len(ip_env))) nomem();
  42. +          altreply+=i+4;
  43. +        } else if(altreply[i]) {
  44. +          if(!stralloc_cats(&text, "%")) nomem();
  45. +          altreply+=i+1;
  46. +        } else {
  47. +          altreply+=i;
  48. +        }
  49. +      }
  50. +    }
  51. +  } else {
  52. +    if (dns_txt(&text,&tmp) == -1) {
  53. +      flagmustnotbounce = 1;
  54. +      if (flagfailclosed) {
  55. +        if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  56. +        decision = 2;
  57. +      }
  58. +      return;
  59.      }
  60. -    return;
  61.    }
  62.    if (text.len)
  63.      if (flagrblbounce)
复制代码

论坛徽章:
0
3 [报告]
发表于 2005-02-22 10:37 |只看该作者

朋友门请帮忙

ucspi-tcp-0.88.a_record.patch

  1. diff -ruN --exclude conf-* ucspi-tcp-0.88/rblsmtpd.c ucspi-tcp-0.88.fix/rblsmtpd.c
  2. --- ucspi-tcp-0.88/rblsmtpd.c        Sat Mar 18 10:18:42 2000
  3. +++ ucspi-tcp-0.88.fix/rblsmtpd.c        Wed Aug  9 16:42:33 2000
  4. @@ -60,16 +60,54 @@

  5. void rbl(char *base)
  6. {
  7. +  int i;
  8. +  char *altreply = 0;
  9.    if (decision) return;
  10.    if (!stralloc_copy(&tmp,&ip_reverse)) nomem();
  11. +  i = str_chr(base, ':');
  12. +  if (base[i]) {
  13. +    base[i] = 0;
  14. +    altreply = base+i+1;
  15. +  }
  16.    if (!stralloc_cats(&tmp,base)) nomem();
  17. -  if (dns_txt(&text,&tmp) == -1) {
  18. -    flagmustnotbounce = 1;
  19. -    if (flagfailclosed) {
  20. -      if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  21. -      decision = 2;
  22. +  if (altreply) {
  23. +    if (dns_ip4(&text,&tmp) == -1) {
  24. +      flagmustnotbounce = 1;
  25. +      if (flagfailclosed) {
  26. +        if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  27. +        decision = 2;
  28. +      }
  29. +      return;
  30. +    }
  31. +    if (text.len) {
  32. +      if(!stralloc_copys(&text, "")) nomem();
  33. +      while(*altreply) {
  34. +        char *x;
  35. +        i = str_chr(altreply, '%');
  36. +        if(!stralloc_catb(&text, altreply, i)) nomem();
  37. +        if(altreply[i] &&
  38. +           altreply[i+1]=='I' &&
  39. +           altreply[i+2]=='P' &&
  40. +           altreply[i+3]=='%') {
  41. +          if(!stralloc_catb(&text, ip_env, str_len(ip_env))) nomem();
  42. +          altreply+=i+4;
  43. +        } else if(altreply[i]) {
  44. +          if(!stralloc_cats(&text, "%")) nomem();
  45. +          altreply+=i+1;
  46. +        } else {
  47. +          altreply+=i;
  48. +        }
  49. +      }
  50. +    }
  51. +  } else {
  52. +    if (dns_txt(&text,&tmp) == -1) {
  53. +      flagmustnotbounce = 1;
  54. +      if (flagfailclosed) {
  55. +        if (!stralloc_copys(&text,"temporary RBL lookup error")) nomem();
  56. +        decision = 2;
  57. +      }
  58. +      return;
  59.      }
  60. -    return;
  61.    }
  62.    if (text.len)
  63.      if (flagrblbounce)
复制代码

ucspi-tcp-0.88.errno.patch

  1. diff -u ucspi-tcp-0.88.old/error.h ucspi-tcp-0.88/error.h
  2. --- ucspi-tcp-0.88.old/error.h        2000-03-18 09:18:20.000000000 -0600
  3. +++ ucspi-tcp-0.88/error.h        2003-01-08 13:39:12.000000000 -0600
  4. @@ -1,7 +1,7 @@
  5. #ifndef ERROR_H
  6. #define ERROR_H

  7. -extern int errno;
  8. +#include <errno.h>;

  9. extern int error_intr;
  10. extern int error_nomem;
复制代码

ucspi-tcp-0.88.nobase.patch

  1. diff -ur ucspi-tcp-0.88.old/rblsmtpd.c ucspi-tcp-0.88/rblsmtpd.c
  2. --- ucspi-tcp-0.88.old/rblsmtpd.c        Sat Mar 18 09:18:42 2000
  3. +++ ucspi-tcp-0.88/rblsmtpd.c        Mon Apr  1 09:26:07 2002
  4. @@ -22,7 +22,7 @@
  5. }
  6. void usage(void)
  7. {
  8. -  strerr_die1x(100,"rblsmtpd: usage: rblsmtpd [ -b ] [ -R ] [ -t timeout ] [ -r base ] [ -a base ] smtpd [ arg ... ]");
  9. +  strerr_die1x(100,"rblsmtpd: usage: rblsmtpd -r base [ -b ] [ -R ] [ -t timeout ] [ -r base ] [ -a base ] smtpd [ arg ... ]");
  10. }

  11. char *ip_env;
  12. @@ -190,7 +190,7 @@
  13.    argv += optind;
  14.    if (!*argv) usage();

  15. -  if (flagwantdefaultrbl) rbl("rbl.maps.vix.com");
  16. +  if (flagwantdefaultrbl) usage();
  17.    if (decision >;= 2) rblsmtpd();

  18.    pathexec_run(*argv,argv,envp);
复制代码

qmail-1.03.qmail_local.patch

  1. diff -u qmail-1.03.old/qmail-local.c qmail-1.03/qmail-local.c
  2. --- qmail-1.03.old/qmail-local.c        1998-06-15 05:52:55.000000000 -0500
  3. +++ qmail-1.03/qmail-local.c        2003-01-09 14:22:48.000000000 -0600
  4. @@ -645,7 +645,7 @@
  5.      {
  6.       cmds.s[j] = 0;
  7.       k = j;
  8. -     while ((k >; i) && (cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t'))
  9. +     while ((k >; i) && ((cmds.s[k - 1] == ' ') || (cmds.s[k - 1] == '\t')))
  10.         cmds.s[--k] = 0;
  11.       switch(cmds.s[i])
  12.        {
复制代码

qmail-1.03.errno.patch

  1. diff -u qmail-1.03.old/cdb_seek.c qmail-1.03/cdb_seek.c
  2. --- qmail-1.03.old/cdb_seek.c        1998-06-15 05:52:55.000000000 -0500
  3. +++ qmail-1.03/cdb_seek.c        2003-01-08 15:55:53.000000000 -0600
  4. @@ -1,6 +1,5 @@
  5. #include <sys/types.h>;
  6. #include <errno.h>;
  7. -extern int errno;
  8. #include "cdb.h"

  9. #ifndef SEEK_SET
  10. diff -u qmail-1.03.old/dns.c qmail-1.03/dns.c
  11. --- qmail-1.03.old/dns.c        1998-06-15 05:52:55.000000000 -0500
  12. +++ qmail-1.03/dns.c        2003-01-08 16:00:32.000000000 -0600
  13. @@ -7,8 +7,6 @@
  14. #include <errno.h>;
  15. extern int res_query();
  16. extern int res_search();
  17. -extern int errno;
  18. -extern int h_errno;
  19. #include "ip.h"
  20. #include "ipalloc.h"
  21. #include "fmt.h"
  22. diff -u qmail-1.03.old/error.3 qmail-1.03/error.3
  23. --- qmail-1.03.old/error.3        1998-06-15 05:52:55.000000000 -0500
  24. +++ qmail-1.03/error.3        2003-01-08 15:58:13.000000000 -0600
  25. @@ -3,8 +3,7 @@
  26. error \- syscall error codes
  27. .SH SYNTAX
  28. .B #include <error.h>;
  29. -
  30. -extern int \fBerrno\fP;
  31. +.B #include <errno.h>;

  32. extern int \fBerror_intr\fP;
  33. .br
  34. diff -u qmail-1.03.old/error.h qmail-1.03/error.h
  35. --- qmail-1.03.old/error.h        1998-06-15 05:52:55.000000000 -0500
  36. +++ qmail-1.03/error.h        2003-01-08 15:59:13.000000000 -0600
  37. @@ -1,7 +1,7 @@
  38. #ifndef ERROR_H
  39. #define ERROR_H

  40. -extern int errno;
  41. +#include <errno.h>;

  42. extern int error_intr;
  43. extern int error_nomem;
复制代码

论坛徽章:
0
4 [报告]
发表于 2005-02-22 12:07 |只看该作者

朋友门请帮忙

非常感谢!

论坛徽章:
0
5 [报告]
发表于 2005-02-22 15:05 |只看该作者

朋友门请帮忙

[quote]原帖由 "peijun.jiang"]非常感谢![/quote 发表:

和你的贡献比较起来,不值一提!
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP