แสดงกระทู้

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - golfreeze

Pages: 1 ... 139 140 [141] 142 143 ... 146
2101
## ถ้าเราส่งเมลแล้วขึ้น error "temporary failure. Command output: /usr/bin/maildrop: Unable
to create a dot-lock at example.com/xxx/6994.0.pop01."

##ถ้าเราใช้ maildrop ใน postfix ด้วยให้ config ที่ไฟล์ดังนี้

#vi /etc/maildroprc

############# Begin #############

MAILDIR=$HOME/$DEFAULT
`test -d "$MAILDIR"` # check if dir exist
if ($RETURNCODE != 0)
{
`mkdir -p $MAILDIR` # create dirs with parents
`rmdir $MAILDIR` # remove dir for init
`/usr/bin/maildirmake $MAILDIR` # create maildir
}

############ Finish ##############

#/etc/init.d/postfix restart

แล้วลองส่งอีกรอบ ครับ

2102
ถ้า ตอน test login ส่งเมล แล้วเกิดปัญหาตาม log แบบนี้

Nov 10 16:45:59 pop00 postfix/pipe[17855]: 025CD4C805E: to=<golf@example.com>;, relay=maildrop,
delay=11, delays=11/0/0/0.04, dsn=5.1.1, status=bounced (user unknown. Command output: ERR:
authdaemon: s_connect() failed: Permission denied Invalid user specified. )

แก้ไขโดย

chmod 755 /var/run/courier/authdaemon
แล้ว restart postfix 1 รอบครับ ก็สามารถ create account แล้วก็สร้าง
mailbox ให้ละ

2103
วันนี้ ได้ลองลงตัว phamm กับ postfix + postfix-ldap ครับ

ตอน testing

#telnet localhost 25

ถ้าตามดู log จะมีปัญหาดังนี้ คือ

Nov 10 09:38:20 pop00 postfix/trivial-rewrite[14838]: warning: dict_ldap_lookup: vacationforward:
Search base 'o=mail,dc=xxx,dc=com' not found: 32: No such object
Nov 10 09:38:20 pop00 postfix/trivial-rewrite[14838]: fatal: ldap:vacationforward(0,lock|fold_fix):
table lookup problem
Nov 10 09:38:21 pop00 postfix/master[14527]: warning: process /usr/lib/postfix/trivial-rewrite pid
14838 exit status 1
Nov 10 09:38:22 pop00 postfix/trivial-rewrite[14839]: warning: dict_ldap_lookup: vacationforward:
Search base 'o=mail,dc=xxx,dc=com' not found: 32: No such object
Nov 10 09:38:22 pop00 postfix/trivial-rewrite[14839]: fatal: ldap:vacationforward(0,lock|fold_fix):
table lookup problem
Nov 10 09:38:23 pop00 postfix/master[14527]: warning: process /usr/lib/postfix/trivial-rewrite pid
14839 exit status 1
Nov 10 09:38:23 pop00 postfix/smtpd[14836]: warning: problem talking to service rewrite: Success
Nov 10 09:38:23 pop00 postfix/master[14527]: warning: /usr/lib/postfix/trivial-rewrite: bad command
startup -- throttling

แสดงว่า user ที่กำหนดใน config ของ main.cf ไม่สามารถ query ข้อมูลได้

##LDAP Connector
ldap_bind_dn = cn=phamm,o=mail,dc=xxx,dc=com
ldap_bind_pw = xxx

cn=phamm,o=mail,dc=xxx,dc=com ไม่สามารถเรียกได้

เปลี่ยนเป็น user admin ที่สามารถใช้งานเรียก query ได้

##LDAP Connector
ldap_bind_dn = cn=admin,dc=xxx,dc=com
ldap_bind_pw = xxx

เมื่อลอง telnet อีกรอบก็สามารถ ส่งเมลได้ครับผม

2104
* For OpenLDAP backend:

# cd /path/to/iRedMail-x.y.z/tools/
# sh create_mail_user_OpenLDAP.sh domain.ltd user01 user02 user03

It will create domain 'domain.ltd' and there new accounts: user01@domain.ltd,
user02@domain.ltd, user03.domain.ltd. The password is there username.

##Doc Iredmail
http://code.google.com/p/iredmail/wiki/Admin_Guide#How_to_set_default_login_domain?

##Doc
http://code.google.com/p/iredmail/wiki/Installation_on_Debian

#postfix ldap
http://www.boobah.info/howto/postfix-ldap.html

#postfix courier
http://www.root-it.fiberworld.nl/vriesman.tk/postfix-courier-ldap-howto.html

2109
all application on unix knowledges by golfreeze / font thai centos on desktop for beginner
« on: มกราคม 23, 2011, 12:57:29 AM »
วิธีติดตั้งฟอนต์ไทยสำหรับ CentOS 5.4

ดาวน์โหลดฟอนต์ไทยมาก่อน

# wget ftp://linux.thai.net/pub/ThaiLinux/software/thai-ttf/thai-ttf-0.4.13.tar.gz

แตกไฟล์ออกก่อน

# tar xvfz thai-ttf-0.4.13.tar.gz

เข้าไปที่โฟลเดอร์

# cd thai-ttf-0.4.13

ล็อคอินเป็นแอดมินก่อน

# su (แล้วใส่รหัสผ่าน)

สร้างโฟลเดอร์สำหรับเก็บฟอนต์

# mkdir /usr/share/fonts/thai-ttf

คัดลอกฟอนต์ไทยทั้งหมดไปเก็บไว้ที่โฟลเดอร์ใหม่

# cp *.* /usr/share/fonts/thai-ttf/

เพิ่มเติ่มบางที่เขาแนะนำให้ทำ เพื่อให้โปรแกรมต่างๆเรียกใช้งานฟอนต์ได้(แต่ผมทำแล้วไม่ได้
แต่จากคำสั่งบางบน ก็เพียงพอแล้ว)

# chkfontpath -add /usr/share/fonts/thai-ttf

หรือ

# chkfontpath -a /usr/share/fonts/thai-ttf

และตามด้วยทำสั่ง

# chkfontpath -l

เสร็จจากคำสั่งทั้งหมดแล้ว ก็สั่งรีบูตระบบเพื่อเริ่มใหม่

# reboot

หรือ

# shutdown -r now

ที่มา : http://www.iblog.in.th/2009/10/27/%E0%B8%95%E0%B8%B4%E0%B8%94%E0%B8%95%E0%B8%B1%E0%B9%89%E0%B8%87%E0%B8%9F%E0%B8%AD%E0%B8%99%E0%B8%95%E0%B9%8C%E0%B9%84%E0%B8%97%E0%B8%A2-centos-5-4/


ปรับขนาด หน้าจอ resolution ใน centos

cp /etc/X11/xorg.conf /etc/X11/backup.xorg.conf
system-config-display --reconfigue --set-resolution=1024x768 --set-depth=16

### เล่น DVD file หนัง โปรแกรม VLC

http://www.cyberciti.biz/faq/rhel-centos-fedora-media-mp3-players-installtion/

2110
all application on unix knowledges by golfreeze / mount ntfs-3g on centos 5.4
« on: มกราคม 23, 2011, 12:56:50 AM »
ปกติ Centos version 5.4

จะลง package fuse มาให้อยู่แล้วครับผม

ก่อนที่เราจะทำการ mount filesystem ที่เป็น ntfs เราก็ลง package เพิ่มดังนี้ ครับ

wget http://marush.com/wp-content/uploads/2009/03/ntfs-3g-200921-el5i686.rpm
rpm -ihv ntfs-3g-200921-el5i686.rpm

wget http://superb-east.dl.sourceforge.net/sourceforge/fuse/fuse-2.6.0.tar.gz
tar xvfz fuse-2.6.0.tar.gz
cd fuse-2.6.0

