This article describes how to set up popa3d (a POP3 mail server daemon process) and create a user account (in Debian Lenny) solely for the purposes of blog posting.
- 0 – A preliminary note about
popa3d -
popa3dis a more or less zero-configuration *nix POP3 daemon process that will serve up any mail found in the spool file belonging to any user account (apart from therootaccount) if the correct user account password is provided.If you don’t want all your user accounts’ mail spool files to be POP3 enabled, then
popa3dis not for you. - 1 – Install
popa3d -
# apt-get install popa3dAnswer ‘yes’ when asked whether you would like to run
popa3din standalone mode.You can now start, restart and stop
popa3dusing the init script provided:# /etc/init.d/popa3d {start|restart|stop}If you want to disable
popa3dpermanently (so that it isn’t started at boot time) it is sufficient to simply edit/etc/default/popa3dto read:RUN_STANDALONE=noImportant tip:
popa3d’s other mode of operation is as an internet ’service’. Forpopa3dto work in this mode you must also edit/etc/inetd.conf. - 2 – Create a user account for your WordPress blog posts
-
We now need to create a user account, with a name that should be very hard to guess because WordPress will retrieve (and treat as blog posts ‘pending’) any and all mail it finds in the specified mailbox (when instructed to do so ). Ideally you should create an account called something like
jhuwe7KJ23hbut for the purposes of this article we will call the accountobscure.We know that
popa3dwon’t serve mail that has been delivered to therootaccount, nor will it serve mail delivered to an ordinary user account unless the correct user account password is provided, but there also happens to be a third security measure which isn’t documented – it won’t serve mail delivered to a user account if the user doesn’t have write access to their home directory.So, we have to create a user account (with an obscure name) that provides write access to its home directory, but we don’t want to allow logins, we don’t want it intermingling with ordinary user login accounts and we don’t want an unused sub-directory of
/homelying around either, especially not if we’re going to provide a number of these accounts for a number of WordPress blogs we may be hosting.Now, when popa3d is installed (on a Debian system) a number of things happen behind the scenes…
- a system user
popa3dis created - a system group
popa3dis created - user
popa3d’s home directory/var/lib/popa3dis created (with ownerrootand grouproot)
…so we’re going to give user
obscurea UID which keeps her well out of the way of ordinary login accounts, make her a member of thepopa3dgroup, make/var/lib/popa3dher home directory and deny her a shell (thus preventing logins), like so:# useradd -c "POP3 mail account" -u 65501 -g popa3d \ -d /var/lib/popa3d -s /bin/false obscureAnd we now have to give her a password:
# passwd obscure Enter new UNIX password: Retype new UNIX password: passwd: password updated successfullyOne final thing remains for us to do – make user
popa3dthe owner and group owner of directory/var/lib/popa3dand give members of grouppopa3dwrite access to it:# chown popa3d:popa3d /var/lib/popa3d # chmod g+w /var/lib/popa3d - a system user
- 3 – Check everything is working with
telnet -
Fire up your command line telnet client:
telnet localhost 110 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. +OKIf you get the ‘OK’
popa3dis up and running and waiting for client requests.