Do you have an internet connection?... if resolving that doesn't work:
This is the DNS info on the name you can put then name with the ip shown in the /etc/hosts files if you can ping the address.
hk.archive.ubuntu.com. 600 IN CNAME ftp.cuhk.edu.hk.
ftp.cuhk.edu.hk. 900 IN A 137.189.4.14
Best would be to solve the connections & name resolution problems though,
postgres is not in the sudoers file. This incident will be reported.
As root user try: sudo -u postgres -s
To ensure there is a valid shell there might be an invalid shell configured in /etc/passwd to prevent logins on the postgres account at well.
Agreed, -s is needed to avoid other issues.
Creating postgresql as a regular user makes no sense..., it is meant to have a no-access account as part of the security.
What you have will only provide access to emails, it is not a mail transport agent, mail server.
You gave to configure the mta, postfix or .. To use Maildir as that provides unique message naming and does not have to contend with locking if mbox format is used.
To unpack, and untar
Bzip2 -cd<courier-imap-5.0.8.tar
It will unarchive it....