作者 主題: [分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9  (閱讀 72708 次)

0 會員 與 1 訪客 正在閱讀本文。

adj38

  • 懷疑的國中生
  • **
  • 文章數: 42
    • 檢視個人資料
不知道大家有沒有渴望利用Openwebmail 的功能...直接在裡面就可以開帳號...然後各個Domain有自己的管理者...
想開幾個帳號就開幾個...不用的話...在上面就可以直接刪除...而且...開出來的帳號還是Virtual User...安全性也夠...還有...
這個不需要用到MySQL...有需要的人...真的是一大福音囉...現在...就讓我們一起來試試看吧...

功能: Postfix+Openwebmail v2.21 + cyrus-sals+Vm-pop3d on Redhat 9.0
由於我這邊強調的是快速安裝...所以遇到有不懂的...我盡量會帶連結給大家參考囉...不過步驟還是滿多的就是..

前言 -- 先學會使用 apt for RH9:
Download:
1.apt-0.5.5cnc6-fr1.i386.rpm
2.apt-devel-0.5.5cnc6-fr1.i386.rpm
3. #rpm -Uvh apt*
參考網站:
http://www.adj.idv.tw/server/linux_apt.php


Step 1 -- 安裝 Postfix+cyrus-sasl on RH9 :
#apt-get install postfix
#apt-get install cyrus-sasl

Postfix+cyrus-sasl 設定請參考鳥哥網站...裡面寫的太詳細啦:
http://linux.vbird.org/linux_server/0390postfix.php#package_RPM_rh9


Step 2 -- 快速安裝 Openwebmail v2.21 on RH9:
Package Download install:
1.perl-CGI-2.81-88.i386.rpm
2.perl-Compress-Zlib-1.21-RH9.i386.rpm
3.perl-Text-Iconv-1.2-RH80.i386.rpm
4.perl-suidperl-5.8.0-88.i386.rpm

Openwebmail v2.21 Download install: openwebmail-2.21-1.i386.rpm
# rpm -Uvh openwebmail-2.21-1.i386.rpm
# /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init
# 修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
照著指示更改為底下參數...
dbm_ext                           .db
dbmopen_ext                       %dbm_ext%
dbmopen_haslock                   yes

就這樣...openwebmail 就裝好囉...打開 Browser 一看便知道
http://your.host.name.com/cgi-bin/openwebmail/openwebmail.pl


Step 3 -- 設定 Virtual User :
參考網站: http://www.bluelavalamp.net/owmvirtual/

假設我以自己的 Domain: rh9.adj.idv.tw   ID: adj  來做說明....
1. 修改 /var/www/cgi-bin/openwebmail/auth_vdomain.pl
將 #my $local_uid=getpwnam('nobody');
改成
my $local_uid=getpwnam('mail');

修改 /etc/postfix/main.cf
將 default_privs = nobody
改成
default_privs = mail

2. 修改 /etc/postfix/main.cf -- 在最後面加入底下幾行
#virtual user settings
virtual_maps = hash:/etc/postfix/virtual
virtual_mailbox_lock  = dotlock
allow_mail_to_commands = alias,forward,include
allow_mail_to_files = alias,forward,include

3. 修改 /etc/postfix/virtual  在最後面加入 ..
adj@rh9.adj.idv.tw      adj.rh9.adj.idv.tw
存檔離開後執行...
#postmap virtual

4. 修改 /etc/postfix/aliases  在最後面加入..
adj.rh9.adj.idv.tw:     :include:/var/spool/webmail/rh9.adj.idv.tw/adj/.forward
存檔離開後執行...
#postalias aliases

5. 建立密碼檔:
#mkdir /etc/virtual
#mkdir /etc/virtual/rh9.adj.idv.tw
#chown -R mail.mail /etc/virtual
#cd /etc/virtual/rh9.adj.idv.tw
#htpasswd -c passwd adj   ==> 輸入密碼後...即為第一個管理者帳號...

6. 建立 /var/spool/webmail 相對應目錄:
#mkdir /var/spool/webmail
#mkdir /var/spool/webmail/rh9.adj.idv.tw
#mkdir /var/spool/webmail/rh9.adj.idv.tw/adj
#cd /var/spool/webmail/rh9.adj.idv.tw/adj
#vi .forward    ==> 加入底下這行做轉信
/var/spool/virtual/rh9.adj.idv.tw/adj
#chown -R mail.mail /var/spool/webmail

7. 建立 /var/spool/virtual 相對應目錄:
#mkdir /var/spool/virtual
#mkdir /var/spool/virtual/rh9.adj.idv.tw
#chown -R mail.mail /var/spool/virtual

8. 修改 /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
底下是我加上去的...請斟酌修改...
代碼: [選擇]

auth_module                     auth_vdomain.pl
auth_withdomain                 yes
use_syshomedir                  no
ow_usersdir                     /var/spool/webmail
#mailspooldir                   /var/spool/mail   ==>記的 Mark 起來
use_homedirspools               no
enable_autoreply                yes
enable_setforward               yes
enable_vdomain                  yes
use_dotlockfile                 yes
vdomain_admlist                 sysadm
vdomain_maxuser                 100
vdomain_maxalias                100
vdomain_vmpop3_pwdpath          /etc/virtual
vdomain_vmpop3_pwdname          passwd
vdomain_vmpop3_mailpath         /var/spool/virtual
vdomain_postfix_aliases         /etc/postfix/aliases
vdomain_postfix_virtual         /etc/postfix/virtual
vdomain_postfix_postalias       /usr/sbin/postalias
vdomain_postfix_postmap         /usr/sbin/postmap

case_insensitive_login          yes
enable_strictvirtuser           yes
enable_changepwd                yes
enable_strictpwd                no
passwd_minlen                   4
session_multilogin              no
enable_userfilter               no
enable_smartfilter              no
enable_webmail                  yes
enable_webdisk                  yes
enable_calendar                 yes
enable_sshterm                  no
enable_pop3                     yes
attlimit                        4096
spool_limit                     40960
quota_limit                     51200

allowed_serverdomain rh9.adj.idv.tw

<domainname_equiv>
rh9.adj.idv.tw:           mail.rh9.adj.idv.tw,      webmail.rh9.adj.idv.tw
</domainname_equiv>  


9. 新增 /var/www/cgi-bin/openwebmail/etc/sites.conf/rh9.adj.idv.tw
代碼: [選擇]

domainnames                     rh9.adj.idv.tw
vdomain_admlist                 adj      ==> 管理者...可多個管理者
vdomain_maxuser                 100
vdomain_maxalias                100
mailspooldir                    /var/spool/virtual/rh9.adj.idv.tw
spool_limit                     50000
quota_limit                     50000


10. 打開 Browser...就可以看到 adj 管理者多個新增帳號的按鈕


新增使用者的畫面:



Step 4 -- 安裝 Vm-pop3d:
1. Download Source and install: vm-pop3d-1.1.6.tar.gz

# tar zxvf vm-pop3d-1.1.6.tar.gz
#cd cd vm-pop3d-1.1.6
#./configure
#make
#make install   ==> 這時會產生一個檔案在 /usr/local/sbin/vm-pop3d
#mv vm-pop3d.init /etc/rc.d/init.d/vm-pop3d
#chkconfig --add vm-pop3d

2. 停止 ipop3 的服務...請啟動 vm-pop3d
#chkconfig ipop3 off
#chkconfig vm-pop3d on
#service vm-pop3d start
這樣 vm-pop3d 就完成啦...

3.測試 vm-pop3d:
代碼: [選擇]

[root@rh9 vm-pop3d-1.1.6]# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK POP3 Welcome to [color=#ff0000]vm-pop3d 1.1.6 [/color]<14158.1071069808@rh9.adj.idv.tw>

在還沒裝這個套件之前...Outlook 只認帳號收信...一但改用 vm-pop3d ...這個習慣必需要改變...現在 Outlook 的帳號必需設整個E-Mail位址才可以收...如  : adj@rh9.adj.idv.tw


做到這個地方...算是告一段落...不過因為實作離寫文章有一段時間...
如果中間有不正確的地方...請再提醒一下囉...希望大家都可以裝起來試試看啦...Good ~~~

johngame

  • 可愛的小學生
  • *
  • 文章數: 25
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #1 於: 2003-12-31 04:46 »
對不起....請問一下
我設定到最後一行# service vm-pop3d start
出現如下錯誤....
Starting vm-pop3d: execvp: 沒有此一檔案或目錄
                                                           [失敗]
有沒有已經成功的人可以告訴我那是什麼問題嗎?

akaiafan

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #2 於: 2004-01-08 18:17 »
cd /ect/rc.d/init.d/
vi vm-pop3d

deamon vm-pop3d....

deamon /usr/local/sbin/vm-pop3d.....

johngame

  • 可愛的小學生
  • *
  • 文章數: 25
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #3 於: 2004-01-08 19:23 »
謝謝囉....^_^

晚上試試去

kevin75

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
請教一下!
« 回覆 #4 於: 2004-01-15 10:05 »
先謝謝各位的分享,我依上述的方法設定已經ok,但我沒有用webmail的部份,現有一問題請教一下,就我的vm-pop3d在執行一段時間後會停止服務,就是會從執行程序中消失,請教各位有遇到類似的問題嗎???或是可告知我的問題出在那裡??
謝謝各位!! :)