Execute
./configure
make
make install

Then try
fdisk -l

แค่นี้แล้วก็สั่ง

#mount -t ntfs-3g /dev/sda5 /mnt/sda5
เรียบร้อยครับผม

2111
สำหรับ Mainboard ASUS P5GC-MX/1333 ตัว Lan คือ Atheros น่ะครับ

รุ่นนี้จะให้ Lan on board มาเป็น Attansic L2 100Mbit Ethernet Adapter และมี source driver
ให้เว็บไซต์ผู้ผลิตด้วย ซึ่งดีมากๆ

แต่สำหรับชาว Debian,ubuntu ง่ายกว่านั้นครับ เพราะมีใน apt-get เลย

วันนี้ ผมทดสอบ ลง Debian 4.0 R5 i386 ใน kernel มี driver net atl1 อยู่นะครับ แต่ว่าตัวรุ่นที่มากับ
MB เป็น atl2 ลอง modprobe แล้วได้บ้าง ไม่ได้บ้าง ลอง reboot ก็หลุดไปเลย

ลองติดตั้ง driver atl2 จาก apt-get เลยดีกว่าครับ
- อันดับแรก ตรวจสอบ kernel vesion ก่อนครับ ด้วย uname -a
- package driver คือ atl2-module นะครับ เลือกให้ตรงกับ kernel ของเรา ลอง apt-cache search
atl2-module ดูครับ แล้วสั่ง apt-get install atl2-module-xxxx
- ลอง modprobe atl2
- สั่ง ifconfig ethx ดู (ผมไม่รู้ว่าเครื่องอื่นๆจะเป็น eth ไหนนะครับ ถ้ามีอันเดียวก็ eth0 ครับ)

อ้างอิง http://blog.eulinux.org/2008/05/attansic-l2-100mbit-ethernet-adapter-on.html

2112
command , shell script ,tool , crontab / Re: tcpdump and tshark howto na ja
« on: มกราคม 23, 2011, 12:55:50 AM »
### มี tool อีกตัวครับมาแนะนำ ชื่อ

mtr

เป็นการผสมผสาน ระหว่าง traceroute และ ping ถ้าคุณชอบใช้ traceroute ในการเช๊ค hop ของ link แล้วละก็
น่าจะชอบตัวนี้ ครับ มันสามารถ ping ไปยัง node ที่ traceroute ไปถึงได้อีก

ลองดูน่ะครับ

### BSD
#mtr google.co.th

My traceroute [v0.72]
ns1.packetlove.com (0.0.0.0) Thu Feb 25 10:40:09 2010
Keys: Help Display mode Restart statistics Order of fields quit
Packets Pings
Host Loss% Snt Last Avg Best Wrst StDev
1. 203.146.215.124 0.0% 3 2.0 25.5 2.0 57.0 28.3
2. 210.1.0.164 0.0% 3 2.1 2.2 0.4 3.9 1.7
3. 210.1.3.225 0.0% 3 1.5 2.3 1.5 3.9 1.4
4. 210.1.46.228 0.0% 3 1.6 5.6 1.6 10.0 4.2
5. 202.183.136.134 0.0% 2 10.0 9.9 9.8 10.0 0.2
6. 202.183.136.77 0.0% 2 321.2 195.6 69.9 321.2 177.8
7. 202.183.136.82 0.0% 2 38.5 46.7 38.5 54.9 11.6
8. 202.183.136.98 0.0% 2 36.1 40.5 36.1 44.9 6.2
9. 209.85.243.156 0.0% 2 37.0 39.7 37.0 42.4 3.8
10. 209.85.254.179 0.0% 2 47.6 42.2 36.8 47.6 7.6
11. sin01s01-in-f104.1e100.net 0.0% 2 37.3 41.2 37.3 45.2 5.6


##Tshark for freebsd
command

