Fetchmail with Kolab2

From Kolab wiki

Jump to: navigation, search


This is used to download mail from POP3 mailboxes.

OpenPKG provides a fetchmail package that you can download and install.

NOTE: OpenPKG has a special download policy on the FTP server. Please consult http://registry.openpkg.org/help to learn how to download the required files. You will need to log in as a registered user.

 wget ftp://YOUR@OPENPKG.LOGIN@ftp.openpkg.org/current/SRC/BASE/fetchmail-6.3.8-20080408.src.rpm

Once you downloaded the source package you should compile it to a binary package by running:

 sudo /kolab/bin/openpkg rpm --rebuild  fetchmail-6.3.8-20080408.src.rpm

The resulting binary can now be installed using

 sudo /kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/fetchmail-6.3.8-20080408.ix86-ubuntu8.04-kolab.rpm

The file name in the last line might look different depending on the platform your Kolab is installed on.

You can now use fetchmail to feed your mail into kolab via SMTP.

Enable the fetchmail daemon by editing /kolab/etc/rc.conf and setting

 fetchmail_daemon="yes"

Now edit /kolab/etc/fetchmail/fetchmail.master to contain

 set postmaster "root"

and add the kolab user to /kolab/etc/fetchmail/fetchmail.user:

 kolab

Any user specific fetch rules go into /kolab/.fetchmailrc then. E.g.:

 poll your_pop3_server with proto pop3
 user "your_email_adress" there with password "your_password" is "your_username at your_kolab_server" options fetchall

Using fetchmail from your host distribution

You can use the fetchmail that comes with your distribution as well. In that case make sure to use the kolab sendmail binary. This can be accomplished by running the opa (see also Kolab2_FAQ#Configuration_of_kolab2_-_general ).

Fetchmail with catch-all pop mailboxes

This fetchmailrc worked for me with a catchall pop box:

 defaults
 no dns
 envelope Delivered-To:
 set postmaster "postmaster@mydomain.com"
 poll pop.someserver.com
 localdomains mydomain.com
 proto pop3
 user ""
 pass ""
 to *
 #fetchall
 keep # For testing, comment out and use fetchall for live

If you get "mail forwarding loop" messages in the log instead of mails in your inbox than this may solve your probs. Vincent wrote: This will hopefully save somebody hours of googling........

 If using fetchmail with kolab, you may be collecting from an isp who uses
 qmail.  Qmail puts a 'delivered-to' line into the mail header.  When
 fetchmail passes such a mail onto postfix, postfix will read such a line in
 the header, and throw up a 'mail forwarding loop error, and not deliver the
 mail to the local user.
 
 The solution is to place 'dropdelivered' in the .fetchmailrc file as per the
 example which follows:
 
 poll mail at yourdomain.uk.com proto POP3
 user thisonedrovememad4hours at yourdomain.uk.com password foobar dropdelivered
 is localuser1 at yourdomain.uk.com here
 user foundtheanswer at yourdomain.uk.com password yippee@@ dropdelivered is
 foundtheanswer at yourdomain.uk.com here
Personal tools