johngame

  • 可愛的小學生
  • *
  • 文章數: 25
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #5 於: 2004-01-15 23:29 »
我的vm-pop3d已經RUN了一個星期了還沒出現問題....openwebmail也可以運作....virtual domain的管理者也可以在openwebmail管理帳號
可是....還是沒搞定SASL....在外面總是沒法寄信說........需要再加油

kevin75

  • 可愛的小學生
  • *
  • 文章數: 12
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #6 於: 2004-01-19 09:15 »
vm-pop3d目前已正常使用將近一個星期,上述設定也沒有問題了,再次謝謝各位囉!!

jenglue

  • 可愛的小學生
  • *
  • 文章數: 15
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #7 於: 2004-01-27 22:43 »
引述: "johngame"
我的vm-pop3d已經RUN了一個星期了還沒出現問題....openwebmail也可以運作....virtual domain的管理者也可以在openwebmail管理帳號
可是....還是沒搞定SASL....在外面總是沒法寄信說........需要再加油


小弟也有相同的問題說

不過我的 SASL 是可以跑的

我猜想是因為 SASL 沒法抓到 postfix 的 vdomain 的使用者資料吧

他用的是系統的使用者資料造成的

不知道有沒有解決的辦法??

Bolunamiwa

  • 憂鬱的高中生
  • ***
  • 文章數: 156
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #8 於: 2004-01-29 08:53 »
請問第10.
打開 Browser...就可以看到 adj 管理者多個新增帳號的按鈕
新增使用者的畫面:
是要如何開啟?

johngame

  • 可愛的小學生
  • *
  • 文章數: 25
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #9 於: 2004-01-29 12:28 »
在第一頁選按"設定(個人偏好設定)"進去就可以啦

