{"id":96,"date":"2013-01-17T18:34:00","date_gmt":"2013-01-17T18:34:00","guid":{"rendered":"http:\/\/prismoid.uk\/wp\/2013\/01\/17\/postfix-and-pop3-server\/"},"modified":"2019-04-14T21:21:26","modified_gmt":"2019-04-14T20:21:26","slug":"postfix-and-pop3-server","status":"publish","type":"post","link":"http:\/\/prismoid.uk\/wp\/2013\/01\/17\/postfix-and-pop3-server\/","title":{"rendered":"Postfix and POP3 server"},"content":{"rendered":"<p><a href=\"http:\/\/www.prismaqf.com\/pebble\/geek\/2012\/12\/24\/1356382140000.html\">Back to the introduction<\/a><\/p>\n<p>n<\/p>\n<p>In this step I am testing a firts version of the email server with <strong>postfix<\/strong> (SMTP on port 25) and <strong>POP3<\/strong> server (on port 110) of the Pi card. You also need <strong>xinetd<\/strong> to host the pop3 daemon<\/p>\n<p>n<\/p>\n<ol>n    <\/p>\n<li>Install (apt-get) the following three packages: <strong>postfix, solid-pop3d, xinetd<\/strong><\/li>\n<p>n    <\/p>\n<li>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 <a href=\"http:\/\/www.postfix.org\/\" target=\"_blank\" rel=\"noopener noreferrer\">postfix documentation<\/a>.<\/li>\n<p>n    <\/p>\n<li>After installing <strong>xinetd<\/strong>, you can add a pop3 service by creating a file pop3 in \/etc\/xinet.d with this section in itn\n<pre>nservice pop3n{n        id              = pop3n        port            = 110n        socket_type     = streamn        protocol        = tcpn        wait            = non        user            = rootn        server          = \/usr\/sbin\/solid-pop3dn        flags           = IPv4n}n<\/pre>\n<p>n    Then restart xinetn    <\/p>\n<div class=\"codeSample\">sudo \/etc\/init.d\/xinet restart<\/div>\n<p>n    check that pop3 is availablen    <\/p>\n<div class=\"codeSample\">chkconfig -l<\/div>\n<p>n    and test that port 110 is open on your local network. This can be done from another computer on your LAN by:n    <\/p>\n<div class=\"codeSample\">telnet raspberrypi 110<\/div>\n<p>n    <\/li>\n<p>n    <\/p>\n<li>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\n<div class=\"codeSample\">x: y<\/div>\n<p>n    where x is the first part of my official email address (<em>e.g.<\/em> <em>x@mydomain.com<\/em>), and y is my new account login name in the Pi card. Remember to run the <em>newaliases<\/em> comand to save the changes from this text file<\/li>\n<p>n    <\/p>\n<li>&nbsp;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.<\/li>\n<p>n    <\/p>\n<li>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 <strong>gnome-system-log<\/strong><\/li>\n<p>n<\/ol>\n<p>n<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Back to the introduction n In this step I am testing a firts version of the email server with postfix<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[9],"tags":[18,11],"post_folder":[],"_links":{"self":[{"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/posts\/96"}],"collection":[{"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":1,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"predecessor-version":[{"id":151,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/posts\/96\/revisions\/151"}],"wp:attachment":[{"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/tags?post=96"},{"taxonomy":"post_folder","embeddable":true,"href":"http:\/\/prismoid.uk\/wp\/wp-json\/wp\/v2\/post_folder?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}