Author Topic: postfix vda patch ลงไปเพื่อ ??  (Read 9569 times)

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2141
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
postfix vda patch ลงไปเพื่อ ??
« on: มกราคม 23, 2011, 10:26:30 PM »
ตัว vda ลงไปเพื่อ แก้รักษาโรค อะไรอ่านได้ครับ อิอิ

เป็นไทย : เวลาต้องการให้ user มี quota mailbox ของแต่ละ user ต้องลง vda patch เข้าไปช่วยกันครับผม
สำหรับการ patch ต้องเชค version ของ postfix ด้วยนะครับ
หลังจาก check version postfix เสร็จ ต้องทำการ check version ของ database ด้วยว่าใช้ตัวไหน เช่นใช้ openldap

ต้องลง vda ดังนี้
postfix-ldap_2.5.5-1.1-vda0_amd64.deb
postfix_2.5.5-1.1-vda0_amd64.deb


* Mailbox / Maildir size limit, known also as "soft quota", to avoid user take
all you disk space
* Customizable "limit" message when the soft quota limit is reached. NOTE: message
is sent to senders, but NOT to the owner of the mailbox.
* Limit only 'INBOX', because some people use IMAP and don't want the same limit in
IMAP folder that are differents from INBOX.
* Support for 'Courier' style Maildir, usefull for people that use courier as pop3/imap
server and to get fast soft quota summary. Note that it is also compatible with qmail maildir per
default.
* Supports for Courier 'maildirsize' file in Maildir folder that is used to read quotas
quickly. Note that this option is not actived per default and can be dangerous on some NFS client
implementation (like for example Solaris that cache some filesystem operations).
* Customisable suffix for Maildir support, when share same external dict between postfix and
pop3/imap server sometime "Maildir/" suffix is needed to avoid extra database handling
(eg LDAP, MySQL...).

download version ที่ใช้ได้ที่

http://vda.sourceforge.net/VDA/

apt-get build-dep postfix

cd /usr/src
apt-get source postfix

(Make sure you use the correct Postfix version in the following commands. I have Postfix 2.5.5
installed. You can find out your Postfix version by running

postconf -d | grep mail_version

The output should look like this:

server1:/usr/src# postconf -d | grep mail_version
mail_version = 2.5.5
milter_macro_v = $mail_name $mail_version
server1:/usr/src#

)

wget http://vda.sourceforge.net/VDA/postfix-2.5.5-vda-ng.patch.gz
gunzip postfix-2.5.5-vda-ng.patch.gz
cd postfix-2.5.5
patch -p1 < ../postfix-2.5.5-vda-ng.patch
dpkg-buildpackage

dpkg -i postfix_2.5.5-1.1_i386.deb postfix-mysql_2.5.5-1.1_i386.deb

ต้องดูให้ตรง กับ รุ่น os ที่ใช้ด้วยน่ะครับ ว่าเป็น 32 bit or 64 bit
« Last Edit: มิถุนายน 24, 2011, 11:25:51 PM by golfreeze »

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2141
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: postfix vda patch ลงไปเพื่อ ??
« Reply #1 on: มิถุนายน 24, 2011, 11:14:12 PM »
###Link load vda patch for postfix

http://debian.home-dn.net/lenny/postfix-vda/

golfreeze

  • Administrator
  • Hero Member
  • *****
  • Posts: 2141
    • View Profile
    • นั่งสมาธิ สติปัฏฐานสี่ พาเที่ยววัด แนะนำวัด แจกcd ธรรมะฟรี
    • Email
Re: postfix vda patch ลงไปเพื่อ ??
« Reply #2 on: มิถุนายน 24, 2011, 11:27:24 PM »
รูปแบบการตั้งค่า vda นะครับ ไปทำที่ไฟล์ main.cf

ควร backup mail.cf ไว้ก่อนนะครับผม ^^

    * These are only the options available in our VDA patch. Look into the Postfix documentation to see how to setup Postfix
    * to use virtual transport. If you use other transport than virtual, this patch is not for you.


      # Basic map of the maildir/mailbox quotas
      # Default: not set
      virtual_mailbox_limit_maps = hash:/etc/postfix/vquota

      # Limit only inbox or whole maildir?
      # Default: no
      virtual_mailbox_limit_inbox = no

      # If set to 'no' and if the delivered message size is smaller than
      # message_size_limit (see Postfix doc for details), the quota will
      # be set to virtual_mailbox_limit (see Postfix doc for details)
      # So, this enables limits smaller than maximum message size.
      # Default: yes
      virtual_mailbox_limit_override = yes

      # Do we use Courier maildir++ quotas?
      # Default: no
      virtual_maildir_extended = yes

      # Will the message be bounced with 5xx code when user over quota? Otherwise
      # the temporary failure 4xx will raise and message will be queued
      # Default: no
      virtual_overquota_bounce = yes

      # When set, the per recipient limit message is search in the map, otherwise
      # the message in 'virtual_maildir_limit_message' is used
      # Default: not set
      virtual_maildir_limit_message_maps = hash:/etc/postfix/limit_messages

      # This message is used when the user is over quota and if the
      # 'virtual_maildir_limit_message_maps' is not set.
      # This is the per server message, unlike the
      # 'virtual_maildir_limit_message' - that's the per recipient message.
      # If both are set, the 'virtual_maildir_limit_message_maps' will precede
      # and this option will not be used.
      # Default: "Sorry, the user's maildir has overdrawn his diskspace quota, please try again later."
      virtual_maildir_limit_message = "User over quota, try again"

      # Suffix added to the maildir/mailbox path, used motly with Courier, because
      # Courier reads the messages from the [path]/Maildir/ directory
      # Default: not set
      virtual_maildir_suffix = "Maildir/"

      # Will we count the trash folder (see the 'virtual_trash_name' option)
      # to the sum of the quota?
      # Default: no
      virtual_trash_count = yes

      # The name of of the trash folder (important for 'virtual_trash_count' option)
      # Default: ".Trash"
      virtual_trash_name = ".Trash"

      # Do we use virtual maildir filter rules?
      # Default: no
      virtual_maildir_filter = no

      # The per user maildir filter map
      # Default: not set
      virtual_maildir_filter_maps = hash:/etc/postfix/vfilter
     
     
      -------------------------------------------------------------------------
      # This is example of hash file of virtual_mailbox_maps directive
      #
      # This is for maibox users
      user1@domain.com.br   com/d/do/domain.com.br/user1
      user2@domain.com.br   com/d/do/domain.com.br/user2
     
      # This is for Maidir users
      user1@domain.net.br   net/d/do/domain.net.br/user1/
      user2@domain.net.br   net/d/do/domain.net.br/user2/
      -------------------------------------------------------------------------
     
     
      -------------------------------------------------------------------------
      # This is example of hash file of virtual_mailbox_limit_maps directive
      # Every quota in this file is in bytes
      #
      user1@domain.com.br   2048000
      user2@domain.com.br   2048000
      user1@domain.net.br   5192000
      # this user has no limit
      user2@domain.net.br   0