#tshark -i bce0 -f "host xxx.xxx.xxx.xxx or host yyy.yyy.yyy.yyy " -w file.cap

2113
command , shell script ,tool , crontab / tcpdump and tshark howto na ja
« on: มกราคม 23, 2011, 12:55:32 AM »
วันนี้ ได้ลองใช้ tshark ดูครับ

การทำงานคล้ายๆ tcpdump แต่มีในส่วนของ data และก็ header packet ที่ค่อนข้างละเอียดกว่า tcpdump ครับ

การใช้งานก็คือ เริ่มลงไปก่อน ผมลงกับ debian นะครับ

#apt-get update
#apt-get install tshark

ก็เรียบร้อยครับผม

ต่อมาเริ่ม capture packet ที่มาจาก ip 192.168.33.1 port 25 แล้วก็เก็บไฟล์ ที่ capture ได้ที่ ไฟล์
ไฟล์หนึ่งเพื่อนำไปวิเคราะห์ ผลโดย

#tshark -i eth0 tcp port 25 and host 192.168.33.1 -w /tshark/tshark_19_20100217_03.cap

แต่ถ้าใช้เป็น tcpdump ก็ดูได้จาก command โดยที่จะ filter source ip ที่มาจาก 192.168.33.1 นี้นะครับ
แล้วเก็บไฟล์ไว้ที่ test.cap เพื่อไปวิเคราะห์ต่อไป
#tcpdump src host 192.168.33.1 and port 8080 -w test.cap

หรือต้องการ เก็บเป็นไฟล์ที่สามารถดูเป็นข้อมูลได้เลยก็

#tcpdump src host 192.168.33.1 and port 8080 > test.txt

ในกรณี ต้องออกจาก screen ก่อนนะครับ ไม่งั้นมันจะ print ข้อมูลออกมาเลย

2114
Mail issue , problem , configuration / Re: update clamav in debian and freebsd
« on: มกราคม 23, 2011, 12:55:07 AM »
##update by yum

cd /root
wgethttp://dev.ffpx.org/download/clamav-toaster-0.96.0-1.3.35.src.rpm
yum install rpm-build
yum install bzip2-devel gmp-devel zlib-devel curl-devel libidn-devel
rpmbuild --rebuild --with cnt50 clamav-toaster-0.96.0-1.3.35.src.rpm
mv /usr/src/redhat/RPMS/i386/clamav-toaster-0.96.0-1.3.35.i386.rpm .
rpm -Uhv clamav-toaster-0.96.0-1.3.35.i386.rpm

2115
Mail issue , problem , configuration / update clamav in debian and freebsd
« on: มกราคม 23, 2011, 12:55:00 AM »
ทั้งสอง os ผมจะให้มันอัฟเดทผ่าน source กับ port นะครับเพื่อง่ายและเป็น มาตรฐานของ packetlove.com

##Debian

เพิ่มใน sources.list

#clamav
deb http://volatile.debian.org/debian-volatileetch/volatile main contrib non-free
deb-src http://volatile.debian.org/debian-volatileetch/volatile main contrib non-free

แล้วสั่ง
#apt-get install clamav clamav-daemon clamav-freshclam clamav-base

แค่นี้ มันก็จะทำการ อัฟเดทให้ครับ

ส่วน option ที่ถามให้ตอบว่า update configuration ไปด้วยเลยน่ะครับ

แล้วลองใช้ dpkg -l | grep \"clamav\"

ก็จะได้ version ใหม่มาแล้วครับผม

###Freebsd
สั่งอัฟเดท port ก่อนนะครับ
#portsnap fetch
#portsnap extract

#cd /usr/ports/security/clamav
#make deinstall

#make install clean (เลือก option 5 ตัวบนครับ มี ARC,ARJ,LHA,UNZOO,UNRAR)

#/usr/local/etc/rc.d/clamav-clamd restart

Pages: 1 ... 139 140 [141] 142 143 ... 146