FreeBSD in the establishment of a full-featured mail server

  Part 1: Installation mail server: postfix + + vm-pop3d openwebmail 
  Following the installation of the system was completed on FreeBSD 5.2.1 
  1.    Update ports 
  Cvsup-gL # 2-h cvs 
  P / ports-supfile 
  Up.freebsdchina.org / usr / sha 

  Re / examples / cvsu 

  2. Openssl + apache server installation 
  # Cd / usr / ports / security / openssl make install # # # make clean cd / usr/ports/www/apache2 make install # # # make clean vi / etc / rc.conf 
  Apache2_enable = "YES" 
  3. Installation openwebmail 
  # Cd / usr / ports / mail / openwebmail / make WITH_QUOTA # # = yes install make clean 
  4. Installed postfix, used in the installation process to answer yes to questions raised 
  # Cd / usr / ports / mail / postfix / # # make clean make install 
  # Vi / etc / rc.conf 
  In order to start accession postfix: 
  Sendmail_enable = "YES" sendmail_flags = "-bd" sendmail_pidfile = "/ v 
  Ar / spool / postfix / pid / master. 
  Pid " 
  Sendmail_outbound_enable = "NO" sendmail_submit_enable = "NO" 
  5. Installation vm-pop3d 
  # Cd / usr/ports/mail/vm-pop3d make install # # make clean 
  6. Configuration postfix 
  # Vi / usr / local / etc / postfix / main.cf 
  Add: 
  Virtual_alias_maps = h 
  Ash: / usr / local / etc / postfix / v 
  Irtual 
  Alias_maps = hash: / usr / local / etc / p 
  Ostfix / aliases 
  Default_privs nobody allow_mail_to_commands = = alias, f 
  Orward, include 
  Allow_mail_to_files 
  = Alias, forward, include 

  Below nero.3322.org I joined a virtual domain, and add a user llzqq 
  # Vi / usr / local / etc / postfix / virtual 
  Add: 
  Nero.3322.org anything / / between the [tab] llzqq@nero.3322.org 
  Llzqq.nero.3322.org / / used between 
  [Tab] 

  Implementation of the following command to generate virtual.db: 
  # Cd / usr / local / etc / postfix / # postmap virtual 
  # Vi / usr / local / etc / postfix / aliases 
  Add: 
  Llzqq.nero.3322.org: 
  / Var/spool/virtual/nero.3322 
  .org / Llzqq 

  Implementation of the following command to generate aliases.db: 
  # Cd / usr / local / etc / postfix # postalias aliases 

  7. Configuration vm-pop3d to automatically boot 
  # Cd / usr / local / etc / rc.d # mv vm-pop3d.sh.sample vm-pop3d.sh 
  Openwebmail nero.3322.org domain configuration support, create the following documentation: 

  # Vi / usr / local / www / cgi-bin / open 
  Webmail/etc/sites.conf/nero.3322.org 

  =========================== Nero 
  .3322. Org ======================= 
  Auth_module auth_vdomain.pl auth_withdomain yes mailspooldir / var / sp 
  Ool/virtual/nero.3322.org 

  Use_syshomedir no use_homedirspools no enable_autoreply no enable_setforward no enable_vdomain yes vdomain_admlist llzqq / / set up here this domain administrator vdomain_maxuser 500 vdomain_vmpop3_pwdpa 
  Th / usr / local / etc / virtual 

  Vdomain_vmpop3_pwdname passwd vdomain_vmpop3_mailpath / var / spo 
  Ol / virtual 
  Vdomain_postfix_alia 
  Ses / usr / local / etc / postfix / a 
  Liases 
  Vdomain_postfix_virt 
  Ual / usr / local / etc / postfix / v 
  Irtual 
  Vdomain_postfix_postalias / usr / l 
  Ocal / sbin / postalias 
  Vdomain_postfix_post 
  Map / usr / local / sbin / postmap 

  # Quota set some quota_module quota_du.pl quota_limit 52400 / / definition of a mailbox size quota_threshold 85 delmail_ifquotahit no delfile_ifquotahit no =========================== nero 
  .3322. Org ======================= 

  # Mkdir-p / var / spoo 
  L/virtual/nero.3322.org 

  # Chown nobody / var / 
  Spool/virtual/nero.3322.org 

  # Chgrp mail / var / spool / virtual / 
  Nero.3322.org 

  # Mkdir-p / usr / loca 
  L/etc/virtual/nero.3322.org 

  # Touch / usr / local / etc / virtual / n 
  Ero.3322.org/passwd 
  # Chmod 644 / usr / local / etc / virtu 
  Al/nero.3322.org/passwd 

  Htpasswd # / usr / loca 
  L/etc/virtual/nero.3322.org / 
  Passwd llzqq 
  # Chmod 755 / usr / loc 
  Al / www / cgi-bin / openwebmail / e 
  Tc / users 

  # # Reboot sync 
  8. Final adoption of access to the browser OPENWEBMAIL 
  Http://nero.3322.org/cgi-bin/ope 
  Nwebmail / openwebmail.pl 

  Part II: anti-virus, spam: clamav + + amavisd-new spam 
  Clamav 1.0 installation: 
  # Cd / usr / ports / security / clamav make install # # make clean 
  # Vi / usr / local / etc / c clamav.conf =============================== 
  Lamav.conf ============================ 
  # Comment or remove the line below. # Example LogFile / var / log / clamav / clamd.log LogFileMaxSize 1M LogTime LogVerbose PidFile / var / run / clamav / clamd.pid DataDirectory / usr / local / share / clamav LocalSocket / tmp / clamd StreamMaxLength 10M MaxThreads 10 MaxDirectoryRecursion 15 User clamav ScanMail ScanArchive ScanRAR ArchiveMaxFileSize 10M ArchiveMaxRecursion 5 ArchiveMaxFiles 1000 ClamukoScanOnOpen ClamukoScanOnClose ClamukoScanOnExec ClamukoIncludePath / var / spool / virtual ClamukoMaxFileSize 6M ClamukoScanArchive ==================== 
  Clamav.conf ======= =========== 
