การแก้ปัญหาการส่งเมล สำหรับโฮสต์ที่ใช้ dynamic ip โดยใช้ gmail
ปัญหาคือเมลเซิร์ฟเวอร์สาธารณะไม่ยอมรับจดหมายจากเครื่องที่มีไอพีไม่คงที่
จะแก้โดยให้ gmail เป็นผู้ส่งจดหมายให้
สมมุติว่าเราได้ติดตั้ง postfix ไว้แล้ว
เสร็จแล้ว
# postconf -e 'relayhost = smtp.gmail.com' # postconf -e 'smtp_sasl_auth_enable = yes' # postconf -e 'smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd' # postconf -e 'smtp_sasl_security_options ='
# echo "smtp.gmail.com USER@gmail.com:PASSWORD" >> /etc/postfix/sasl_passwd # chown root:root /etc/postfix/sasl_passwd # chmod 600 /etc/postfix/sasl_passwd # postmap /etc/postfix/sasl_passwd
# /etc/init.d/postfix restart
เสร็จแล้ว
หลังจากนี้เวลาเซิร์ฟเวอร์เราส่งเมลออก เขาจะใช้กูเกิลในการส่งแทน
อ้างอิง