Bolunamiwa

  • 憂鬱的高中生
  • ***
  • 文章數: 156
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #10 於: 2004-01-29 23:01 »
請問第8.的內容修改自己的domain name後是直接加在原openwebmail.conf的最後面嗎? 其中有一段auth_module 重覆, 是使用auth_unix.pl和auth_vdomain.pl同時存在, 還是只留auth_vdomain.pl就好?
我在IE執行會出現Service is not available for domain 'host.mydomain'
不曉得什麼原因?

Bolunamiwa

  • 憂鬱的高中生
  • ***
  • 文章數: 156
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #11 於: 2004-01-30 19:53 »
引述: "Bolunamiwa"
請問第8.的內容修改自己的domain name後是直接加在原openwebmail.conf的最後面嗎? 其中有一段auth_module 重覆, 是使用auth_unix.pl和auth_vdomain.pl同時存在, 還是只留auth_vdomain.pl就好?

julian177

  • 可愛的小學生
  • *
  • 文章數: 21
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #12 於: 2004-02-04 00:05 »
小弟按照adj38大大的指示及參考鳥哥的大作將MAIL SERVER架設起來了...
但是,只能寄信出去...收不到信件...
從被退回的信件所看到的錯誤訊息如下:
This is the Postfix program at host mail.julian.idv.tw.

I'm sorry to have to inform you that the message returned
below could not be delivered to one or more destinations.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the message returned below.

         The Postfix program

<julian.julian.idv.twnick@julian.idv.tw>: unknown user:
    "julian.julian.idv.twnick"

<nick.julian.idv.tw@julian.idv.tw>: unknown user: "nick.julian.idv.tw"



Reporting-MTA: dns; mail.julian.idv.tw
Arrival-Date: Tue,  3 Feb 2004 23:23:07 +0800 (CST)

Final-Recipient: rfc822; julian.julian.idv.twnick@julian.idv.tw
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; unknown user: "julian.julian.idv.twnick"

Final-Recipient: rfc822; nick.julian.idv.tw@julian.idv.tw
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; unknown user: "nick.julian.idv.tw"



主題:
444
寄信人:
julian 國樑 <julian177@so-net.net.tw>
日期:
Tue, 03 Feb 2004 23:22:38 +0800
收信人:
julian@julian.idv.tw

444

nick是小在做帳號測試時,在openwebamil中所開的帳號...
為什麼會出現在錯誤訊息中呢...?
小弟沒有安裝Vm-pop3d,因為出現以下訊息..
[root@dns vm-pop3d-1.1.6]# ./configure
loading cache ./config.cache
checking for gcc... no
checking for cc... no
configure: error: no acceptable cc found in $PATH
請問是什麼意思啊...?什麼是gcc什麼是cc啊..?
以下是小弟的main.cf內容....
請各位大大相助...
# Global Postfix configuration file. This file lists only a subset
# of all 250+ parameters. See the sample-xxx.cf files for a full list.
#
# The general format is lines with parameter = value pairs. Lines
# that begin with whitespace continue the previous line. A value can
# contain references to other $names or ${name}s.
#
# NOTE - CHANGE NO MORE THAN 2-3 PARAMETERS AT A TIME, AND TEST IF
# POSTFIX STILL WORKS AFTER EVERY CHANGE.

# SOFT BOUNCE
#
# The soft_bounce parameter provides a limited safety net for
# testing.  When soft_bounce is enabled, mail will remain queued that
# would otherwise bounce. This parameter disables locally-generated
# bounces, and prevents the SMTP server from rejecting mail permanently
# (by changing 5xx replies into 4xx replies). However, soft_bounce
# is no cure for address rewriting mistakes or mail routing mistakes.
#
#soft_bounce = no

# LOCAL PATHNAME INFORMATION
#
# The queue_directory specifies the location of the Postfix queue.
# This is also the root directory of Postfix daemons that run chrooted.
# See the files in examples/chroot-setup for setting up Postfix chroot
# environments on different UNIX systems.
#
queue_directory = /var/spool/postfix

# The command_directory parameter specifies the location of all
# postXXX commands.
#
command_directory = /usr/sbin

# The daemon_directory parameter specifies the location of all Postfix
# daemon programs (i.e. programs listed in the master.cf file). This
# directory must be owned by root.
#
daemon_directory = /usr/libexec/postfix

# QUEUE AND PROCESS OWNERSHIP
#
# The mail_owner parameter specifies the owner of the Postfix queue
# and of most Postfix daemon processes.  Specify the name of a user
# account THAT DOES NOT SHARE ITS USER OR GROUP ID WITH OTHER ACCOUNTS
# AND THAT OWNS NO OTHER FILES OR PROCESSES ON THE SYSTEM.  In
# particular, don't specify nobody or daemon. PLEASE USE A DEDICATED
# USER.
#
mail_owner = postfix

# The default_privs parameter specifies the default rights used by
# the local delivery agent for delivery to external file or command.
# These rights are used in the absence of a recipient user context.
# DO NOT SPECIFY A PRIVILEGED USER OR THE POSTFIX OWNER.
#
default_privs = mail

# INTERNET HOST AND DOMAIN NAMES
#
# The myhostname parameter specifies the internet hostname of this
# mail system. The default is to use the fully-qualified domain name
# from gethostname(). $myhostname is used as a default value for many
# other configuration parameters.
#
myhostname = mail.julian.idv.tw
#myhostname = virtual.domain.tld

# The mydomain parameter specifies the local internet domain name.
# The default is to use $myhostname minus the first component.
# $mydomain is used as a default value for many other configuration
# parameters.
#
mydomain = julian.idv.tw

