Please take a look at this.
:: Installing Postfix v35 over Port
[ root ]# cd /usr/ports/mail/postfix25/Durring installation, you will asking to add user and group for Postfix service, answer this question with yes [ y ].
[ root ]# make install clean
[ root ]# rehash
:: Configuring Postfix
+ Configure main Postfix configuration file (main.cf)
[ root ]# vi /usr/local/etc/postfix/main.cf
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox = Mailbox
myhostname = mail.freebsd.org
mydomain = freebsd.org
myorigin = $mydomain
inet_interfaces = all
#
# this just example..
# you can change the options whatever you want..
#
####
+ Configure Postfix to automatically running on boot up
[ root ]# vi /etc/rc.conf
#
# Add this options:
#
postfix_enable="YES"
sendmail_enable="NO"
sendmail_submit_enable="NO"
sendmail_outbound_enable="NO"
sendmail_msp_queue_enable="NO"
+ Disable Sendmail specific daily maintenance routines
[ root ]# vi /etc/periodic.conf
#
# Add this options:
#
daily_clean_hoststat_enable="NO"
daily_status_mail_rejects_enable="NO"
daily_status_include_submit_mailq="NO"
daily_submit_queuerun="NO"
+ Make new aliases.db for Postfix
[ root ]# rm /etc/aliases.db
[ root ]# newaliases
/etc/mail/aliases: 27 aliases, longest 10 bytes, 275 bytes total
[ root ]# cp /etc/mail/aliases.db /etc/
:: Starting Postfix service
[ root ]# killall sendmail
[ root ]# /usr/local/etc/rc.d/postfix start
:: Testink
+ Sending email
[ root ]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
220 mail.freebsd.org ESMTP Postfix
mail from:andi@freebsd.org
250 2.1.0 Ok
rcpt to: free@freebsd.org
250 2.1.5 Ok
data
354 End data with.
hi there..
.
250 2.0.0 Ok: queued as 198B7344A4
quit
221 2.0.0 Bye
Connection closed by foreign host.
+ Receiving mail
[ root ]# less /usr/home/free/Mailbox
From andi@freebsd.org Mon Oct 12 22:19:14 2009
Return-Path:
X-Original-To: free@freebsd.org
Delivered-To: free@freebsd.org
Received: from localhost (localhost [127.0.0.1])
by mail.freebsd.org (Postfix) with SMTP id 198B7344A4
for; Mon, 12 Oct 2009 22:18:56 +0700 (WIT)
Message-Id: <20091012151905.198b7344a4@mail.freebsd.org>
Date: Mon, 12 Oct 2009 22:18:56 +0700 (WIT)
From: andi@freebsd.org
To: undisclosed-recipients:;
hi there..
:: Links
+ GoogleBSD
+ Postfix



0 komentar:
Post a Comment