แสดงกระทู้

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 ... 135 136 [137] 138 139 ... 146
2041
pop00:/home/golf/___script___# telnet localhost 110
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
+OK Hello there.
user golfs@example.com
+OK Password required.
pass PASSGU
+OK logged in.
LIST
+OK POP3 clients that break here, they violate STD53.
1 1326
2 467
.
RETR 1
+OK 1326 octets follow.
Return-Path: < postmaster@example.com>;
Delivered-To: golfs@example.com
Received: from ldap00.xx.com (ldap00.th.xx.com [10.17.200.22])
by pop00.xx.com (Postfix) with ESMTP id D4B374C8069
for < golfs@example.com>;; Tue, 10 Nov 2009 17:57:00 +0700 (ICT)
Received: from ldap00.xx.com (localhost [127.0.0.1])
by ldap00.xx.com (Postfix) with ESMTP id F14376DF824
for < golfs@example.com>;; Tue, 10 Nov 2009 17:57:00 +0700 (ICT)
Received: (from www@localhost)
by ldap00.xx.com (8.14.3/8.14.3/Submit) id nAAAv0NL085397;
Tue, 10 Nov 2009 17:57:00 +0700 (ICT)
(envelope-from postmaster@example.com)
Date: Tue, 10 Nov 2009 17:57:00 +0700 (ICT)
X-Authentication-Warning: ldap00.xx.com: www set sender to postmaster@example.com using -f
To: golfs@example.com
Subject: Welcome to xx mail service
Message-ID: < 1257850620883_36a8e9eb903b074f4fa6ca13c8395ab9@116.68.150.233>;
X-Mailer: Phamm
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
From: < postmaster@xx.com>;


Welcome to ddd service!
-----------------------------------------------

Dear users,

Thank you for using ddd service.

Please kindly consider change your password periodically for your security.



.
quit
+OK Bye-bye.

2042
####### Linux ##########
ต้องการที่จะเปลี่ยน ip ผ่าน command ครับ
#####check interface
#mii-tools

#route del default gw 10.x.x.x
#route add default gw 192.x.x.x

หรือต้องการให้ network บางตัว route ออกไปคนละ gateway ก็

#route add -net 10.3.0.0/16 gw 10.3.0.1


##############################

##### FREEBSD #######

ถ้าเป็น default gateway แอดด้วย command นี้
#route add default -gateway 10.x.x.x

แต่ถ้ามี subnet ของวงนั้นๆ ด้วย แอดด้วย command
route delete -net 0.0.0.0
route add -net 0.0.0.0 -gateway 192.x.x.x

#######################

2043
###setting dns load balance by round robin

Balancing Mail

The normal method of handling mail fail-over is using the 'preference' value which is
described in this note. However, using the MX record you can balance mail in two ways.

1. Define multiple MX records with the same priority e.g.

; zone file fragment
IN MX 10 mail.example.com.
IN MX 10 mail1.example.com.
IN MX 10 mail2.example.com.
....
mail IN A 192.168.0.4
mail1 IN A 192.168.0.5
mail2 IN A 192.168.0.6

The name server will deliver the MX records in the order defined by the rrset-order and the
receiving SMTP software will select one based on its algorithm. In some cases the SMTP alogithm may
work against the definition of the rrset-order statement. Current versions of sendmail (8.13.x),
Exim (4.44) and Postfix (2.1 or 2.2) all have definitive references to indicate they randomly select
equal preference servers (Postfix allows control of the behaviour with the smtp_randomize_addresses
parameter) and consequentially may use an address which the rrset-order has carefully tried to
change! qmail, courier-mta and Microsoft (Exchange and IIS SMTP) documentation does not appear to
have definitive references to indicate how they handle this case.
2. The alternate approach is to define multiple A records with the same name and multiple IP
addresses.

; zone file fragment
IN MX 10 mail.example.com.
....
mail IN A 192.168.0.4
IN A 192.168.0.5
IN A 192.168.0.6

In this case the load-balancing effect is under the control of BIND and the rrset-order
record. In order to avoid problems if the receiving mail system does reverse look-up as a spam check
then the PTR records for 192.168.0.4, 192.168.0.5, 192.168.0.6 above must all define to
mail.example.com.

In all the above cases each mail server must be capable of handling and synchronising the load for
all the mail boxes served by the domain, using some appropriate back-end to do this or by defining
all but one server to be a relay or forwarder.

Balancing Other Services

Assuming you want to load share your ftp or web services then you simply define multiple A records
with the same name and different IPs as in the example below.

; zone file fragment

ftp IN A 192.168.0.4
ftp IN A 192.168.0.5
ftp IN A 192.168.0.6
www IN A 192.168.0.7
www IN A 192.168.0.8

; or use this format which gives exactly the same result
ftp IN A 192.168.0.4
IN A 192.168.0.5
IN A 192.168.0.6
www IN A 192.168.0.7
IN A 192.168.0.8