# SENDING MAIL
#
# The myorigin parameter specifies the domain that locally-posted
# mail appears to come from. The default is to append $myhostname,
# which is fine for small sites.  If you run a domain with multiple
# machines, you should (1) change this to $mydomain and (2) set up
# a domain-wide alias database that aliases each user to
# user@that.users.mailhost.
#
# For the sake of consistency between sender and recipient addresses,
# myorigin also specifies the default domain name that is appended
# to recipient addresses that have no @domain part.
#
#myorigin = $myhostname
myorigin = $mydomain

# RECEIVING MAIL

# The inet_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on.  By default,
# the software claims all active interfaces on the machine. The
# parameter also controls delivery of mail to user@[ip.address].
#
# See also the proxy_interfaces parameter, for network addresses that
# are forwarded to us via a proxy or network address translator.
#
# Note: you need to stop/start Postfix when this parameter changes.
#
inet_interfaces = all
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
#inet_interfaces = localhost

# The proxy_interfaces parameter specifies the network interface
# addresses that this mail system receives mail on by way of a
# proxy or network address translation unit. This setting extends
# the address list specified with the inet_interfaces parameter.
#
# You must specify your proxy/NAT addresses when your system is a
# backup MX host for other domains, otherwise mail delivery loops
# will happen when the primary MX host is down.
#
#proxy_interfaces =
#proxy_interfaces = 1.2.3.4

# The mydestination parameter specifies the list of domains that this
# machine considers itself the final destination for.
#
# These domains are routed to the delivery agent specified with the
# local_transport parameter setting. By default, that is the UNIX
# compatible delivery agent that lookups all recipients in /etc/passwd
# and /etc/aliases or their equivalent.
#
# The default is $myhostname + localhost.$mydomain.  On a mail domain
# gateway, you should also include $mydomain.
#
# Do not specify the names of virtual domains - those domains are
# specified elsewhere (see sample-virtual.cf).
#
# Do not specify the names of domains that this machine is backup MX
# host for. Specify those names via the relay_domains settings for
# the SMTP server, or use permit_mx_backup if you are lazy (see
# sample-smtpd.cf).
#
# The local machine is always the final destination for mail addressed
# to user@[the.net.work.address] of an interface that the mail system
# receives mail on (see the inet_interfaces parameter).
#
# Specify a list of host or domain names, /file/name or type:table
# patterns, separated by commas and/or whitespace. A /file/name
# pattern is replaced by its contents; a type:table is matched when
# a name matches a lookup key (the right-hand side is ignored).
# Continue long lines by starting the next line with whitespace.
#
# See also below, section "REJECTING MAIL FOR UNKNOWN LOCAL USERS".
#
mydestination = $mydomain, $myhostname
#mydestination = $myhostname, localhost.$mydomain $mydomain
#mydestination = $myhostname, localhost.$mydomain, $mydomain,
#   mail.$mydomain, www.$mydomain, ftp.$mydomain

# REJECTING MAIL FOR UNKNOWN LOCAL USERS
#
# The local_recipient_maps parameter specifies optional lookup tables
# with all names or addresses of users that are local with respect
# to $mydestination and $inet_interfaces.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
#
# To turn off local recipient checking in the SMTP server, specify
# local_recipient_maps = (i.e. empty).
#
# The default setting assumes that you use the default Postfix local
# delivery agent for local delivery. You need to update the
# local_recipient_maps setting if:
#
# - You define $mydestination domain recipients in files other than
#   /etc/passwd, /etc/aliases, or the $virtual_alias_maps files.
#   For example, you define $mydestination domain recipients in    
#   the $virtual_mailbox_maps files.
#
# - You redefine the local delivery agent in master.cf.
#
# - You redefine the "local_transport" setting in main.cf.
#
# - You use the "luser_relay", "mailbox_transport", or "fallback_transport"
#   feature of the Postfix local delivery agent (see sample-local.cf).
#
# Details are described in the LOCAL_RECIPIENT_README file.
#
# Beware: if the Postfix SMTP server runs chrooted, you probably have
# to access the passwd file via the proxymap service, in order to
# overcome chroot restrictions. The alternative, having a copy of
# the system passwd file in the chroot jail is just not practical.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify a bare username, an @domain.tld
# wild-card, or specify a user@domain.tld address.
#
#local_recipient_maps = unix:passwd.byname $alias_maps
#local_recipient_maps = proxy:unix:passwd.byname $alias_maps
#local_recipient_maps =

# The unknown_local_recipient_reject_code specifies the SMTP server
# response code when a recipient domain matches $mydestination or
# $inet_interfaces, while $local_recipient_maps is non-empty and the
# recipient address or address local-part is not found.
#
# The default setting is 550 (reject mail) but it is safer to start
# with 450 (try again later) until you are certain that your
# local_recipient_maps settings are OK.
#
#unknown_local_recipient_reject_code = 550
unknown_local_recipient_reject_code = 450

# TRUST AND RELAY CONTROL

# The mynetworks parameter specifies the list of "trusted" SMTP
# clients that have more privileges than "strangers".
#
# In particular, "trusted" SMTP clients are allowed to relay mail
# through Postfix.  See the smtpd_recipient_restrictions parameter
# in file sample-smtpd.cf.
#
# You can specify the list of "trusted" network addresses by hand
# or you can let Postfix do it for you (which is the default).
#
# By default (mynetworks_style = subnet), Postfix "trusts" SMTP
# clients in the same IP subnetworks as the local machine.
# On Linux, this does works correctly only with interfaces specified
# with the "ifconfig" command.
#
# Specify "mynetworks_style = class" when Postfix should "trust" SMTP
# clients in the same IP class A/B/C networks as the local machine.
# Don't do this with a dialup site - it would cause Postfix to "trust"
# your entire provider's network.  Instead, specify an explicit
# mynetworks list by hand, as described below.
#  
# Specify "mynetworks_style = host" when Postfix should "trust"
# only the local machine.
#
#mynetworks_style = class
#mynetworks_style = subnet
#mynetworks_style = host

