fetchmail ເປັນຊອບແວ ສຳລັບດຶງເອົາອີເມວຈາກເມວເຊີເວີມາໃສ່ເມວບັອກເຮົາ, ແຕ່ ການທຳງານຂອງ fetchmail ຈະສຳເລັດໄດ້ ລະບົບຂອງທ່ານຕ້ອງໄດ້ຕິດຕັ້ງ MTA ມາກ່ອນ ບໍ່ວ່າຈະເປັນ Sendmail ຫລື Postfix ເປັນຕົ້ນ.
ຂັ້ນຕອນການຕິດຕັ້ງ ແລະ ການຕັ້ງຄ່າ
1. ຕິດຕັ້ງ
apt-get install fetchmail
2. ຕັ້ງຄ່າ
ແປງຄ່າໃນໄຟລ
nano /etc/default/fetchmail
ແລະ ຕັ້ງ START_DAEMON ເປັນ yes
# This file will be used to declare some vars for fetchmail # # Uncomment the following if you dont want localized log messages # export LC_ALL=C # Declare here if we want to start fetchmail. 'yes' or 'no' START_DAEMON=yes
nano /etc/fetchmailrc
ຕົວຢ່າງໂຄດ
# /etc/fetchmailrc for system-wide daemon mode # This file must be chmod 0600, owner fetchmail set daemon 300 # Pool every 5 minutes set syslog # log through syslog facility set postmaster root set no bouncemail # avoid loss on 4xx errors # on the other hand, 5xx errors get # more dangerous... ########################################################################## # Hosts to pool ########################################################################## # Defaults =============================================================== # Set antispam to -1, since it is far safer to use that together with # no bouncemail defaults: timeout 300 antispam -1 batchlimit 100 poll pop.someprovider.tld protocol POP3 user "[email protected]" there with password "secret" is falko here poll mail.otherprovider.tld protocol POP3 user "ftimme" there with password "verysecurepassword" is falko here fetchall poll mailin.tillsprovider.tld protocol POP3 user "tbrehm" there with password "iwonttellyou" is till here keep
ຊຶ່ງນີ້ເປັນລາຍລະອຽດຄວາມໝາຍຂອງຄຳສັ່ງ
- set daemon: Set a background poll interval in seconds.
- set syslog: Do error logging through syslog.
- set postmaster: Give the name of the last-resort mail recipient (default: user running fetchmail, “postmaster” if run by the root user).
- set no bouncemail: Direct error mail to the local postmaster (as per the “postmaster” global option above).
- timeout: Server inactivity timeout in seconds (default 300).
- antispam: Specify what SMTP returns are interpreted as spam-policy blocks.
- batchlimit: Specify the maximum number of messages that will be shipped to an SMTP listener before the connection is deliberately torn down and rebuilt (defaults to 0, meaning no limit).
- nofetchall: Retrieve only new messages (default). If nothing else is specified (e.g. fetchall, keep), this means nofetchall.
- fetchall: Fetch all messages whether seen or not.
- keep: Don’t delete seen messages from server.
- nokeep: Delete seen messages from server.
ຫລື ເຮົາສາມາດເບິ່ງວິທີການຕື່ມຈາກ
man fetchmail
ສຳລັບ /etc/fetchmailrc ຕ້ອງຕັ້ງຄ່າສິດໃຫ້ເທົ່າກັບ 600 ຊຶ່ງເປັນຜູ້ໃຊ້ຂອງ fetchmail
chmod 600 /etc/fetchmailrc chown fetchmail /etc/fetchmailrc
ສຸດທ້າຍໃຫ້ທ່ານເປີດໃຊ້ fetchmail
/etc/init.d/fetchmail start
ຂໍ້ມູນຈາກ howtoforge.com