Postfix and POP3 server

Back to the introduction

n

In this step I am testing a firts version of the email server with postfix (SMTP on port 25) and POP3 server (on port 110) of the Pi card. You also need xinetd to host the pop3 daemon

n

    n

  1. Install (apt-get) the following three packages: postfix, solid-pop3d, xinetd
  2. n

  3. Configure postfix by editing /etc/postfix/main.cf. I have applied to that file all the settings inherited from my existing postfix email server (on my main computer), including filters, blacklists and other. To understand all the configuration required, please refer to the postfix documentation.
  4. n

  5. After installing xinetd, you can add a pop3 service by creating a file pop3 in /etc/xinet.d with this section in itn
    nservice pop3n{n        id              = pop3n        port            = 110n        socket_type     = streamn        protocol        = tcpn        wait            = non        user            = rootn        server          = /usr/sbin/solid-pop3dn        flags           = IPv4n}n

    n Then restart xinetn

    sudo /etc/init.d/xinet restart

    n check that pop3 is availablen

    chkconfig -l

    n and test that port 110 is open on your local network. This can be done from another computer on your LAN by:n

    telnet raspberrypi 110

    n

  6. n

  7. Create a new account on your system to receive emails, and, if required, modify the /etc/aliases file to include rerouting from your public email address to this new account: Add an entry in that file liken
    x: y

    n where x is the first part of my official email address (e.g. x@mydomain.com), and y is my new account login name in the Pi card. Remember to run the newaliases comand to save the changes from this text file

  8. n

  9.  Now your card should have both ports 25 and 110 open, and you can reconfigure your router to open these channels to the outside word and test sending an email from outside and retrieving it back using the POP3 server.
  10. n

  11. Check the mail logs in /var/log to see the communication on port 25 (when an email arrives). These logs are very useful to spot wrong configuration in postfix (when restarting the postfix daemon) and other problems. I am using gnome-system-log
  12. n

n