# Alternatively, you can specify the mynetworks list by hand, in
# which case Postfix ignores the mynetworks_style setting.
#
# Specify an explicit list of network/netmask patterns, where the
# mask specifies the number of bits in the network part of a host
# address.
#
# You can also specify the absolute pathname of a pattern file instead
# of listing the patterns here. Specify type:table for table-based lookups
# (the value on the table right-hand side is not used).
#
mynetworks = 192.168.1.0/24, 127.0.0.0/8, hash:/etc/postfix/access
#mynetworks = $config_directory/mynetworks
#mynetworks = hash:/etc/postfix/network_table

# The relay_domains parameter restricts what destinations this system will
# relay mail to.  See the smtpd_recipient_restrictions restriction in the
# file sample-smtpd.cf for detailed information.
#
# By default, Postfix relays mail
# - from "trusted" clients (IP address matches $mynetworks) to any destination,
# - from "untrusted" clients to destinations that match $relay_domains or
#   subdomains thereof, except addresses with sender-specified routing.
# The default relay_domains value is $mydestination.
#
# In addition to the above, the Postfix SMTP server by default accepts mail
# that Postfix is final destination for:
# - destinations that match $inet_interfaces,
# - destinations that match $mydestination
# - destinations that match $virtual_alias_domains,
# - destinations that match $virtual_mailbox_domains.
# These destinations do not need to be listed in $relay_domains.
#
# Specify a list of hosts or domains, /file/name patterns or type:name
# lookup tables, separated by commas and/or whitespace.  Continue
# long lines by starting the next line with whitespace. A file name
# is replaced by its contents; a type:name table is matched when a
# (parent) domain appears as lookup key.
#
# NOTE: Postfix will not automatically forward mail for domains that
# list this system as their primary or backup MX host. See the
# permit_mx_backup restriction in the file sample-smtpd.cf.
#
relay_domains = julian.idv.tw

# INTERNET OR INTRANET

# The relayhost parameter specifies the default host to send mail to
# when no entry is matched in the optional transport(5) table. When
# no relayhost is given, mail is routed directly to the destination.
#
# On an intranet, specify the organizational domain name. If your
# internal DNS uses no MX records, specify the name of the intranet
# gateway host instead.
#
# In the case of SMTP, specify a domain, host, host:port, [host]:port,
# [address] or [address]:port; the form [host] turns off MX lookups.
#
# If you're connected via UUCP, see also the default_transport parameter.
#
#relayhost = $mydomain
#relayhost = gateway.my.domain
#relayhost = uucphost
#relayhost = [an.ip.add.ress]

# REJECTING UNKNOWN RELAY USERS
#
# The relay_recipient_maps parameter specifies optional lookup tables
# with all addresses in the domains that match $relay_domains.
#
# If this parameter is defined, then the SMTP server will reject
# mail for unknown relay users. This feature is off by default.
#
# The right-hand side of the lookup tables is conveniently ignored.
# In the left-hand side, specify an @domain.tld wild-card, or specify
# a user@domain.tld address.
#
#relay_recipient_maps = hash:/etc/postfix/relay_recipients

# INPUT RATE CONTROL
#
# The in_flow_delay configuration parameter implements mail input
# flow control. This feature is turned on by default, although it
# still needs further development (it's disabled on SCO UNIX due
# to an SCO bug).
#
# A Postfix process will pause for $in_flow_delay seconds before
# accepting a new message, when the message arrival rate exceeds the
# message delivery rate. With the default 50 SMTP server process
# limit, this limits the mail inflow to 50 messages a second more
# than the number of messages delivered per second.
#
# Specify 0 to disable the feature. Valid delays are 0..10.
#
#in_flow_delay = 1s

# ADDRESS REWRITING
#
# Insert text from sample-rewrite.cf if you need to do address
# masquerading.
#
# Insert text from sample-canonical.cf if you need to do address
# rewriting, or if you need username->Firstname.Lastname mapping.

# ADDRESS REDIRECTION (VIRTUAL DOMAIN)
#
# Insert text from sample-virtual.cf if you need virtual domain support.

# "USER HAS MOVED" BOUNCE MESSAGES
#
# Insert text from sample-relocated.cf if you need "user has moved"
# style bounce messages. Alternatively, you can bounce recipients
# with an SMTP server access table. See sample-smtpd.cf.

# TRANSPORT MAP
#
# Insert text from sample-transport.cf if you need explicit routing.

# ALIAS DATABASE
#
# The alias_maps parameter specifies the list of alias databases used
# by the local delivery agent. The default list is system dependent.
#
# On systems with NIS, the default is to search the local alias
# database, then the NIS alias database. See aliases(5) for syntax
# details.
#
# If you change the alias database, run "postalias /etc/aliases" (or
# wherever your system stores the mail alias file), or simply run
# "newaliases" to build the necessary DBM or DB file.
#
# It will take a minute or so before changes become visible.  Use
# "postfix reload" to eliminate the delay.
#
#alias_maps = dbm:/etc/aliases
alias_maps = hash:/etc/postfix/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases

# The alias_database parameter specifies the alias database(s) that
# are built with "newaliases" or "sendmail -bi".  This is a separate
# configuration parameter, because alias_maps (see above) may specify
# tables that are not necessarily all under control by Postfix.
#
alias_database = dbm:/etc/postfix/aliases
#alias_database = dbm:/etc/aliases
#alias_database = dbm:/etc/mail/aliases
#alias_database = hash:/etc/aliases
#alias_database = hash:/etc/aliases, hash:/opt/majordomo/aliases