The DNS will deliver all the IP addresses defined, the first IP address in the list will be in a
default round robin (controlled by the rrset-order 'named.conf' statement). The FTP and WEB
servers must all be exact replicas of each other in this scenario.

2044
ปกติการ Implement ระบบพวก mail ครับ function หนึ่งที่ไม่ควรข้ามไปคือการ เทส ban หรือ block เมลที่
spam และ virus วันนี้เลยมาแนะนำข้อความเพื่อเอาไปใช้ เทสครับ

##Virus email for testing
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*

ใส่ข้อความใน message แล้วลองเทสดูได้เลยครับ

##spam email for testing block spam function
XJS*C4JDBQADN1.NSBN3*2IDNEN*GTUBE-STANDARD-ANTI-UBE-TEST-EMAIL*C.34X

ลองนำไปใช้งานดูนะครับ

2045
ถ้าต้องการให้ account ใน example.com ส่งเข้าได้เฉพาะ domain

example.com
hotmail.com

ก็เพิ่มในไฟล์ local_domains เป็น
example.com OK
hotmail.com OK

postmap /etc/postfix/local_domains
/etc/init.d/postfix restart

2046
มีอีกกรณีครับ สมมติว่า ไม่การให้ user บาง คน รับเมลจาก ภายนอกได้

ก็สามารถ config ที่ไฟล์ main.cf ของ postfix ได้ตามนี้นะครับ

###Not allow to receive email from External domain
smtpd_recipient_restrictions =
check_recipient_access hash:/usr/local/etc/postfix/protected_destinations
smtpd_restriction_classes = insiders_only
insiders_only =
check_sender_access hash:/usr/local/etc/postfix/insiders, reject
##############################################

เพิ่มconfig file "insiders" ด้วย domain ที่จะทำการจำกัดสิทธิ์ดังนี้
example.com OK
เพิ่มconfig file "protected_destinations" ด้วย email account
ที่จะทำการจำกัดสิทธิ์ดังนี้
pass@example.com insiders_only

#postmap /usr/local/etc/postfix/insiders

#postmap /usr/local/etc/postfix/protected_destinations

#/usr/local/etc/rc.d/postfix restart

โดยที่ ถ้ามี account ss@hotmail.com คือปลายทางส่งเข้ามาถึง user "pass@example.com ที่อยู่ใน
list ปลายทางจะได้รับ error message ว่า
################################################
This message was created automatically by mail delivery software.

A message that you sent could not be delivered to one or more of its
recipients. This is a permanent error. The following address(es) failed:

pass@example.com
SMTP error from remote mail server after RCPT TO:<pass@example.com>;:
host mx1.example.com [11.111.11.1]: 554 5.7.1 <pass@example.com>;:
Recipient address rejected: Access denied
#########################################

2047
### อ่านเพิ่มเติมได้ที่

http://www.postfix.org/RESTRICTION_CLASS_README.html#external

2048
    โจทย์ ใช้ MTA : Postfix
    OS : Freebsd
    ครับ

    จะ set ให้ บาง user= golf@example.com สามารถส่งเมลออกไป domain ข้างนอกไม่ได้ (Ex.
    golfreeze@hotmail.com , sss@yahoo.com )
    แต่ว่ามีให้ user= golfreeze@example.com ส่งได้ จะต้อง set อย่างไงบ้าง

    ก่อนอื่นต้องทำความเข้าใจก่อนว่า ไฟล์ไหนของ postfix ทำงานอย่างไร ทำงานอะไร

    ในกรณีนี้ เราต้องแก้ไขที่ไฟล์ main.cf ครับ

    เพิ่มในส่วนของ

    ###Allow some user sending email off-site #####
    smtpd_sender_restrictions=check_sender_access hash:/usr/local/etc/postfix/sender_restrictions
    smtpd_restriction_classes = local_only
    local_only =
    check_recipient_access hash:/usr/local/etc/postfix/local_domains, reject
    ##### End of Config ########

    แล้วทำการแอด mail account ที่จะใช้กับ policy check_sender_access นีัครับ

    #vi /usr/local/etc/postfix/sender_restrictions
    golf@example.com local_only

    #postmap /usr/local/etc/postfix/sender_restrictions

    #vi /usr/local/etc/postfix/local_domains
    เพิ่ม domain ที่จะให้บังคับใช้งาน policy นี้
    example.com OK
    #postmap /usr/local/etc/postfix/local_domains

    แล้วทำการ restart postfix 1 รอบ แล้วลองส่งดูครับ

    smtp00# telnet localhost 25
    Trying 127.0.0.1...
    Connected to localhost.
    Escape character is '^]'.
    220 smtp.packetlove.com ESMTP Postfix
    helo e
    250 smtp.packetlove.com
    ehlo e
    250-smtp.packetlove.com
    250-PIPELINING
    250-SIZE 102400000
    250-ETRN
    250-AUTH LOGIN
    250-AUTH=LOGIN
    250-ENHANCEDSTATUSCODES
    250-8BITMIME
    250 DSN
    mail from: golf@example.com
    250 2.1.0 Ok
    rcpt to: golfreeze@hotmail.com
    554 5.7.1 < golf@example.com>;: Sender address rejected: Access denied
    quit
    221 2.0.0 Bye
    Connection closed by foreign host.

    ### ใช้งานได้แล้ว ###