======================

  1.1 update virus 
  # / Usr / local / etc / rc. 
  D / clamav-freshclam.sh start 

  Amavisd-new 2.0 installation 
  # Cd / usr / ports / security / amavisd-new # # make clean make install 
  # Cd / usr / local / etc # mv amavisd.conf-dist amavisd.conf # vi amavisd.conf ==================== 
  ==== ========== Amavisd.conf 
===========================
  $ MYHOME = '/ var / amav 
  Is'; # (default is' / var / ama 
  Vis') 
  $ Mydomain = 'nero.33 
  22.org '; # (no useful defaul 
  T) 
  $ Daemon_user = 'vscan'; # (no de 
  Fault; customary: vscan or amavis) 
  $ Daemon_group = 'vsc 
  An '; # (no default; customar 
  Y: vscan or amavis) 

  $ Log_level = 0; 
  $ Sa_spam_subject_tag = '*** *** SPAM' 
  $ Virus_admin = "root \ @ $ mydomain"; $ spam_admin = "llzqq \ @ $ mydomain"; $ mailfrom_notify_adm 
  In = "llzqq \ @ $ mydomain"; 

  $ Mailfrom_notify_recip = "llzqq \ 
  $ @ Mydomain "; 
  $ Mailfrom_notify_spa 
  Madmin = "llzqq \ @ $ mydomain"; 

  $ Inet_socket_bind ='127 .0.0.1 '; $ forward_method =' smtp: 127.0.0. 
  1:10025 '; 
  $ Notify_method = $ forward_method; inet_socket_port = $ 10,024; $ max_servers = 2; 
  [ 'Clam Antivirus-clamd', \ & ask_daemon, [ "CONT 
  SCAN () \ n ", '/ tmp / clamd'], 

  Qr / \ bOK $ /, qr / \ bFOUND $ /, qr /^.*?: (? Infected 
  Archive )(.*) FOUND $ /] 

  ============================== A 
  Mavisd.conf =============================== 

  2.1 and am clamav to start 
  Avisd-need to configure a new / etc / rc 
  . Conf 

  # Vi / etc / rc.conf 
  Spamd_enable = "YES" amavisd_enable = "YES clamav_clamd_enable =" YES " 

  3.0 Since the installation amavisd-new, spama 
  Ssassin be installed with its configuration Below 

  3.1 The establishment of filtering rules: 
  # Cd / usr / local / etc / mail / spamassassin # env LANG = C vi local.cf ============================= == 
  Local.cf =============================== 
  # SpamAssassin confi 
  G file for version x.xx 

  # Generated by http://www.yrex.c 
  Om / spam / spamconfig.php (version 1.01) 

  # How many hits before a message 
  Is considered spam. 
  Required_hits 4.0 
  # Whether to change the subject 
  Of suspected spam 
  Rewrite_subject 1 
  # Text to prepend to subject if 
  Rewrite_subject is used 
  Subject_tag SPAM ***** ***** 
  # Encapsulate spam in an attachment report_safe 1 
  # Use terse version of the spam report use_terse_report 0 
  # Enable the Bayes system use_bayes 1 
  # Enable Bayes auto-learning auto_learn 1 
  # Enable or disable network checks skip_rbl_checks 1 use_razor2 0 use_dcc 0 use_pyzor 0 
  # Mail using languages used in t 
  Hese country codes will not be marked 
  # As being possibly 
  Spam in a foreign language. 

  # - Chinese english ok_languages zh en 
  # Mail using locales 
  Used in these country codes 
  Will not be marked 
  # As being possibly spam in a fo 
  Reign language. 
  Ok_locales en zh score SUBJ_FULL_OF_8BITS 2 score NO_REAL_NAME 4.0 =============================== 
  Local.cf =============================== 

  3.2 download new junk e-mail address list documents 
  # Cd / usr / local / share / spamassassin # fetch http://anti-spam.org.cn/ 
  Rules/sa/55_diy_score.cf 

  4.0 pairs POSFIX configured in his configuration file add the following elements 
  # Vi / usr / local / etc / postfix / master.cf 
  ———————- Master.cf 
———————
  Smtp-amavis unix - - n - 2 smtp-o smtp_data_done_timeout = 1200-o disable_dns_lookups = yes 
  127.0.0.1:10025 inet n - n - - smtpd-o content_filter-o local_recipient_maps = = =-o relay_recipient_maps-o smtpd_restriction_classes-o smtpd_client_restrictions = = = o smtpd_helo_restrictions—o smtpd_sender_restrictions = o mynetworks = 127.0.0.0 / 8 — ——————- 
  — Master.cf ————— 
——

  # Vi / usr / local / etc / postfix / main.cf 
  Content_filter = smtp-amavis: [12 
  7.0.0.1]: 10024 

  Based on FreeBSD is a function of the relative End landing OPENWEBMAIL the user add, delete the password. 
  The mail server on the entire set up a virtual domain administrators can such an operation, virtual users can modify their own OPENWEBMAIL 

Bookmark it: These icons link to social bookmarking sites where readers can share and discover new web pages.
  • Digg
  • Sphinn
  • del.icio.us
  • Google
  • DotNetKicks
  • DZone
  • Furl
  • Netvouz

Tags: ,

Releated Articles


0 Comments to “FreeBSD in the establishment of a full-featured mail server”

No Comments. Send your comment.

Leave a Reply

You must be logged in to post a comment.