# ADDRESS EXTENSIONS (e.g., user+foo)
#
# The recipient_delimiter parameter specifies the separator between
# user names and address extensions (user+foo). See canonical(5),
# local(8), relocated(5) and virtual(5) for the effects this has on
# aliases, canonical, virtual, relocated and .forward file lookups.
# Basically, the software tries user+foo and .forward+foo before
# trying user and .forward.
#
#recipient_delimiter = +

# DELIVERY TO MAILBOX
#
# The home_mailbox parameter specifies the optional pathname of a
# mailbox file relative to a user's home directory. The default
# mailbox file is /var/spool/mail/user or /var/mail/user.  Specify
# "Maildir/" for qmail-style delivery (the / is required).
#
#home_mailbox = Mailbox
#home_mailbox = Maildir/
 
# The mail_spool_directory parameter specifies the directory where
# UNIX-style mailboxes are kept. The default setting depends on the
# system type.
#
#mail_spool_directory = /var/mail
#mail_spool_directory = /var/spool/mail

# The mailbox_command parameter specifies the optional external
# command to use instead of mailbox delivery. The command is run as
# the recipient with proper HOME, SHELL and LOGNAME environment settings.
# Exception:  delivery for root is done as $default_user.
#
# Other environment variables of interest: USER (recipient username),
# EXTENSION (address extension), DOMAIN (domain part of address),
# and LOCAL (the address localpart).
#
# Unlike other Postfix configuration parameters, the mailbox_command
# parameter is not subjected to $parameter substitutions. This is to
# make it easier to specify shell syntax (see example below).
#
# Avoid shell meta characters because they will force Postfix to run
# an expensive shell process. Procmail alone is expensive enough.
#
# IF YOU USE THIS TO DELIVER MAIL SYSTEM-WIDE, YOU MUST SET UP AN
# ALIAS THAT FORWARDS MAIL FOR ROOT TO A REAL USER.
#
#mailbox_command = /some/where/procmail
#mailbox_command = /some/where/procmail -a "$EXTENSION"

# The mailbox_transport specifies the optional transport in master.cf
# to use after processing aliases and .forward files. This parameter
# has precedence over the mailbox_command, fallback_transport and
# luser_relay parameters.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf.  The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for    
# non-UNIX accounts with "User unknown in local recipient table".
#
#mailbox_transport = lmtp:unix:/file/name
#mailbox_transport = cyrus

# The fallback_transport specifies the optional transport in master.cf
# to use for recipients that are not found in the UNIX passwd database.
# This parameter has precedence over the luser_relay parameter.
#
# Specify a string of the form transport:nexthop, where transport is
# the name of a mail delivery transport defined in master.cf.  The
# :nexthop part is optional. For more details see the sample transport
# configuration file.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must update the "local_recipient_maps" setting in
# the main.cf file, otherwise the SMTP server will reject mail for    
# non-UNIX accounts with "User unknown in local recipient table".
#
#fallback_transport = lmtp:unix:/file/name
#fallback_transport = cyrus
#fallback_transport =

# The luser_relay parameter specifies an optional destination address
# for unknown recipients.  By default, mail for unknown@$mydestination
# and unknown@[$inet_interfaces] is returned as undeliverable.
#
# The following expansions are done on luser_relay: $user (recipient
# username), $shell (recipient shell), $home (recipient home directory),
# $recipient (full recipient address), $extension (recipient address
# extension), $domain (recipient domain), $local (entire recipient
# localpart), $recipient_delimiter. Specify ${name?value} or
# ${name:value} to expand value only when $name does (does not) exist.
#
# luser_relay works only for the default Postfix local delivery agent.
#
# NOTE: if you use this feature for accounts not in the UNIX password
# file, then you must specify "local_recipient_maps =" (i.e. empty) in
# the main.cf file, otherwise the SMTP server will reject mail for    
# non-UNIX accounts with "User unknown in local recipient table".
#
#luser_relay = $user@other.host
#luser_relay = $local@other.host
#luser_relay = admin+$local
 
# JUNK MAIL CONTROLS
#
# The controls listed here are only a very small subset. See the file
# sample-smtpd.cf for an elaborate list of anti-UCE controls.

# The header_checks parameter specifies an optional table with patterns
# that each logical message header is matched against, including
# headers that span multiple physical lines.
#
# By default, these patterns also apply to MIME headers and to the
# headers of attached messages. With older Postfix versions, MIME and
# attached message headers were treated as body text.
#
# For details, see the sample-filter.cf file.
#
#header_checks = regexp:/etc/postfix/header_checks

# FAST ETRN SERVICE
#
# Postfix maintains per-destination logfiles with information about
# deferred mail, so that mail can be flushed quickly with the SMTP
# "ETRN domain.tld" command, or by executing "sendmail -qRdomain.tld".
#
# By default, Postfix maintains deferred mail logfile information
# only for destinations that Postfix is willing to relay to (as
# specified in the relay_domains parameter). For other destinations,
# Postfix attempts to deliver ALL queued mail after receiving the
# SMTP "ETRN domain.tld" command, or after execution of "sendmail
# -qRdomain.tld". This can be slow when a lot of mail is queued.
#
# The fast_flush_domains parameter controls what destinations are
# eligible for this "fast ETRN/sendmail -qR" service.
#
#fast_flush_domains = $relay_domains
#fast_flush_domains =

