2007. 1. 3. 17:30

cvsup 소스 업데이트와 커널 빌드하기.(STABLE)

cvsup 소스 업데이트와 커널 빌드하기..


cvsup 소스 업데이트 하기.


# cd /usr/ports/net/cvsup && make install


# cvsup -v
CVSup client, non-GUI version
Copyright 1996-2001 John D. Polstra
Software version: SNAP_16_1d
Protocol version: 16.1
Operating system: FreeBSD4
http://www.polstra.com/projects/freeware/CVSup/
Report problems to cvsup-bugs@polstra.com




이제 업그레이드를 해 보자. 4-STABLE로 업그레이드하려면 다음의 명령 하나로 할 수 있다.



# cvsup -g -L2 -h cvsup.kr.FreeBSD.org /usr/share/examples/cvsup/stable-supfile
(# cvsup -g -L2 -h cvsup2.kr.FreeBSD.org /usr/share/examples/cvsup/stable-supfile)



커널(Kernel) 컴파일(Compile)하기   
 글쓴이: 실이아빠 [홈페이지]  글쓴시간: 02/03/18 16:56  읽은수: 1361 
'팁' 이라기에는 너무 초라하군요. 다들 아시겠지만 말입니다.


저는 사운드 카드를 추가 하면서 커널을 컴파일 해 보았습니다.
사운드 카드는 사운드 블러스트의 Vibra 128 (ES1370/ES1371)를 사용했습니다.
또한 FreeBSD Release 4.5를 사용했습니다.


1. 항상 GENERIC Kernel config 파일을 복사해서 사용합니다.
바꾼 내용을 잃어 버렸을 때에는 GNEERIC Kernel config 파일로 복원을 해야 하거든요.


# cd /usr/src/sys/i386/conf
# cp GENERIC MyKernel


2. 새로 추가된 하드웨어가 있으면 MyKernel을 수정합니다.
* 저는 사운드 카드를 인식하기 위해 아래 줄을 추가 했습니다.
device pcm #pcm0 (ES1370/ES1371)


3. 두가지 방법으로 컴파일을 할 수 있습니다.
※ 첫번째 방법
# cd /usr/src/sys/i386/conf
# usr/sbin/config MyKernel
# cd ../../compile/MyKernel
# make clean
# make depend
# make
# make install


※ 두번째 방법
# cd /usr/src
# make buildkernel KERNCONF=MyKernel
# make installkernel KERNCONF=MyKernel


4. 이렇게 하면 root 디렉토리에(/) 에 처음의 커널은 kernel.GENERIC로 백업이 되며,
방금 MyKernel Kernel Configure 파일로 컴파일 된 것이 kernel로 된다.


5. 시스템을 리부팅한다.
# sync
# shutdown -r now (or reboot)

2007. 1. 3. 17:29

시간 자동으로 맞추기

부팅때 마다 시간을 동기화하도록  /etc/rc.conf 파일에 다음과 같이
넣어두고 있으며,
ntpdate_enable="YES"
ntpdate_flags="-s clock.nc.fukuoka-u.ac.jp"
ntpdate_program="ntpdate"


하루에 한번씩 동기화하도록 /etc/crontab 파일에 다음과 같이 넣어두고
있습니다.
7       0       *       *       *       root    ntpdate clock.nc.fukuoka-u.ac.jp


참고로, 시스템으로 들어오는 123번 UDP포트를 필터링하면 동기화가 안될 수
있습니다.

2007. 1. 3. 17:28

Postfix Configuration - Basics

Postfix Configuration - Basics

--------------------------------------------------------------------------------
Up one level | Basic Configuration | UCE Controls | Rate Controls | Resource Controls | Address Manipulation
Introduction
Postfix has several hundred configuration parameters that are controlled via the main.cf file. Fortunately, they have sensible default values. In most cases, you need to configure only two or three parameters before you can use the Postfix mail system:
What domain to use in outbound mail

What domains to receive mail for

What clients to relay mail for
The default values for many other configuration parameters are derived from just these.
The next parameter of interest controls the amount of mail sent to the local postmaster:

What trouble to report to the postmaster
Be sure to set the following correctly if you're behind a proxy or network address translator, and you are running a backup MX host for some other domain:


Proxy/NAT network addresses
By the way, if you change parameters of a running Postfix system, don't forget to issue a postfix reload command.
If you run Postfix on a virtual network interface, or if your machine runs other mailers on virtual interfaces, you'll have to look at the other parameters listed here as well:

My own hostname

My own domain name

My own networks

My own network addresses
What domain to use in outbound mail
The myorigin parameter specifies the domain that appears in mail that is posted on this machine. The default is to use the local machine name, $myhostname, which defaults to the name of the machine. Unless you are running a really small site, you probably want to change that into $mydomain, which defaults to the parent domain of the machine name.
For the sake of consistency between sender and recipient addresses, myorigin also specifies the default domain name that is appended to an unqualified recipient address.


Examples:

myorigin = $myhostname (default)
myorigin = $mydomain (probably desirable)
What domains to receive mail for
The mydestination parameter specifies what domains this machine will deliver locally, instead of forwarding to another machine. The default is to receive mail for the machine itself.
You can specify zero or more domain names, /file/name patterns and/or type:name lookup tables, separated by whitespace and/or commas. A /file/name is replaced by its contents; type:name requests that a table lookup is done.

If your machine is a mail server for its entire domain, you must list $mydomain as well.


Examples:

Default setting:
mydestination = $myhostname localhost.$mydomain

Domain-wide mail server:
mydestination = $myhostname localhost.$mydomain $mydomain

Host with multiple DNS A records:
mydestination = $myhostname localhost.$mydomain www.$mydomain ftp.$mydomain
Caution: in order to avoid mail delivery loops, you must list all hostnames of the machine, including $myhostname, and localhost.$mydomain.

What clients to relay mail for
By default, Postfix will relay mail for clients in authorized networks.
Authorized client networks are defined by the mynetworks parameter. The default is to authorize all clients in the IP subnetworks that the local machine is attached to.

What trouble to report to the postmaster
You should set up a postmaster alias that points to a human person. This alias is required to exist, so that people can report mail delivery problems.
The Postfix system itself also reports problems to the postmaster alias. You may not be interested in all types of trouble reports, so this reporting mechanism is configurable. The default is to report only serious problems (resource, software) to postmaster:


Default:
notify_classes = resource, software

The meaning of the classes is as follows:

bounce
Send postmaster copies of undeliverable mail. If mail is undeliverable, a so-called single bounce message is sent, with a copy of the message that was not delivered. For privacy reasons, the postmaster copy of a single bounce message is truncated after the original message headers. If a single bounce message is undeliverable, the postmaster receives a double bounce message with a copy of the entire single bounce message. See also the luser_relay feature.

2bounce
Send double bounces to the postmaster.

delay
Inform the postmaster of delayed mail. In this case, the postmaster receives message headers only.

policy
Inform the postmaster of client requests that were rejected because of (UCE) policy restrictions. The postmaster receives a transcript of the entire SMTP session.

protocol
Inform the postmaster of protocol errors (client or server side) or attempts by a client to execute unimplemented commands. The postmaster receives a transcript of the entire SMTP session.

resource
Inform the postmaster of mail not delivered due to resource problems (for example, queue file write errors).

software
Inform the postmaster of mail not delivered due to software problems.
Proxy/NAT network addresses
The proxy_interfaces parameter specifies all network addresses that the Postfix receives mail on by way of a proxy or network address translation unit. You may specify symbolic hostnames instead of network addresses.
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.


Examples:

Default:
proxy_interfaces =

Host running backup MTA:
proxy_interfaces = 1.2.3.4 (the proxy/NAT network address)
My own hostname
The myhostname parameter describes the fully-qualified domain name of the machine running the Postfix system. $myhostname appears as the default value in many other Postfix configuration parameters.
By default, myhostname is set to the local machine name. If your machine name is not in fully-qualified domain name form, or if you run Postfix on a virtual interface, you will have to specify the fully-qualified domain name that the mail system should use.

Examples:

myhostname = host.local.domain (local hostname is not FQDN)
myhostname = host.virtual.domain (virtual interface)
myhostname = virtual.domain (virtual interface)
My own domain name
The mydomain parameter specifies the parent domain of $myhostname. By default it is derived from $myhostname by stripping off the first part (unless the result would be a top-level domain).
Examples:

mydomain = local.domain
mydomain = virtual.domain (virtual interface)
My own networks
The mynetworks parameter lists all networks that this machine somehow trusts. This information can be used by the anti-UCE features to recognize trusted SMTP clients that are allowed to relay mail through Postfix.
You can specify the list of trusted networks in the main.cf file, or you can let Postfix deduce the list for you. The default is to let Postfix do the work for you.


Default:
mynetworks_style = subnet

The meaning of the styles is as follows:

class
Trust SMTP clients in the class A/B/C networks that Postfix is connected to. 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.

subnet (default)
Trust SMTP clients in the IP subnetworks that Postfix is connected to.

host
Trust only the local machine.
Alternatively, you can specify the mynetworks list by hand, in which case Postfix ignores the mynetworks_style setting. To specify the list of trusted networks by hand, specify network blocks in CIDR (network/mask) notation, for example:


mynetworks = 168.100.189.0/28, 127.0.0.0/8
You can also specify the absolute pathname of a pattern file instead of listing the patterns in the main.cf file.

My own network addresses
The inet_interfaces parameter specifies all network interface addresses that the Postfix system should listen on; mail addressed to user@[network address] will be delivered locally, as if it is addressed to a domain listed in $mydestination.
The default is to listen on all active interfaces. If you run mailers on virtual interfaces, you will have to specify what interfaces to listen on.

You even have to specify explicit machine interfaces for the non-virtual mailer that receives mail for the machine itself: the non-virtual mailer should never listen on the virtual interfaces or you would have a mailer loop.

Examples:

Default:
inet_interfaces = all

Host running virtual mailers:
inet_interfaces = virtual.host.tld (virtual domain)
inet_interfaces = $myhostname localhost.$mydomain (non-virtual mailer)
Note: you need to stop and start Postfix when this parameter changes.


--------------------------------------------------------------------------------
Up one level | Basic Configuration | UCE Controls | Rate Controls | Resource Controls | Address Manipulation
2007. 1. 3. 17:27

PocketBSD/hpcmips 초심자 코스 ( Postfix )

Sendmail 에 대신하는 것으로서 개발되지 FreeBSD.ORG 등으로도 운용되고 있자
시큐어로 관리자 프렌들리인 MTA (다운 것)입니다^^..
--------------------------------------------------------------------------------
[ 인스톨 ]
표준 장비입니다 ^^ .



--------------------------------------------------------------------------------
[ /etc/postfix/main.cf 의 편집 ]
우선 내부용으로서 최저한의 설정을 해 보았습니다.


queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/libexec/postfix
mail_owner = postfix
local_destination_concurrency_limit = 2
default_destination_concurrency_limit = 10
debug_peer_level = 2
debugger_command =
PATH=/usr/bin:/usr/X11R6/bin
xxgdb $daemon_directory/$process_name $process_id & sleep 5

myorigin = $mydomain
mydomain = wa-ve.net
mydestination = $myhostname, localhost.$mydomain, $mydomain
relayhost = mail.wa-ve.net



--------------------------------------------------------------------------------
[ 기동 ]
# postfix start

warning 가 몇개인가 나옵니다만, 첫회 뿐이므로 신경쓰지 없어 좋은 같습니다.
(directory 가 만들어지자.)


postfix-script: warning: creating missing Postfix maildrop directory
postfix-script: warning: creating missing Postfix pid directory
postfix-script: warning: creating missing Postfix incoming directory
postfix-script: warning: creating missing Postfix active directory
postfix-script: warning: creating missing Postfix bounce directory
postfix-script: warning: creating missing Postfix defer directory
postfix-script: warning: creating missing Postfix deferred directory
postfix-script: warning: creating missing Postfix saved directory
postfix-script: warning: creating missing Postfix corrupt directory
postfix-script: warning: creating missing Postfix public directory
postfix-script: warning: creating missing Postfix private directory
postfix-script: starting the Postfix mail system


--------------------------------------------------------------------------------
[ 동작 확인 ]
이하의 프로세스가 동작하고 있으면 OK 입니다.

360 ?? Is 0:00.27 /usr/libexec/postfix/master
361 ?? I 0:00.22 pickup -l -t fifo
362 ?? I 0:00.26 qmgr -l -t fifo -u



--------------------------------------------------------------------------------
[프로세스의 정지]
# postfix stop
2007. 1. 3. 17:27

FreeBSD + OpenWebmail - 또다른 설치 방법

FreeBSD + OpenWebmail - 또다른 설치 방법

Apache web server with cgi enabled
Perl 5.005 or above

CGI.pm-2.74.tar.gz (required)
MIME-Base64-2.12.tar.gz (required)
libnet-1.0901.tar.gz (required)
Text-Iconv-1.2.tar.gz (required)
libiconv-1.8.tar.gz (required if system doesn't support iconv)

CGI-SpeedyCGI-2.21.tar.gz (optional)
Compress-Zlib-1.21.tar.gz (optional)
ispell-3.1.20.tar.gz (optional)
Quota-1.4.6.tar.gz (optional)
Authen-PAM-0.12.tar.gz (optional)
ImageMagick-5.5.3.tar.gz (optional)

여기서 아파치는 CGI를 사용할수 있게 설정되 있어야한다.
ports에서 설치했다면 이미 사용할수 있게 되어있다.

http://openwebmail.com/openwebmail/download/packages/
필요한 페키지를 위의 사이트에서 다운로드 한다.


For CGI.pm do the following:

cd /tmp
tar -zxvf CGI.pm-2.74.tar.gz
cd CGI.pm-2.74
perl Makefile.PL
make
make install

ps: It is reported that Open Webmail will hang in attachment uploading
when used with older version of CGI module. We recommend using CGI
version 2.74 or above for Open WebMail.
To check the version of your CGI module :

perl -MCGI -e 'print $CGI::VERSION'


For MIME-Base64 do the following:

cd /tmp
tar -zxvf MIME-Base64-2.12.tar.gz
cd MIME-Base64-2.12
perl Makefile.PL
make
make install

ps: Though you may already have the MIME-Base64 perl module,
we recommended you install MIME-Base64 module from source.
This would enable the XS support in this module which greatly
improves the encoding/decoding speed of MIME attachment.


For libnet do the following:

cd /tmp
tar -zxvf libnet-1.0901.tar.gz
cd libnet-1.0901
perl Makefile.PL (ans 'no' if asked to update configuration)
make
make install


For Text-Iconv-1.2 do the following:

Since Text-Iconv-1.2 is actually a perl interface to the underlying iconv()
support, you have to check if iconv() support is available in your system.
Please type the following command

man iconv

If there is no manual page for iconv, your system may not support iconv().
Don't worry, you can have the iconv() support by installing libiconv package.

cd /tmp
tar -zxvf libiconv-1.8.tar.gz
cd libiconv-1.8
./configure
make
make install

Type 'man iconv' again to make sure the libiconv is successfully installed.
Then we start to install the Text-Iconv package

cd /tmp
tar -zxvf Text-Iconv-1.2.tar.gz
cd Text-Iconv-1.2
perl Makefile.PL

ps: if your system is FreeBSD, or you just installed libiconv manually,
please edit the Makefile.PL and change the LIBS and INC lines
to the following before doing 'perl Makefile.PL'

'LIBS' => ['-L/usr/local/lib -liconv'], # e.g., '-lm'
'INC' => '-I/usr/local/include', # e.g., '-I/usr/include/other'

make
make test

ps: If the 'make test' failed, it means you set wrong value for LIBS and
INC in Makefile.PL or your iconv support is not complete.
You may copy the uty/iconv.pl.fake to iconv.pl to make openwebmail work
without iconv support.

make install


INSTALL OPENWEBMAIL
-------------------
The latest released or current version is available at
http://openwebmail.com/openwebmail/

If you are using FreeBSD and install apache with pkg_add,
then just

1. chmod 4555 /usr/bin/suidperl

2. cd /usr/local/www
tar -zxvBpf openwebmail-X.XX.tgz

3. modify /usr/local/www/cgi-bin/openwebmail/etc/openwebmail.conf for your need.

4. execute /usr/local/www/cgi-bin/openwebmail/openwebmail-tool.pl --init


ps: If you are using RedHat 7.x (or most Linux) with Apache

1. cd /var/www
tar -zxvBpf openwebmail-X.XX.tgz
mv data/openwebmail html/
rmdir data

2. cd /var/www/cgi-bin/openwebmail
modify auth_unix.pl
a. set variable $unix_passwdfile_encrypted to '/etc/shadow'
b set variable $unix_passwdmkdb to 'none'

3. modify /var/www/cgi-bin/openwebmail/etc/openwebmail.conf
a. set mailspooldir to '/var/spool/mail'
b. set ow_htmldir to '/var/www/html/openwebmail'
set ow_cgidir to '/var/www/cgi-bin/openwebmail'
c. set spellcheck to '/usr/bin/ispell'
d. change default_signature for your need
e. other changes you want

4. add
/var/log/openwebmail.log {
postrotate
/usr/bin/killall -HUP syslogd
endscript
}
to /etc/logrotate.d/syslog to enable logrotate on openwebmail.log

5. execute /var/www/cgi-bin/openwebmail/openwebmail-tool.pl --init

If you are using RedHat 6.2, please use /home/httpd instead of /var/www
ps: It is highly recommended to read the doc/RedHat-README.txt(contributed by
elitric.AT.yahoo.com) if you are installing Open WebMail on RedHat Linux.

ps: Thomas Chung (tchung.AT.openwebmail.org) maintains the rpm for all
released and current version of openwebmail, It is available at
http://openwebmail.com/openwebmail/download/redhat/rpm/
You can get openwebmail working in 5 minutes with this :)

If you are using other UNIX with apache, that is okay

Try to find the parent directory of both your data and cgi-bin directory,
eg: /usr/local/apache/share, then

1. cd /usr/local/apache/share
tar -zxvBpf openwebmail-X.XX.tgz
mv data/openwebmail htdocs/
rmdir data

2. modify /usr/local/apache/share/cgi-bin/openwebmail/etc/openwebmail.conf
a. set mailspooldir to where your system mail spool is
b. set ow_htmldir to '/usr/local/apache/share/htdocs'
set ow_cgidir to '/usr/local/apache/share/cgi-bin'
c. set spellcheck to '/usr/local/bin/ispell'
d. change default_signature for your need
e. other changes you want

3. cd /usr/local/apache/share/cgi-bin/openwebmail

modify openwebmail*.pl
change the #!/usr/bin/suidperl to the location where your suidperl is.

modify auth_unix.pl
a. set variable $unix_passwdfile_encrypted to '/etc/shadow'
b set variable $unix_passwdmkdb to 'none'

4. execute /usr/local/apache/share/cgi-bin/openwebmail/openwebmail-tool.pl --init

ps:If you are installing Open WebMail on Solaris, please put
'the path of your openwebmail cgi directory' in the first line of
file /etc/openwebmail_path.conf.

For example, if the script is located at

/usr/local/apache/share/cgi-bin/openwebmail/openwebmail.pl,

then the content of /etc/openwebmail_path.conf should be:

/usr/local/apache/share/cgi-bin/openwebmail

ps: If you are using Apache server 2.0 or later,
please edit your Apache Configuration file, replace

AddDefaultCharset ISO-8859-1

with

AddDefaultCharset off

여기서 지시하는데로 모두 설치한다.

여기 설정파일은 openwebmail.conf 파일이다.
별다른 내용은 없다. 처음 한글에서 문제가 생겼지만
다른 파일들과 비교한 결과 첫번째 라인에 오타인지 O 문자가 있어서 뺀거 밖엔 없다.
그리고 auth_module은 유닉스 페스워드를 그냥 사용하고 있다.ㅡㅡ
그리고 참고로 SpeedyCGI는 포트에서 p5-CGI-SpeedyCGI-2.21_3를 설치 하여 사용하였으나... 에러가 많아서 그냥 사용한다.


domainnames yerim.info
auth_module auth_unix.pl
mailspooldir /var/mail
dbm_ext .db
dbmopen_ext none
dbmopen_haslock no
ow_cgidir /usr/local/www/cgi-bin/openwebmail
ow_cgiurl /cgi-bin/openwebmail
ow_htmldir /usr/local/www/data/openwebmail
ow_htmlurl /openwebmail
logfile /var/log/openwebmail.log
spellcheck /usr/local/bin/ispell
smtpserver 127.0.0.1
default_language 'xy'


--
Open WebMail Project ( http://openwebmail.org)