Jump to content
Main menu
Main menu
move to sidebar
hide
Navigation
Main page
Recent changes
Random page
Help about MediaWiki
TetraWiki
Search
Search
Appearance
Create account
Log in
Personal tools
Create account
Log in
Pages for logged out editors
learn more
Contributions
Talk
Editing
Fetchmail
Page
Discussion
English
Read
Edit
View history
Tools
Tools
move to sidebar
hide
Actions
Read
Edit
View history
General
What links here
Related changes
Special pages
Page information
Appearance
move to sidebar
hide
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
[[Category:How_To]] ==INTRODUCTION== [[File:Fetchmail.png|350px]] Fetchmail is a full-featured IMAP and POP client which allows users to automatically download mail from remote IMAP and POP servers and save it into local mailboxes; there it can be accessed more easily. Fetchmail can be installed using the mail/fetchmail port, and offers various features, some of which include: Support of POP3, APOP, KPOP, IMAP, ETRN and ODMR protocols. Ability to forward mail using SMTP, which allows filtering, forwarding, and aliasing to function normally. May be run in daemon mode to check periodically for new messages. Can retrieve multiple mailboxes and forward them based on configuration, to different local users. The fetchmail utility requires a configuration file known as .fetchmailrc, in order to run correctly. This file includes server information as well as login credentials. Due to the sensitive nature of the contents of this file, it is advisable to make it readable only by the owner, with the following command: chmod 600 .fetchmailrc It has two fundamental modes of operation for each user account from which it retrieves mail: singledrop- and multidrop-mode. [[File:Ftc.png|300px]] ==In singledrop-mode== fetchmail assumes that all messages in the userβs account (mailbox) are intended for a single recipient. The identity of the recipient will either default to the local user currently executing fetchmail, or will need to be explicitly specified in the configuration file. fetchmail uses singledrop-mode when the fetchmailrc configuration contains at most a single local user specification for a given server account. ==In multidrop-mode== fetchmail assumes that the mail server account actually contains mail intended for any number of different recipients. Therefore, fetchmail must attempt to deduce the proper "envelope recipient" from the mail headers of each message. In this mode of operation, fetchmail almost resembles a mail transfer agent (MTA). Note that neither the POP nor IMAP protocols were intended for use in this fashion, and hence envelope information is often not directly available. The ISP must stores the envelope information in some message header and. The ISP must also store one copy of the message per recipient. If either of the conditions is not fulfilled, this process is unreliable, because fetchmail must then resort to guessing the true envelope recipient(s) of a message. This usually fails for mailing list messages and Bcc:d mail, or mail for multiple recipients in your domain. fetchmail uses multidrop-mode when more than one local user and/or a wildcard is specified for a particular server account in the configuration file. ==INSTALLATION== yum install fetchmail ==Configure fetchmail== There are two ways of configuring fetchmail. We can make it run as a daemon with a global configuration file, or we can create a cron job to run fetchmail together with per-user configuration files.We use cron job to run fetchmail which is described below. Let's assume Raunaq has two email accounts from which we want to retrieve emails. The fetchmail utility requires a configuration file known as .fetchmailrc, in order to run correctly. This file includes server information as well as login credentials. Due to the sensitive nature of the contents of this file, it is advisable to make it readable only by the owner, with the following command: vim /home/raunaq/.fetchmailrc chown raunaq:raunaq /home/raunaq/.fetchmailrc chmod 600 .fetchmailrc create a cron job like this one (which would start fetchmail every five minutes): */5 * * * * /usr/bin/fetchmail &> /dev/null Fectmailrc setting to fetch mails for a single user: poll pop3.rahlabs.com with proto POP3 user raunaq@rahlabs.com there with password "cat_ey!@#" is "raunaq" here Where, pop3.rahlabs.com - My POP3 server proto POP3 β You are using POP3 protocol raunaq@rahlabs.com - POP3 username "cat_ey!@#" - POP3 password "raunaq" - Local mailbox name Fetchmailrc setting to fetch mail for multiple users: defaults no dns envelope Delivered-To: set postmaster "allpowerfulladmin" poll mail.rahlabs.com localdomains yourlocaldomain.com proto pop3 user "username" pass "pass" to * fetchall
Summary:
Please note that all contributions to TetraWiki may be edited, altered, or removed by other contributors. If you do not want your writing to be edited mercilessly, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource (see
TetraWiki:Copyrights
for details).
Do not submit copyrighted work without permission!
Cancel
Editing help
(opens in new window)