REF: https://openedx.microsoft.com/
เรียนรู้วิธีการสร้าง Windows Server Virtual Machine ข้อมูลเพิ่มเติมhttps://channel9.msdn.com/Blogs/Azure/Create-a-Windows-Server-Virtual-Machine
การสร้าง 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): -------------------------------------------------------------------