CNL lab 4 Group 10
B 資工三 趙祈鈞 Requirement p.1 ◦ Allow localhost and intranet sending ◦ Reject unknown sender ◦ Allow internet sending to the host && aliasing ◦ forwarding Bonus p.last ◦ Control sending rate and limit mail size ◦ Virus scanning of
Allow localhost and intranet sending /etc/bind/db.cnl csie.org( 正解 IN MX 10 ms.cnl csie.org. ms IN A /etc/bind/db ( 反解 ) 110 IN PTR ms.cnl csie.org. 安裝 postfix & popa3d
Allow localhost and intranet sending ( Cont. ) /etc/postfix/main.cf myhostname = ms.cnl csie.org mydomain = cnl csie.org mydestination = $myhostname,localhost,$mydomain, inet_interfaces = all $/etc/init.d/postfix reload ( 改完 /etc/postfix/main.cf 都要 postfix reload!)
Reject unknown sender /etc/postfix/main.cf smtpd_sender_restrictions = reject_unknown_sender_domain => 拒絕未知 domain name 寄來的信
Allow internet sending to the host && aliasing /etc/aliases lab: cnl10 收信人寫 的信 收信人寫 會寄給
forwarding cnl10: cnl10, => 寄給 cnl10 的信, b … 等人 也會收到 改過 /etc/aliases 後 記得要 $newaliases
Bonus Part Bonus Part
Control the sending rate and limit the mail size of your mail agent 1.size:( 設為 5MB) /etc/postfix/main.cf message_size_limit = 如果信件大小超過 5MB 的話 : Mail Delivery SystemMail Delivery System: Undelivered Mail Returned to Sender Diagnostic-Code: X-Postfix; message size exceeds size limit of server ms.cnl csie.org[ ]
Control the sending rate and limit the mail size of your mail agent 2.rate: incoming-or-receiving- -rate/ /etc/postfix/main.cf 放下一頁好了
slow_destination_rate_delay = 2s # 讓 queue manager 在每個 individual delivery to the same destination 之間加入 delay 2 秒 smtp_destination_concurrency_limit = 1 smtp_destination_rate_delay = 1s #never more than one at a time and never faster than 1 per second # to each unique domain 1 秒不要超過一封 !
Virus scanning of ClamAV installation-and-configuration.html ※ correct /etc/sources.list to /etc/apt/sources.list 使用指令 : $clamscan /
Virus scanning of (Cont.)
Thank you Thank you