how to troubleshooting config roundcubemail v.0.9
Edit file php.ini and add this line bottom file
#vim /etc/php5/apache2/php.ini
For Err: date.timezone: NOT OK(not set)
----------------------Edit-----------------------------
date.timezone = "Asia/Bangkok"
---------------Adding Bottom line--------
suhosin.session.encrypt = 0
For Err: Intl: NOT AVAILABLE (See http://www.php.net/manual/en/book.intl.php)
Just install intl package
#aptitude install php5-intl
#/etc/init.d/apache2 restart
Monday, March 31, 2014
Wednesday, March 26, 2014
unknown option '$TTL' and unexpected token near end of file
วิธีแก้ไข Err. bind(DNS) ใน Debain
- unknown option '$TTL'
- unexpected token near end of file
คำสั่งตรวจสอบค่าคอนฟิก ที่ Zone file ที่มีปัญหา
1. named-checkconf db.domain.co.th
-----------------------------------
#db.domain.co.th:1: unknown option '$TTL'
#db.domain.co.th:47: unexpected token near end of file
//---------------------------------------
2. named-checkzone domain.co.th /var/named/db.domain.co.th
--------------------------------------
zone domain.co.th/IN: NS 'hostxxx.domain.co.th' has no address records (A or AAAA)
zone domain.co.th/IN: not loaded due to errors.
//--------------------------------------
How to fix BIND does not permit underscores "_" unless you specificy the whole domain name
};
คำสั่งปฏิบัติการ
1. rndc flush
2. rndc reload
3. เข้าไปแก้ไข Serail Number ที่ Zone File นั้นก่อน restart service DNS
4. /etc/init.d/bind9 reload (Restart service DNS)
ตัวอย่าง การแก้ไข
root@sip40:/etc/bind# rndc flush
root@sip40:/etc/bind# rndc reload
server reload successful
root@sip40:/etc/bind# named-checkzone domain.co.th db.domain.co.th
zone domain.co.th/IN: NS 'hqbackup01.domain.co.th' has no address records (A or AAAA) ** แสดงโดเมนที่ไม่สามารถโหลดได้ เราต้องเข้าไปแก้ไขตรวจสอบดูว่า ยังใช้งานอยู่ไหม
zone domain.co.th/IN: not loaded due to errors.
root@sip40:/etc/bind# vim db.domain.co.th ** เข้าไปแก้ไข และปรับค่า Serial ใหม่
root@sip40:/etc/bind# /etc/init.d/bind9 reload
Reloading domain name service...: bind9.
root@sip40:/etc/bind# named-checkzone domain.co.th db.domain.co.th
zone domain.co.th/IN: loaded serial 2014032701
OK
//--------------------------------------------------------------
แล้วกลับไปตรวจสอบอีกครั้ง
1. named-checkconf db.domain.co.th
-----------------------------------
#db.domain.co.th:1: unknown option '$TTL'
#db.domain.co.th:47: unexpected token near end of file
//---------------------------------------
**** ยังเจอ err. อยู่เหมือนเดิม แต่เมื่อลองไป nslookup จากเครื่องอื่น กลับสามารถ solve domain ได้ ถือว่า ok
2. named-checkzone domain.co.th db.domain.co.th
-----------------------------------
zone domain.co.th/IN: loaded serial 2014032701
OK
//--------------------------------
*** ใช้งานได้แล้ว
Reference:
rndc flush & rndc reload
Command Check DNS
- unknown option '$TTL'
- unexpected token near end of file
คำสั่งตรวจสอบค่าคอนฟิก ที่ Zone file ที่มีปัญหา
1. named-checkconf db.domain.co.th
-----------------------------------
#db.domain.co.th:1: unknown option '$TTL'
#db.domain.co.th:47: unexpected token near end of file
//---------------------------------------
2. named-checkzone domain.co.th /var/named/db.domain.co.th
--------------------------------------
zone domain.co.th/IN: NS 'hostxxx.domain.co.th' has no address records (A or AAAA)
zone domain.co.th/IN: not loaded due to errors.
//--------------------------------------
How to fix BIND does not permit underscores "_" unless you specificy the whole domain name
# named-checkzone abc.com. /var/named/abc.com.hosts
/var/named/abc.com.hosts:60: express_www1.abc.com: bad owner name (check-names)
/var/named/abc.com.hosts:61: express_www2.abc.com: bad owner name (check-names)
zone abc.com/IN: loaded serial 2020122401
OK
Add this to the option []
------
vim /etc/named.conf
options {
listen-on port 53 { any; };
listen-on-v6 port 53 { any; };
.
.
check-names master ignore;
check-names slave ignore;
check-names response ignore;
# systemctl restart named
# systemctl status named
# named-checkzone abc.com. /var/named/abc.com.hosts -> recheck if show bad owner name (check-names) but it is OK!
ref:
1. rndc flush
2. rndc reload
3. เข้าไปแก้ไข Serail Number ที่ Zone File นั้นก่อน restart service DNS
4. /etc/init.d/bind9 reload (Restart service DNS)
ตัวอย่าง การแก้ไข
root@sip40:/etc/bind# rndc flush
root@sip40:/etc/bind# rndc reload
server reload successful
root@sip40:/etc/bind# named-checkzone domain.co.th db.domain.co.th
zone domain.co.th/IN: NS 'hqbackup01.domain.co.th' has no address records (A or AAAA) ** แสดงโดเมนที่ไม่สามารถโหลดได้ เราต้องเข้าไปแก้ไขตรวจสอบดูว่า ยังใช้งานอยู่ไหม
zone domain.co.th/IN: not loaded due to errors.
root@sip40:/etc/bind# vim db.domain.co.th ** เข้าไปแก้ไข และปรับค่า Serial ใหม่
root@sip40:/etc/bind# /etc/init.d/bind9 reload
Reloading domain name service...: bind9.
root@sip40:/etc/bind# named-checkzone domain.co.th db.domain.co.th
zone domain.co.th/IN: loaded serial 2014032701
OK
//--------------------------------------------------------------
แล้วกลับไปตรวจสอบอีกครั้ง
1. named-checkconf db.domain.co.th
-----------------------------------
#db.domain.co.th:1: unknown option '$TTL'
#db.domain.co.th:47: unexpected token near end of file
//---------------------------------------
**** ยังเจอ err. อยู่เหมือนเดิม แต่เมื่อลองไป nslookup จากเครื่องอื่น กลับสามารถ solve domain ได้ ถือว่า ok
2. named-checkzone domain.co.th db.domain.co.th
-----------------------------------
zone domain.co.th/IN: loaded serial 2014032701
OK
//--------------------------------
*** ใช้งานได้แล้ว
Reference:
rndc flush & rndc reload
Command Check DNS
Monday, March 24, 2014
Friday, March 21, 2014
Script Convert Ms outlook.psd to Thunderbird
to convert read link below
Convert
http://www.howtoforge.com/convert_outlook_pst_files_to_thunderbird_and_evolution_on_linux
Convert
http://www.howtoforge.com/convert_outlook_pst_files_to_thunderbird_and_evolution_on_linux
Tuesday, March 18, 2014
zimbra whitelist
Add zimbra whitelist
Reference: wiki.zimbra.com
PLEASE NOTE:
WHITELISTING SPECIFIC IP ADDRESS & HOSTNAME CAN INCREASE SPAM EMAILS IN CASE OF THE CLIENT MACHINE (IP) THAT YOU WHITELIST IS INFECTED BY VIRUS, ALSO IF THE WHITELISTED IP/HOSTNAME IS ALREADY BLACKLISTED, THEN BLACKLIST RULES WILL BE CONSIDERED FIRST.
Workaround1: whitelist specific user/complete domain
Edit the Spamassassin config file "/opt/zimbra/conf/salocal.cf.in" add below lines to the end of the file to whitelist a complete domain or specific user.
Example:
Note: All 3 workarounds will not survive upgrades, will have to take backup of above changes and redo the same changes after the upgrade.
Reference: wiki.zimbra.com
PLEASE NOTE:
WHITELISTING SPECIFIC IP ADDRESS & HOSTNAME CAN INCREASE SPAM EMAILS IN CASE OF THE CLIENT MACHINE (IP) THAT YOU WHITELIST IS INFECTED BY VIRUS, ALSO IF THE WHITELISTED IP/HOSTNAME IS ALREADY BLACKLISTED, THEN BLACKLIST RULES WILL BE CONSIDERED FIRST.
Workaround1: whitelist specific user/complete domain
Edit the Spamassassin config file "/opt/zimbra/conf/salocal.cf.in" add below lines to the end of the file to whitelist a complete domain or specific user.
whitelist_from *@domain.com whitelist_from user@domain.comAfter the above changes restart zmmtactl and zmamaviasdctl services and test the issue.
zmmtactl restart && zmamavisdctl restartWorkaround2: Whitelist IP Addresses/Hostnames while using RBL restrictions
Example:
[zimbra@zcs ~]$ vi /opt/zimbra/conf/postfix_rbl_override [zimbra@zcs ~]$ cat /opt/zimbra/conf/postfix_rbl_override -> add IP/hostnames you want to whitelist in this file. 10.137.27.80 OK 10.137.27.88 OK zcs711.us.zimbralab.com OK zcs714.us.zimbralab.com OK [zimbra@zcs ~]$ postmap /opt/zimbra/conf/postfix_rbl_override [zimbra@zcs ~]$ vi /opt/zimbra/conf/postfix_recipient_restrictions.cf [zimbra@zcs ~]$ cat /opt/zimbra/conf/postfix_recipient_restrictions.cf %%contains VAR:zimbraServiceEnabled cbpolicyd, check_policy_service inet:127.0.0.1:10031%% reject_non_fqdn_recipient permit_sasl_authenticated permit_mynetworks reject_unauth_destination check_client_access hash:/opt/zimbra/conf/postfix_rbl_override reject_unlisted_recipient %%contains VAR:zimbraMtaRestriction reject_invalid_hostname%% %%contains VAR:zimbraMtaRestriction reject_non_fqdn_hostname%% %%contains VAR:zimbraMtaRestriction reject_non_fqdn_sender%% %%contains VAR:zimbraMtaRestriction reject_unknown_client%% %%contains VAR:zimbraMtaRestriction reject_unknown_hostname%% %%contains VAR:zimbraMtaRestriction reject_unknown_sender_domain%% %%explode reject_rbl_client VAR:zimbraMtaRestrictionRBLs%% %%contains VAR:zimbraMtaRestriction check_policy_service unixrivate/policy%% permit [zimbra@zcs ~]$ zmmtactl restart Rewriting configuration files...done. postfix/postfix-script: refreshing the Postfix mail system Stopping saslauthd...done. Starting saslauthd...done. [zimbra@zcs ~]$Workaround3: Whitelist Hostname/IP addresses without restarting any services
[[root@v01 ~]# mkdir /etc/zimbra_custom --> create a directory inside /etc [root@v01 ~]# chown zimbra:zimbra /etc/zimbra_custom --> change user and group ownership to zimbra [root@v01 ~]# ls -ld /etc/zimbra_custom/ drwxr-xr-x 2 zimbra zimbra 4096 Jan 26 18:23 /etc/zimbra_custom/ [root@v01 ~]# su - zimbra --> switch to zimbra [zimbra@v01 ~]$ touch /etc/zimbra_custom/test_whitelist --> create a file [zimbra@v01 ~]$ nano /etc/zimbra_custom/test_whitelist --> ad list of domains or specific user that you want to whitelist [zimbra@v01 ~]$ cat /etc/zimbra_custom/test_whitelist v01.vinay.com OK 10.112.233.180 OK [zimbra@v01 ~]$ /opt/zimbra/postfix/sbin/postmap /etc/zimbra_custom/test_whitelist --> create a hash file using zimbra postmap [zimbra@v01 ~]$ ls -l /etc/zimbra_custom/ total 12 -rw-r----- 1 zimbra zimbra 18 Jan 26 18:24 test_whitelist -rw-r----- 1 zimbra zimbra 12288 Jan 26 18:24 test_whitelist.db --> .db file will be created [zimbra@v01 ~]$ [zimbra@v01 ~]$ postconf |grep smtpd_recipient_restrictions --> check the current recipient restrictions smtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, reject_invalid_helo_hostname, reject_non_fqdn_sender, permit [zimbra@v01 ~]$ postconf -e smtpd_recipient_restrictions="reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, check_sender_access hash:/etc/zimbra_custom/test_whitelist, reject_invalid_helo_hostname, reject_non_fqdn_sender, permit" --> add the hash file to current recipient restrictions [zimbra@v01 ~]$ postconf |grep smtpd_recipient_restrictionssmtpd_recipient_restrictions = reject_non_fqdn_recipient, permit_sasl_authenticated, permit_mynetworks, reject_unauth_destination, reject_unlisted_recipient, check_sender_access hash:/etc/zimbra_custom/test_whitelist, reject_invalid_helo_hostname, reject_non_fqdn_sender, permit [zimbra@v01 ~]$
Note: All 3 workarounds will not survive upgrades, will have to take backup of above changes and redo the same changes after the upgrade.
Monday, March 10, 2014
Check Download/Upload Internet on Ubuntu
เป็นโปรแกรมไว้ใช้ตรวจสอบมีการใช้งาน Internet / Network ไปเท่าไร ด้วยโปรแกรมเล็ก ๆ ต่อไปนี้
1.
5. nload Install
Ref: askubuntu.com
1.
iftop
2.
tcptrack
3.
slurm
4.
bmon -shows
5. nload Install
Ref: askubuntu.com
Subscribe to:
Posts (Atom)