# SHOW SOFTWARE VERSION OR NOT
#
# The smtpd_banner parameter specifies the text that follows the 220
# code in the SMTP server's greeting banner. Some people like to see
# the mail version advertised. By default, Postfix shows no version.
#
# You MUST specify $myhostname at the start of the text. That is an
# RFC requirement. Postfix itself does not care.
#
#smtpd_banner = $myhostname ESMTP $mail_name
#smtpd_banner = $myhostname ESMTP $mail_name ($mail_version)

# PARALLEL DELIVERY TO THE SAME DESTINATION
#
# How many parallel deliveries to the same user or domain? With local
# delivery, it does not make sense to do massively parallel delivery
# to the same user, because mailbox updates must happen sequentially,
# and expensive pipelines in .forward files can cause disasters when
# too many are run at the same time. With SMTP deliveries, 10
# simultaneous connections to the same domain could be sufficient to
# raise eyebrows.
#
# Each message delivery transport has its XXX_destination_concurrency_limit
# parameter.  The default is $default_destination_concurrency_limit for
# most delivery transports. For the local delivery agent the default is 2.

#local_destination_concurrency_limit = 2
#default_destination_concurrency_limit = 10

# DEBUGGING CONTROL
#
# The debug_peer_level parameter specifies the increment in verbose
# logging level when an SMTP client or server host name or address
# matches a pattern in the debug_peer_list parameter.
#
debug_peer_level = 2

# The debug_peer_list parameter specifies an optional list of domain
# or network patterns, /file/name patterns or type:name tables. When
# an SMTP client or server host name or address matches a pattern,
# increase the verbose logging level by the amount specified in the
# debug_peer_level parameter.
#
#debug_peer_list = 127.0.0.1
#debug_peer_list = some.domain

# The debugger_command specifies the external command that is executed
# when a Postfix daemon program is run with the -D option.
#
# Use "command .. & sleep 5" so that the debugger can attach before
# the process marches on. If you use an X-based debugger, be sure to
# set up your XAUTHORITY environment variable before starting Postfix.
#
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    xxgdb $daemon_directory/$process_name $process_id & sleep 5

# If you don't have X installed on the Postfix machine, try:
# debugger_command =
#   PATH=/bin:/usr/bin:/usr/local/bin; export PATH; (echo cont;
#   echo where) | gdb $daemon_directory/$process_name $process_id 2>&1
#   >$config_directory/$process_name.$process_id.log & sleep 5

# INSTALL-TIME CONFIGURATION INFORMATION
#
# The following parameters are used when installing a new Postfix version.
#
# sendmail_path: The full pathname of the Postfix sendmail command.
# This is the Sendmail-compatible mail posting interface.
#
sendmail_path = /usr/sbin/sendmail.postfix

# newaliases_path: The full pathname of the Postfix newaliases command.
# This is the Sendmail-compatible command to build alias databases.
#
newaliases_path = /usr/bin/newaliases.postfix

# mailq_path: The full pathname of the Postfix mailq command.  This
# is the Sendmail-compatible mail queue listing command.
#
mailq_path = /usr/bin/mailq.postfix

# setgid_group: The group for mail submission and queue management
# commands.  This must be a group name with a numerical group ID that
# is not shared with other accounts, not even with the Postfix account.
#
setgid_group = postdrop

# manpage_directory: The location of the Postfix on-line manual pages.
#
manpage_directory = /usr/share/man

# sample_directory: The location of the Postfix sample configuration files.
#
sample_directory = /usr/share/doc/postfix-2.0.11/samples

# readme_directory: The location of the Postfix README files.
#
readme_directory = /usr/share/doc/postfix-2.0.11/README_FILES
alias_database = hash:/etc/postfix/aliases

# For 啟動 smtp 郵件認證功能 2.xx 版本的 Cyrus SASL
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = ' '
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated,
     reject_unauth_destination
smtpd_client_restrictions = permit_sasl_authenticated
smtpd_sasl_security_options = noanonymous

#virtual user settings
virtual_maps = hash:/etc/postfix/virtual
virtual_mailbox_lock = dotlock
allow_mail_to_commands = alias,forward,include
allow_mail_to_files = alias,forward,include

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #13 於: 2004-02-09 20:54 »
為何我的個人偏好設定沒有管理者按鈕

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #14 於: 2004-02-10 13:00 »
thank you
問題已解決, 但是請問在刪除使用者時出現internal server error
請問這是正常嗎? 我是用freebsd + openwebmail 2.30

Pail

  • 俺是博士!
  • *****
  • 文章數: 1040
  • 性別: 男
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #15 於: 2004-02-10 14:23 »
個人意見....
對於 openwebmail V2.30 + vmpop3d + virtual-account ...
也請參考  /PATH/cgi-bin/openwebmail/etc/auth_vdomain.conf.default
裡頭有很詳細的告訴你怎麼做了說....

若要加上 quota 的功能...也只要在 site.conf/Domain 裡頭,
加上 quota_limit 等的參數就好了...
請參考 /PATH/cgi-bin/openwebmail/etc/openwebmail.conf.help 李頭的說明.
Pail Luo.
Email: pail.luo@gmail.com

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #16 於: 2004-02-10 17:45 »
引述: "pail"
個人意見....
對於 openwebmail V2.30 + vmpop3d + virtual-account ...
也請參考  /PATH/cgi-bin/openwebmail/etc/auth_vdomain.conf.default
裡頭有很詳細的告訴你怎麼做了說....

若要加上 quota 的功能...也只要在 site.conf/Domain 裡頭,
加上 quota_limit 等的參數就好了...
請參考 /PATH/cgi-bin/openwebmail/etc/openwebmail.conf.help 李頭的說明.

