Tarball 安裝

[1.] 新增 user

        groupadd mailman

        useradd mailman -g mailman -c "Mailing List Manager" -d "/usr/local/mailman" -s /sbin/nologin

 

       (以下是 RPM安裝的 user資訊)

Login: mailman                          Name: GNU Mailing List Manager
Directory: /usr/lib/mailman             Shell: /sbin/nologin
Never logged in.
No mail.
No Plan.

[2.] 編譯

        tar zxvf mailman-xxx.tgz

        cd mailman-xxx

        ./configure –prefix=/usr/local/mailman –with-username=mailman –with-groupname=mailman

        make install

 

        chmod a+rw,g+ws /usr/local/mailman

 

[3.] check權限

        cd /usr/local/mailman

        ./bin/check_perms -f

 

[4.] 設定 apache

        vi /etc/httpd/conf/httpd.conf (這是從 RPM安裝時有樣學樣 copy過來的)

ScriptAlias /mailman/ /usr/local/mailman/cgi-bin/
<Directory /usr/local/mailman/cgi-bin/>
   AllowOverride None
   Options ExecCGI
   Order allow,deny
   Allow from all
</Directory>

Alias /pipermail/ /usr/local/mailman/archives/public/
<Directory /usr/local/mailman/archives/public>
   Options Indexes MultiViews FollowSymLinks
   AllowOverride None
   Order allow,deny
   Allow from all
</Directory>

        cp /usr/local/mailman/icons/* /var/www/icons/

 

        vi /usr/local/mailman/Mailman/mm_cfg.py

IMAGE_LOGOS = '/images/'

        service httpd restart

 

[5.] 設定 postfix

        vi /etc/postfix/main.cf

owner_request_special = no

recipient_delimiter = +

#luser_relay

unknown_local_recipient_reject_code = 550

        vi /usr/local/mailman/Mailman/mm_cfg.py

DEFAULT_URL_HOST   = 'ssorc.tw'
DEFAULT_EMAIL_HOST = 'mail.ssorc.tw'

MTA = 'Postfix'

        確認 /usr/local/mailman/Mailman/Defaults.py

POSTFIX_ALIAS_CMD = '/usr/sbin/postalias'
POSTFIX_MAP_CMD = '/usr/sbin/postmap'

        如果要修正,則編輯 mm_cfg.py,別動到 Defaults.py

 

        初始 aliases檔案

            cd /usr/local/mailman/

            ./bin/genaliases

        在 data/目錄下產生 aliases

        (rpm安裝時會在 /etc/mailman目錄下產生 aliases)
 

        更改權限

            chown mailman.mailman data/aliases*

            chmod g+w data/aliases*

 

        加入 hash:/usr/local/mailman/data/aliases

            vi /etc/postfix/main.cf

alias_maps = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases

alias_database = hash:/etc/aliases, hash:/usr/local/mailman/data/aliases

       postfix reload

 

[6.] 建立 site-wide

        /usr/local/mailman/bin/newlist mailman

Enter the email of the person running the list: [email protected]
Initial mailman password:123456
Hit enter to notify mailman owner…

        它會自動寫入到 /usr/local/mailman/data/aliases

        如果沒有事先 genaliases時,作 newlist會多產生下列訊息,再將從 ## mailman mailing list以下寫入到 aliases

To finish creating your mailing list, you must edit your /etc/aliases (or
equivalent) file by adding the following lines, and possibly running the
`newaliases' program:

## mailman mailing list
mailman:                      "|/usr/lib/mailman/mail/mailman post mailman"
mailman-admin:           "|/usr/lib/mailman/mail/mailman admin mailman"
mailman-bounces:        "|/usr/lib/mailman/mail/mailman bounces mailman"
mailman-confirm:         "|/usr/lib/mailman/mail/mailman confirm mailman"
mailman-join:               "|/usr/lib/mailman/mail/mailman join mailman"
mailman-leave:             "|/usr/lib/mailman/mail/mailman leave mailman"
mailman-owner:           "|/usr/lib/mailman/mail/mailman owner mailman"
mailman-request:          "|/usr/lib/mailman/mail/mailman request mailman"
mailman-subscribe:       "|/usr/lib/mailman/mail/mailman subscribe mailman"
mailman-unsubscribe:   "|/usr/lib/mailman/mail/mailman unsubscribe mailman"

Hit enter to notify mailman owner…

       /usr/local/mailman/bin/genaliases

 

[7.] configure site list

        /usr/local/mailman/bin/config_list -i /usr/local/mailman/data/sitelist.cfg mailman

 

[8.] 排程

        cd /usr/local/mailman/cron

        crontab -u mailman crontab.in

 

[9.] 啟動 mailman

        /usr/local/mailman/bin/mailmanctl start

 

        # 或者

        cp /usr/local/mailman/script/mailman /etc/init.d/

        /etc/init.d/mailman start

 

[10.] site password

            /usr/local/mailman/bin/mmsitepass 123456

 

        list creator password

            /usr/local/mailman/bin/mmsitepass -c 123456

 

[11.] 建立第一個 mailing List

           http://xxx/mailman/create

 

       /usr/local/mailman/bin/genaliases

 

[12.] 查看 List

           http://xxx/mailman/listinfo

        管理

           http://xxx/mailman/admin

 

[13.] 訂閱 Subscribing

           網頁型式

               瀏覽http://xxx/mailman/listinfo/mailman

               輸入你的 email address、name、password,接著點擊 Subscribe

 

           Email型式

              寄到 mailman-join@xxx

              (主旨與內容可忽略不寫)
 

 

           會收到一封確認信 confirm

              http://xxx/mailman/confirm/mailman/06850f3efb892739530b3293210a584fc399d0e9

 

        取消訂閱 unsubscribe

           網頁型式

               瀏覽http://xxx/mailman/listinfo/mailman

               在 Unsubscribe or Edit Options輸入你的 Email address

                 -> Yes, I really want to unsubscribe -> unsubscribe

 

           Email型式

              寄到 mailman-leave@xxx

              (主旨與內容可忽略不寫)

 

           會收到一封已經取消訂閱的信

 

PS: 寄信給 mailman-request@xxx,內容文字為 help

      可得到指令說明   

 

[14.] 張貼 post

           寄信到 mailman@xxx即可

           就可在 Mailman Archives(http://xxx/pipermail/mailman/)看到你 post的訊息

Related posts 相關文章
postfix 怎麼記錄信件主旨於 maillog 中
More...
讓 Plesk 的 Postfix 使用 Domain Key、SPF
More...
postfix 利用 postfwd2 限制寄信數量
More...
Postfix 如何讓某個帳號跑另一個 IP 寄信出去
More...

作者

留言

撰寫回覆或留言

發佈留言必須填寫的電子郵件地址不會公開。