Sean Cull

Receiving POP3 mail into a Linux Domino server using getmail and sendmail 

Sean Cull  26 July 2010 07:42:55

I have a need to receive mail from a POP3 account into a domino server running on Centos 5.5 as an appliance.  

Some time ago on windows I used the Chimeras Email Forwarding System which worked very well but this was a Linux server.

The scheme I came up with uses a combination of  Getmail version 4 and Sendmail.

Getmail is a Linux utility which will poll different types of mail accounts and then pass those messages on. It has an option to pipe the messages to an external mail delivery agent such as Sendmail. Sendmail can then send them on to the Domino server as SMTP on the localhost address.

These notes are for a Centos 5.5 installation with the Webmin web based management console

Install and configure Getmail



Create a new user called mailer or similar and a password. This is because Getmail will not call Sendmail if it is run as root.

As Root download Getmail

see http://pyropus.ca/software/getmail/documentation.html#installing

$ cd /tmp/
$ wget http://pyropus.ca/software/getmail/old-versions/getmail-4.20.0.tar.gz
$ tar xzf getmail-version.tar.gz
$ rpm -ihv getmail-version-release.noarch.rpm
$ cd getmail-version
$ python setup.py build


I then used Winscp to create the configuration file /home/mailer/.getmail/getmailrc


In this case the receiving account on the Domino server will be the Administrator account. Getmail has lots of other options

[retriever]
type = SimplePOP3Retriever
server = acme.com
username = peter pan
password =

[destination]
type = MDA_external
path = /usr/sbin/sendmail
arguments = ("-i","-bm", "administrator@localhost")

[options]
verbose = 0
read_all = false
delete = false
message_log = ~/.getmail/log

[default]

Configure Sendmail



Sendmail and Domino cannot normally run on the same box because they both need to bind to port 25. In this scenario Sendmail does not need to listen to port 25 so it can be configured to listen on port 26 ( or any other unused port ). I used the Webmin client to make this change under Servers > Sendmail > Network Ports


Image:Receiving POP3 mail into a Linux Domino server using getmail and sendmail


Testing the System



Log in as mailer

enter getmail -v
The -v gives a verbose output so that you can see what is happening.


Scheduling the getmail task



I used webmin to set up the cron job running as the mailer user


System > Scheduled Cron Jobs


Image:Receiving POP3 mail into a Linux Domino server using getmail and sendmail

Other things to remember



You may need to set Sendmail up to start on bootup

You may need to allow pop3 mail through your firewall


As usual all feedback on better schemes welcomed !

Sean



 Admin Tips  Appliance  Linux  Lotus  Show-n-Tell Thursday 


1Andy Brunner  26.07.2010 8:53:41  There is also a freeware tool POP3 Collect

see { Link }



2Sean Cull  26.07.2010 9:09:36  That looks neat

Andy, that looks very neat, I would probably have tried it first if I had seen it. Sean



3Cristian D’Aloisio  26.07.2010 14:09:53  Pop3 Collect

Hi,

Andy tool is really great, I'm using it since some months ago and is also easy to use it.

Great job.



4Yuri Domnikov  17.09.2010 19:46:58  Another solution

Hi, that is a great setup. I did manage to fetch pop3 email with fetchmail running it is daemon mode. Just write up yoour fetchmailrc file and that is all it takes :)





Please leave a comment


Subject:
   
Name:
E-mail:
 
Comment:  (No HTML - Links will be converted if prefixed http://)
 
Remember Me?