thank you

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #17 於: 2004-02-10 22:39 »
小弟再次重新安裝, 但竟然第一個使用者使說密碼錯誤, 找了很久亦找不出答案, 希望各位大大可以幫一幫忙
Tue Feb 10 22:31:57 2004 - [247] (192.168.1.2) admin - userinfo error - auth_vdomain.pl, ret -2, Not valid user@domain format
Tue Feb 10 22:32:07 2004 - [247] (192.168.1.2) admin - login error - no such user - loginname=admin@woowawa.com

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #18 於: 2004-02-10 23:57 »
引述: "清仔"
小弟再次重新安裝, 但竟然第一個使用者使說密碼錯誤, 找了很久亦找不出答案, 希望各位大大可以幫一幫忙
Tue Feb 10 22:31:57 2004 - [247] (192.168.1.2) admin - userinfo error - auth_vdomain.pl, ret -2, Not valid user@domain format
Tue Feb 10 22:32:07 2004 - [247] (192.168.1.2) admin - login error - no such user - loginname=admin@woowawa.com

sorry, 已經找出問題, 原來是小了auth_withdomain      yes

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #19 於: 2004-02-11 10:39 »
<<< 220 abc.com ESMTP Postfix
>>> EHLO abc.com
<<< 250-abc.com
<<< 250-PIPELINING
<<< 250-SIZE 10240000
<<< 250-ETRN
<<< 250-XVERP
<<< 250 8BITMIME
>>> MAIL FROM:<abc@abc.com>
<<< 250 Ok
>>> RCPT TO:<abc@abc.com>
<<< 450 <abc@abc.com>: User unknown in local recipient table
我在openwebmail send email給自己出現這個問題, 請問這是什麼問題?

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #20 於: 2004-02-11 15:44 »
sorry sir
已經找到問題, 又再次打錯字, (=_=)

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #21 於: 2004-02-11 15:57 »
引述: "pail"
個人意見....
對於 openwebmail V2.30 + vmpop3d + virtual-account ...
也請參考  /PATH/cgi-bin/openwebmail/etc/auth_vdomain.conf.default
裡頭有很詳細的告訴你怎麼做了說....

若要加上 quota 的功能...也只要在 site.conf/Domain 裡頭,
加上 quota_limit 等的參數就好了...
請參考 /PATH/cgi-bin/openwebmail/etc/openwebmail.conf.help 李頭的說明.

thank you
這兩個檔案已經看過了, 但小弟還不知道在刪除使用者時出現internal server error的原因在那裏, 請問這是正常嗎? 我是用freebsd + openwebmail 2.30

alexc

  • 可愛的小學生
  • *
  • 文章數: 6
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #22 於: 2004-03-31 21:18 »
各位前輩

小弟照著adj大大的postfix+vm-pop3d+openwebmail快速安裝法做
做完後,要進入openwebmail時,管理者都進不去,只出現密碼錯誤
請問是哪裡出了問題,由於小弟還是新手,請幫幫忙,謝謝

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #23 於: 2004-04-05 16:00 »
請問大大可以詳細些說明sasl的部份嗎?

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #24 於: 2004-04-06 16:51 »
Software error:
Insecure dependency in chmod while running setgid at /usr/libdata/perl/5.00503/File/Path.pm line 165.

For help, please send mail to the webmaster (user@domain.com), giving this error message and the time and date of the error.
剛除使用者時出現以上錯誤, 請問大大如何解決

chiquitita

  • 懷疑的國中生
  • **
  • 文章數: 38
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #25 於: 2004-04-08 10:13 »
請參考此討論串, 實作後是可正確的將該virtual user及其下所有子資料夾刪除, 但是否隱藏有其他問題(尤其是安全性),尚在了解中.

http://sourceforge.net/forum/forum.php?thread_id=1033225&forum_id=108433

清仔

  • 活潑的大學生
  • ***
  • 文章數: 298
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #26 於: 2004-04-10 16:25 »
引述: "chiquitita"
請參考此討論串, 實作後是可正確的將該virtual user及其下所有子資料夾刪除, 但是否隱藏有其他問題(尤其是安全性),尚在了解中.

http://sourceforge.net/forum/forum.php?thread_id=1033225&forum_id=108433

thank you
你的問題還在了解中?
為何不多人有這個問題

andyj

  • 鑽研的研究生
  • *****
  • 文章數: 957
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #27 於: 2004-08-10 19:30 »
求助!
我的openwebmail 都照ADJ學長的教學來做設定
但是最後要登入管理者卻出現了

無法建立使用者目錄! /var/spool/webmail/send.idv.tw/andy/mail (Permission denied)

我看過權限都為755 mail:mail
實在找不出問題來

明明就知道是權限問題
就是不知道是哪邊的權限
如果是目錄的話改755也不行:~
麻煩指點我一下

湯姆貓

  • 活潑的大學生
  • ***
  • 文章數: 475
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #28 於: 2004-08-11 00:18 »
試試看這個..

把auth_vdomain.pl
裡面的nobody改成mail

andyj

  • 鑽研的研究生
  • *****
  • 文章數: 957
    • 檢視個人資料
[分享]安裝 Postfix+sasl+Openwebmail+Vm-pop3d on RH9
« 回覆 #29 於: 2004-08-11 09:13 »
引述: "湯姆貓"
試試看這個..

把auth_vdomain.pl
裡面的nobody改成mail


有耶!
my $local_uid=getpwnam($conf{'virtualuser'}||'mail');

這個字串是openwebmail 預設的,只有把nobody改成mail
/etc/postfix/main.cf
裡面也有改成mail