m_golfreeze.gif golfreeze [2009-12-08 15:54:50] mail not show 116.68.146.74

1

Comment : 1

    ### อ่านเพิ่มเติมได้ที่

    http://www.postfix.org/RESTRICTION_CLASS_README.html#external

2050
GStreamer plugins to decode "MP3" files cannot be found

error ที่ขึ้นในโปรแกรม RhythmBox Music Player ใน Centos

เวลา import file พวก mp3 เข้าไปแล้วเล่นไม่ได้ครับ เป็นเพราะขาด package ตัวนี้ครับ

#yum -y install gstreamer-plugins-ugly

แล้วเปิด ปิด โปรแกรม 1 ครั้ง แล้วลอง import file เข้าไปดูครับ
ก็จะได้เล่นได้แล้วคราวนี้

2051
W: There is no public key available for the following key IDs:
4D270D06F42584E6
E: Dynamic MMap ran out of room
E: Error occurred while processing wesnoth-all (NewVersion1)
E: Problem with MergeList
/var/lib/apt/lists/ftp.coe.psu.ac.th_debian_dists_stable_main_binary-i386_Packages
E: The package lists or status file could not be parsed or opened.

แก้โดย :

# gpg --keyserver pgpkeys.mit.edu --recv-key 4D270D06F42584E6

# gpg -a --export 4D270D06F42584E6 | sudo apt-key add -

2052
ถ้าจำเป็น ที่จะต้องระบุ email account จากการรัน crontab ก็ใช้คู่กับ sendmail ดูนะครับ

#crontab -e
55 23 * * * /usr/local/bin/pflogsumm -d today /var/log/maillog | /usr/sbin/sendmail -F
"root@xxx.com"; -f root@xxx.com -s "`uname -n` daily mail stats"
email@ปลายทาง.com

2053
สำหรับสาวก Postfix ครับ

วันนี้มี tools สำหรับเช๊ค email stat traffic มาฝากกันครับ ซึ่งผมได้ลองใช้มาสักพักใหญ่ๆ รู้สึกชอบ
อิอิ

ตัว stat traffic ตัวนี้จะเอา log ของ mail log มาทำการวิเคราะห์นะครับ ซึ่งจะมีปริมาณ การรับ การส่ง
เมลในแต่ละวัน ซึ่งเป็นเมลที่ drop reject หรือ ban ก็ดูได้หมดครับ หรือจะดูเป็น stat ย้อนหลังก็ได้

#freebsd
Packetlove# make search name="pflogsumm"
Port: pflogsumm-1.1.2,1
Path: /usr/ports/mail/pflogsumm
Info: Postfix Log Entry Summarizer
Maint: flo@kasimir.com
B-deps: perl-5.8.9_3
R-deps: p5-Bit-Vector-7.1 p5-Carp-Clan-6.04 p5-Date-Calc-6.3 perl-5.8.9_3
WWW: http://jimsun.LinxNet.com/postfix_contrib.html

install โดย
#cd /usr/ports/mail/pflogsumm
#make install clean

crontab รันโดย
#crontab -e

45 11 * * * /usr/local/bin/pflogsumm -d today /var/log/maillog | /usr/bin/mailx -s "`uname -n` daily mail stats" receiver@email.com

=========================================

##Debian

#apt-get install pflogsumm

แล้วก็รันใน crontab ดังนี้ครับ

#crontab -e
45 11 * * * /usr/sbin/pflogsumm -d today /var/log/mail.log | /usr/bin/mailx -s "`uname -n` daily mail stats" receiver@email.com

โดยที่ receiver@email.com คือ emailปลายทางที่จะให้ระบบgen stat ส่งไปนะครับ

ยังไงก็ลองใช้กันดูนะครับ อิอิ

2054
ไฟล์ที่ต้อง copy คือ

/etc/passwd
/etc/group
/etc/master.passwd

หรือถ้าเลือก user มาก็เลือกมาให้เหมือนกันด้วยน่ะครับ ทั้งสามไฟล์

เสร็จแล้วใช้คำสั่ง

pwd_mkdb -p /etc/master.passwd

เพื่อ rebuilld password .

2055
#on debian
bonnie++ -d /path_check -s 8192 -r 2048 -n 512 -u 0:0

Pages: 1 ... 135 136 [137] 138 139 ... 146