การสร้าง Linux Virtual Machine บน Azure Learn how to create a Linux Virtual Machine and connect and manage it with SSH. เรียนรู้เพิ่มเติม https://channel9.msdn.com/Blogs/Azure/Create-a-Linux-Virtual-Machine
ดึงรายชื่อ email เพื่อนำมาใช้งาน วิธีแก้ปัญหาทีม TSส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSวิธีการ Export รายชื่อ email จาก Mailman ให้ใช้คำสั่ง /usr/local/cpanel/3rdparty/mailman/bin/list_members #cd /usr/local/cpanel/3rdparty/mailman/lists/ ทดสอบ ls ดูว่ามี mailling list อะไรอยู่บ้าง #ls bookers_swisslodge.com kanchana_m3_lertlah.com press_of_gallery_a_thepikturegallery.com booker_swisslodge.com kanchananus_lertlah.com press_of_gallery_b_thepikturegallery.com branch_scblu.com sale_prowarrant.co.th ในที่นี้เราต้องการ export (ไปเป็น textfile) โดยต้องการเฉพาะ booker_swisslodge.com bookers_swisslodge.com และ business_swisslodge.com เท่านั้น โดยใช้คำสั่งดังต่อไปนี้ /usr/local/cpanel/3rdparty/mailman/bin/list_members {List Name} > /home/{user}/public_html/{filenaname.txt} #/usr/local/cpanel/3rdparty/mailman/bin/list_members booker_swisslodge.com > booker.txt #/usr/local/cpanel/3rdparty/mailman/bin/list_members bookers_swisslodge.com > bookers.txt #/usr/local/cpanel/3rdparty/mailman/bin/list_members business_swisslodge.com > business.txt จากนั้น move ไฟล์ไปไว้ที่ root public_html เพื่อที่จะให้เราหรือลูกค้าสามารถ Download ได้อย่างสะดวก #mv booker.txt bookers.txt business.txt /home/swisslod/public_html/ จากนั้นจึง email แจ้ง Link URL สำหรับดาวน์โหลดไปให้ลูกค้า เช่น http://swisslodge.com/booker.txt http://swisslodge.com/bookers.txt http://swisslodge.com/business.txt การตั้งค่าทำงานอัตโนมัติ /root/script/mailManTasks.pl เป็นโปรแกรมอัตโนมัติที่ใช้ดึงรายชื่อ email มาให้ สามารถตั้งค่าได้ที่ไฟล์ /root/script/localConfig/__SERVER_NAME__/mailmanTasksConfig.pl ให้ดูตัวอย่างได้ที่ /root/script/localConfig/mailmanTasksConfig.pl.dist ความถี่ในการ run จะอยู่ที่การตั้ง cron บน เครื่อง server ปกติจะให้ run ทุก 4 ชั่วโมง root@horadee [/usr/local/cpanel/3rdparty/mailman/bin]# crontab -l | grep mailManTasks.pl 30 */4 * * * perl /root/script/mailManTasks.pl >/dev/null #################################################
ลดปัญหา server overload ครับ วิธีแก้ปัญหาทีม TSส่งให้ lv2 ครับ วิธีแก้ปัญหาทีม SYSNOC หรือ ITS1. In /usr/local/cpanel/3rdparty/mailman/Mailman/mm_cfg.py (มีการ reset ใน myupcp ด้วย จะต้องทำการ chattr ไว้ด้วย) add or modify: #use an external SMTP server DELIVERY_MODULE = 'SMTPDirect' SMTPHOST = 'vps.thaile.com' #If the external server uses a different port than the default, also: SMTPPORT = 25 2. ที่ remote server (SMTPHOST) เพิ่ม IP server ต้นทางไว้ใน /etc/alwaysrelay 3. ให้ทำการเปิด port 25 ทั้ง in ,out ทั้งสองเครื่องครับ 4. ทำการ lock file mm_cfg.py วิธีข้างต้นทำชั่วคราว อนาคตควรทำ SMTP authentication ให้ด้วย If this is required, you create Mailman/Handlers/ASMTPDirect.py by patching Mailman/Handlers/SMTPDirect.py with the patch below and you put the following in mm_cfg.py SMTP_AUTH = Yes SMTP_USERNAME = 'username' SMTP_PASSWORD = 'password' DELIVERY_MODULE = 'ASMTPDirect' ------------------------------------------------------------------ --- SMTPDirect.py 2005-10-14 16:31:34.625000000 -0700 +++ ASMTPDirect.py 2005-10-15 19:53:39.234375000 -0700 @@ -14,7 +14,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. -"""Local SMTP direct drop-off. +"""Local SMTP direct drop-off w/Authtenication. This module delivers messages via SMTP to a locally specified daemon. This should be compatible with any modern SMTP server. It is expected that the MTA @@ -61,6 +61,8 @@ def __connect(self): self.__conn = smtplib.SMTP() self.__conn.connect(mm_cfg.SMTPHOST, mm_cfg.SMTPPORT) + if mm_cfg.SMTP_AUTH: + self.__conn.login(mm_cfg.SMTP_USERNAME, mm_cfg.SMTP_PASSWORD) self.__numsessions = mm_cfg.SMTP_MAX_SESSIONS_PER_CONNECTION def sendmail(self, envsender, recips, msgtext): -------------------------------------------------------------------
เนื่องจากปัญหาการเข้าใช้งาน mailling list ผ่าน cpanel แล้วเกิด error เป็นแค่ list ใด list นึ่งเท่านั้น error วิธีแก้ปัญหาทีม TSส่งให้ lv2 วิธีแก้ปัญหาทีม SYSNOC หรือ ITSแนวทางการแก้ใข เข้าไปที่ root@prajim# cd /usr/local/cpanel/3rdparty/mailman/locks root@prajim# ls -la manager6_cc-knowledgebase.com.lock.prajim.siaminterhost.com.* *สังเกต manager6_cc-knowledgebase.com.lock.prajim.siaminterhost.com ส่วนที่เป็นตัวถึบคือชื่อ list ที่มีปัญหา ให้ย้ายไฟล์ที่ได้ข้างบนไปเก็บไว้ก่อน root@prajim# mv manager6_cc-knowledgebase.com.lock.prajim.siaminterhost.com.* /backup/manager6/ แล้วลองทดสอบใช้งานอีกครั้ง
ไมใช่ config ทุกตัวจะเก็บใน config.pck อันนี้มันจะเป็น mailing list specific configuration เท่านั้น ดูรายละเอียดได้ใน http://www.czechlist.org/doc/Mailman.Defaults-pysrc.html แล้ว search คำว่า List defaults ส่วน config อื่น ๆ จะ เก็บไว้ใน /usr/local/cpanel/3rdparty/mailman/Mailman/mm_cfg.py วิธีแก้ปัญหาทีม TSส่งให้ lv2 ครับ วิธีแก้ปัญหาทีม SYSNOC หรือ ITS Backup config.pck เดิมไว้ก่อน cd /usr/local/cpanel/3rdparty/mailman/lists/__LIST_NAME__ cp config.pck config.pck.bak Get the name of the variable out of the config.pck file: cd /usr/local/cpanel/3rdparty/mailman/lists/__LIST_NAME__ /usr/local/cpanel/3rdparty/mailman/bin/dumpdb config.pck | grep moderator Write the new value you want into a temporary file in the format. config_list expects mlist. before the variable. # cat > tmp mlist.moderator = test@example.com Ctrl+C to exit cat command. # more tmp mlist.moderator = test@example.com Run config_list with the tmp file as the input file against the list: cd /usr/local/cpanel/3rdparty/mailman/lists/__LIST_NAME__ config_list -iv tmp __LIST_NAME__ Check to make sure the change was successful: cd /usr/local/cpanel/3rdparty/mailman/lists/__LIST_NAME__ /usr/local/cpanel/3rdparty/mailman/bin/dumpdb config.pck | grep moderator