免费注册 查看新帖 |

Chinaunix

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

[Mail] 哪位大俠幫忙提供在rhel5中amavisd-new [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-06-25 14:59 |只看该作者 |倒序浏览
我在rhel5 中postfix+openwebmail+amavisd-new+f-port+spamassanssin架設mailserver,但現在卡在amavisd-new這里,已經幾個星期了,希望哪位大哥幫忙引導下:
   能否幫忙提供amavisd-new相關的perl模組呀,及詳細安裝方法..

论坛徽章:
0
2 [报告]
发表于 2008-06-25 17:20 |只看该作者
安装方法参考如下(官方软件包里面的),所有perl组件均可以在search.cpan.org下载到,只是要有耐心(我昨天晚上搞到很晚也没有搞定),今天早上起来再搞,注意看了一下提示,依据提示安装则顺利通过,总共需要软件包不少于20个,有些是依赖需要的;


  1. amavisd-new consists of a daemon 'amavisd', and (in some setups) a helper
  2. program, which is only needed with certain mail transport agents (MTA).
  3. For Postfix, Exim-V4, and dual-sendmail setups no helper program is needed
  4. for interfacing MTA with amavisd daemon .

  5. Obtaining the software:
  6. =======================

  7. Fetch the tarball and unpack it:
  8.   curl -O [url]http://www.ijs.si/software/amavisd/amavisd-new-[/url]<version>.tar.gz
  9.   gzip -d -c amavisd-new-<version>.tar.gz | tar xvf -
  10.   cd amavisd-new-<version>

  11. The most important files thus obtained are amavisd and amavisd.conf.

  12. Start reading with AAAREADME.first, then RELEASE_NOTES if upgrading,
  13. and INSTALL and README_FILES/<your-MTA> for new installations.

  14. Check also the on-line documentation at:
  15.     [url]http://www.ijs.si/software/amavisd/[/url]
  16. and [url]http://www.ijs.si/software/amavisd/amavisd-new-docs.html[/url]


  17. Prerequisites:
  18. ==============

  19. file(1) utility is required, the most recent version is heartly recommended!
  20. There are a number of security and robustness problems with earlier versions.
  21. Use file(1) version 4.23 or later to avoid known vulnerabilities.

  22. Archive::Zip   (Archive-Zip-x.xx) (1.14 or later, currently 1.23)
  23. Compress::Zlib (Compress-Zlib-x.xx) (1.35 or later, currently 2.008)
  24. Convert::TNEF  (Convert-TNEF-x.xx)
  25. Convert::UUlib (Convert-UUlib-x.xxx) (1.08 or later, stick to new versions!)
  26. MIME::Base64   (MIME-Base64-x.xx)
  27. MIME::Parser   (MIME-Tools-x.xxxx) (latest version from CPAN - currently 5.425)
  28. Mail::Internet (MailTools-1.58 or later have workarounds for Perl 5.8.0 bugs)
  29. Net::Server    (Net-Server-x.xx) (version 0.88 finally does setuid right)
  30. Digest::MD5    (Digest-MD5-x.xx) (2.22 or later)
  31. IO::Stringy    (IO-stringy-x.xxx)
  32. Time::HiRes    (Time-HiRes-x.xx) (use 1.49 or later, older can cause problems)
  33. Unix::Syslog   (Unix-Syslog-x.xxx)
  34. BerkeleyDB     with bdb library (preferably 4.4.20 or later)

  35. The following external programs are used for decoding/dearchiving
  36. if they are available:
  37.   compress, gzip, bzip2, nomarch (or arc), lha, arj (or unarj), rar (or unrar),
  38.   unzoo (or zoo), pax, cpio, lzop, freeze (or unfreeze or melt), ripole,
  39.   tnef, cabextract.
  40. Self-extracting archives (executables) can be of types zip, rar, lha or arj,
  41. and are only recognized when the corresponding dearchiver is available.

  42. optional Perl modules:
  43.   Mail::SpamAssassin          for doing spam scanning (latest version)
  44.   DBI with appropriate DBD::* if using SQL lookups or SQL logging/quarantining
  45.   Net::LDAP                   if using LDAP lookups
  46.   Authen::SASL          authenticating on mail forwarding and on submitting DSN
  47.   Mail::ClamAV          Perl module interface to ClamAV library
  48.   SAVI                  Perl module interface to Sophos library (0.30 or later)

  49. optional, but usually desired:
  50.   virus scanners        external programs for doing virus scanning, like ClamAV

  51. Some external programs may already be provided with the system, but it is
  52. worth checking that their version is recent. The following lists the programs
  53. and their distribution sites (not necessarily the only or the official).
  54. The most crucial programs are marked with an asterisk:

  55. * file:       [url]ftp://ftp.astron.com/pub/file/[/url]
  56.   compress:   [url]ftp://ftp.warwick.ac.uk/pub/compression/[/url]
  57. * gzip:       [url]http://www.gzip.org/[/url]
  58.   bzip2:      [url]http://www.bzip.org/[/url]
  59.   nomarch:    [url]http://rus.members.beeb.net/nomarch.html[/url]
  60.   arc:        [url]ftp://ftp.kiarchive.ru/pub/unix/arcers/[/url]
  61.   lha:        [url]http://www2m.biglobe.ne.jp/~dolphin/lha/lha.htm[/url]
  62.   7z:         [url]http://p7zip.sourceforge.net/[/url], [url]http://www.7-zip.org/[/url]
  63.   unarj:      [url]ftp://ftp.kiarchive.ru/pub/unix/arcers/[/url]
  64.   arj:        [url]http://testcase.newmail.ru/files/[/url] (arj is preferable to unarj)
  65.   rar, unrar: [url]http://www.rarsoft.com/[/url], [url]http://www.rarsoft.com/rar_add.htm[/url],
  66.               [url]ftp://ftp.kiarchive.ru/pub/unix/arcers/[/url] (rar preferred to unrar)
  67.   unzoo:      [url]http://critical.ch/distfiles/[/url]
  68.   zoo:        [url]ftp://ftp.kiarchive.ru/pub/unix/arcers/[/url] (zoo preferred to unzoo)
  69.   lzop:       [url]http://www.lzop.org/download/[/url]
  70.   freeze:     [url]ftp://ftp.warwick.ac.uk/pub/compression/[/url]
  71.   ripOLE:     [url]http://www.pldaniels.com/ripole/[/url]
  72.   tnef:       [url]http://tnef.sourceforge.net/[/url]
  73. * pax:        [url]http://www.gnu.org/software/paxutils/[/url]
  74.                 or: [url]http://heirloom.sourceforge.net/[/url]
  75.   cpio:       [url]http://www.gnu.org/software/cpio/[/url]
  76.                 or: [url]http://heirloom.sourceforge.net/[/url]
  77.   cabextract: [url]http://www.kyz.uklinux.net/cabextract.php[/url]
  78. * ClamAV:     [url]http://clamav.elektrapro.com/[/url]  (open source virus scanner)
  79.   SAVI:       [url]http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/dist/[/url]
  80.   dspam:      [url]http://www.nuclearelephant.com/projects/dspam/[/url]

  81.   bdb:        [url]http://www.sleepycat.com/[/url] (Berkeley db libr. used via BerkeleyDB)
  82.   p0f:        [url]http://lcamtuf.coredump.cx/p0f.shtml[/url]

  83. Optional third-party utilities:
  84.   MailZu:     [url]http://www.mailzu.net/[/url]  (quarantine management web UI)
  85.   amavisd-milter: [url]http://sourceforge.net/projects/amavisd-milter/[/url]
  86.               (alternative sendmail milter helper program supporting the
  87.                new AM.PDP protocol)

  88.   See also:   [url]http://www.ijs.si/software/amavisd/#contrib[/url]


  89. Installing the daemon:
  90. ======================

  91. - Perl version 5.8.2 or later is recommended. While 5.6.1 may theoretically
  92.   still be the lowest usable version, a bunch of problems were resolved in
  93.   later Perl versions which were reported to show in certain environments.
  94.   Some examples: taint bugs, socket descriptors not closed on exec,
  95.   Net::Server looping waiting for a socket connect, problems with handling
  96.   of UTF8/Unicode in Perl;

  97. - create (or choose) a Unix group dedicated to run amavisd daemon and
  98.   possibly virus scanners. This should NOT be one of user or system groups
  99.   and should NOT be shared with other applications such as mail or www
  100.   (except possibly virus scanners). It is customary to name the group
  101.   'amavis' (or perhaps 'vscan' or 'sweep');
  102.     (edit /etc/group, or use system-specific tools, such as vigr)

  103. - create (or choose) a Unix account (username and its UID) dedicated to run
  104.   amavisd daemon and possibly virus scanners. This should NOT be one of user
  105.   or system accounts and should NOT be shared with other applications such
  106.   as mail or www (except possibly virus scanners). Most certainly do NOT use
  107.   "root", and do NOT use "nobody" nor an account used by mailer, such as
  108.   "postfix", "mail", "smmsp" or "mailnull"). It is customary to name the
  109.   user "amavis" or "vscan";

  110.   Choose a home directory (e.g. /var/amavis or /var/lib/amavis) for this user.

  111.     (use vipw, or system-specific tools to add a user)

  112.   Create its home directory, unless account creation procedure already did it:
  113.     mkdir /var/amavis

  114.   Create the following subdirectories:
  115.     mkdir /var/amavis/tmp /var/amavis/var /var/amavis/db /var/amavis/home

  116.   Check or set the ownership and protection of the directories to be readable
  117.   and writable by the chosen UID, and not writable by other non-privileged
  118.   users;
  119.     chown -R amavis:amavis /var/amavis
  120.     chmod -R 750 /var/amavis

  121. - unpack the amavisd-new source distribution (see 'Obtaining the software'
  122.   above) wherever desired (/usr/local/src or elsewhere), and cd to that
  123.   directory;

  124. - copy file amavisd to wherever you want it to reside,
  125.   such as /usr/local/sbin, and make sure its protection setting allows it
  126.   to be executed and read, but not overwritten by non-privileged users.
  127.   This is a Perl source, so it is readable by any text viewer if needed.
  128.     cp amavisd /usr/local/sbin/
  129.     chown root /usr/local/sbin/amavisd
  130.     chmod 755  /usr/local/sbin/amavisd

  131. - copy file amavisd.conf to wherever you want it to reside such as /etc, and
  132.   make sure it is not writable by non-privileged users, not even by amavis;
  133.     cp amavisd.conf /etc/
  134.     chown root:amavis /etc/amavisd.conf
  135.     chmod 640 /etc/amavisd.conf

  136.   (if the file contains sensitive information like a password for accessing
  137.   a SQL database, it should not be world-readable)

  138.   Some sites prefer location /etc/amavis/ or /usr/local/etc/. If using
  139.   a non-default location, one may use a command line option -c when
  140.   starting the daemon to specify a non-default configuration file,
  141.   or provide a soft link at the default location. Multiple -c options
  142.   are permitted and enable splitting the config file into sections such
  143.   as site-specific and general sections;

  144. - create a directory (e.g. /var/virusmails) to be used by amavisd-new
  145.   as a quarantine area (if quarantining to files is desired).
  146.   Set ownership and protection of the directory to be readable and
  147.   writable by the chosen UID, and not writable by other non-privileged
  148.   users;
  149.     mkdir /var/virusmails
  150.     chown amavis:amavis /var/virusmails
  151.     chmod 750 /var/virusmails

  152. - edit file /etc/amavisd.conf and adjust variables $daemon_group
  153.   and $daemon_user to match the chosen group and user name,
  154.   adjust variables $MYHOME, $TEMPBASE, $db_home and $QUARANTINEDIR
  155.   to match the directories just created, then check/adjust other variables,
  156.   for example:

  157.     $MYHOME   = '/var/amavis';
  158.     $TEMPBASE = "$MYHOME/tmp";
  159.     $db_home  = "$MYHOME/db";

  160.   Optionally, if $MYHOME is preferred uncluttered and for extra security
  161.   owned by root (not modifyable by user amavis):
  162.     $MYHOME = '/var/amavis';
  163.     $helpers_home = "$MYHOME/home";
  164.     $pid_file  = "$helpers_home/amavisd.pid";
  165.     $lock_file = "$helpers_home/amavisd.lock";
  166.   in which case the ownership of /var/amavisd should be changed to root
  167.   and ownership of /var/amavis/home must be amavis:
  168.     chown root /var/amavis
  169.     chown -R amavis:amavis /var/amavis/home
  170.     chmod 750 /var/amavis /var/amavis/home

  171.   If $TEMPBASE resides on a dedicated file system, it may be prudent to
  172.   specify mount options: noexec,nosuid,nodev.

  173. - install virus scanners (if they are to be used), and Perl module
  174.   Mail::SpamAssassin (if desired), and adjust variables in /etc/amavisd.conf.
  175.   There are several other Perl modules needed by amavisd daemon
  176.   (see 'Prerequisites') - if they are not yet installed, a list
  177.   of missing modules will be logged when amavisd is started;

  178. - some virus scanners run as daemons or change UID when checking files.
  179.   It is easiest to run such virus scanners under the same UID/GID (or at least
  180.   within the same group) as amavisd, to avoid file permission problems
  181.   when virus scanner reads files prepared for checking by amavisd daemon.
  182.   Some virus scanners may require write permission to the $TEMPBASE directory
  183.   to be able to create auxiliary files there.

  184.   If a different UID is preferred for an AV scanner, a solution for ClamAV
  185.   is to add user clamav to the amavis group (e.g.:  vscan:*:110:clamav
  186.   in a file /etc/group), and then add:  AllowSupplementaryGroups yes
  187.   to clamd.conf.

  188. - start the program 'amavisd', either as root (possibly with option
  189.   -u user), or with su(1) as the user chosen above. It should
  190.   start up, and (if root) change its GID/UID to the setting provided.
  191.   It is wise to start it up for the first time with a 'debug' option:
  192.     /usr/local/sbin/amavisd -u vscan debug
  193.   or:
  194.     /usr/local/sbin/amavisd debug
  195.   When checking SpamAssassin operations, the following can be useful:
  196.     /usr/local/sbin/amavisd debug-sa

  197. - later when everything has been tested and works, a shell script
  198.   amavisd_init.sh or similar may be made to run at system startup/shutdown
  199.   time;

  200. - depending on the mailer used, read the appropriate README.* file
  201.   and follow instructions there. With some mailers (Postfix, Exim V4
  202.   or a dual-MTA setup with any SMTP-capable mailers, including sendmail)
  203.   no helper program is needed.

  204.   With some other mailers (sendmail milter, or historical sendmail invoking
  205.   content filter via local delivery agent) one of the supplied helper
  206.   programs is needed: amavisd-milter.c, or amavis.c respectively. These are
  207.   available from the helper-progs subdirectory. The helper-progs/config.h.in
  208.   may need to be adjusted to match the system and amavisd configuration
  209.   settings. See also alternative sendmail milter supporting the new AM.PDP
  210.   protocol at [url]http://sourceforge.net/projects/amavisd-milter/[/url] .


  211. NOTE:
  212.   Check amavisd-new web page at [url]http://www.ijs.si/software/amavisd/[/url]
  213.   if there are any patches needed for external components, such as
  214.   Net::Server module or Razor agents.



  215. Testing the daemon:
  216. ===================

  217. Initial checkout is described in MTA-specific README.* file,
  218. please follow instructions there.

  219. The subdirectory test-messages contains a couple of sample mail messages,
  220. and brief instructions for testing are in file README there.
  221. [root@mail amavisd-new-2.5.4]#
复制代码

论坛徽章:
0
3 [报告]
发表于 2008-06-27 14:38 |只看该作者

安裝Convert-TNEF-0.17.tar

我在安裝Convert-TNEF-0.17.tar時出現下列問題:

Writing /usr/lib/perl5/site_perl/5.8.8/i386-linux-thread-multi/auto/Convert/TNEF/.packlist
Appending installation info to /usr/lib/perl5/5.8.8/i386-linux-thread-multi/perllocal.pod

论坛徽章:
0
4 [报告]
发表于 2008-06-27 18:38 |只看该作者

amavisd-new搞定

真的是好多軟件包,真的要有耐心才行,終於搞定,謝謝zenglingping !
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP