Fetchmail with Kolab2
From Kolab Wiki
This can be used to download mail from POP3 mailboxes and to deliver them to their respective Kolab users.
OpenPKG provides a fetchmail package that you can download and install.
wget ftp://YOUR@OPENPKG.LOGIN@ftp.openpkg.org/current/SRC/BASE/fetchmail-6.3.10-20090703.src.rpm or wget ftp://YOUREMAIL%40MYISP.COM@ftp.openpkg.org/current/SRC/BASE/fetchmail-6.3.10-20090703.src.rpm
Once you downloaded the source package you should compile it to a binary package by running:
/kolab/bin/openpkg rpm --rebuild fetchmail-6.3.10-20090703.src.rpm
The resulting binary can now be installed using
/kolab/bin/openpkg rpm -ihv /kolab/RPM/PKG/fetchmail-6.3.10-20090703.ix86-ubuntu9.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/kolab/templates/rc.conf.template and setting
Then run /kolab/sbin/kolabconf.
Now edit /kolab/etc/fetchmail/fetchmail.master to contain
set postmaster "root"
and add the kolab user to /kolab/etc/fetchmail/fetchmail.user:
All user specific fetch rules go into /kolab/.fetchmailrc then. E.g.:
poll pop.mail.yahoo.com with proto pop3 user "firstname.lastname@example.org" there with password "example" is "email@example.com at localhost" options fetchall
Make sure all this is on one line.
/kolab/bin/openpkg rc fetchmail start
In case /kolab/bin/openpkg rc fetchmail start hangs forever there might be a problem with the configuration in /kolab/.fetchmailrc. Make sure the configuration lines are valid.
/kolab/bin/openpkg rc fetchmail restart can be expected to fail. I'm currently not certain why. The service can only be restarted by issuing killall fetchmail followed by /kolab/bin/openpkg rc fetchmail start.
Also make sure you check the log at /kolab/var/fetchmail/fetchmail.log if fetchmail reports any problems. This will only happen if the service is able to start though.
If you don't get the service started via /kolab/bin/openpkg rc you can also try to run it manually with
/kolab/bin/fetchmail -f /kolab/etc/fetchmail/fetchmailrc -L /kolab/var/fetchmail/fetchmail.log --pidfile /kolab/var/fetchmail/fetchmail.pid
This might give you more information about possible problems on the command line.
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 "firstname.lastname@example.org" 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