Runtime Control script for Red Hat / Fedora::

Fetchmail Logo

Intro

I am pleased to be able to offer a Red Hat / Fedora Linux based runtime-control script for running Fetchmail. The script is free to download and modify for your own system needs.

1: Do I have Fetchmail?

From a 'root' user prompt (or super-user) enter the command rpm -q fetchmail. If you do not have Fetchmail installed, you can install it via Yum: yum install fetchmail.

2: Download Runtime script

The script is available via the link below. After downloading the file, remember to gzip -d fetchmail.gz to decompress the file. A text version of the script is also available for reference, printing, etc.

3: Install Runtime script

Copy the expanded file into your /etc/init.d/ directory; check the permissions are 755 (chmod 755 fetchmail); and the user:group rights are both set to 'root' (chown root:root fetchmail); then run the following command:

/sbin/chkconfig --add fetchmail

The 'chkconfig' program creates the symlinks in the rc0.d, rc1.d,... rc6.d directories.

4: .fetchmailrc

As this script runs as 'root', you must create your .fetchmailrc file in /root/ and give it 600 permissions (else Fetchmail fails).

Please note: You do not need to set any time defaults in your .fetchmailrc. The RC script controls the timing interval.

An example .fetchmailrc:

# Fetchmail configuration file
#
# Last updated: 4th April 2005
#
defaults proto pop3

poll pop.somemailserver.com user "andy@dontlikeit.com" password "thatone"
   is "andy" here

poll pop.anothermailserver.com user "vicky@pollard.mail" password "YeahButNo"
   is "inprison" here

5. Testing

Run the command fetchmail -v -c to verify your settings in your .fetchmailrc file are correct.

6. Running

You may now enter the following commands (as SU) to control Fetchmail:

service fetchmail start
service fetchmail stop
service fetchmail status
service fetchmail restart
service fetchmail condrestart

External Links

Fetchmail


Delicious Digg Logo
Reddit Logo Slashdot Logo
StumbleUpon Logo Twitter Logo
This Website is coded to W3C HTML 4.01 standards. Click here to test this page. This Website is coded to the W3C CSS2 Specification. Click here to test this page.