Avatar of Peter Chan
Peter Chan
Flag for Hong Kong asked on

Issue to Courier

I get file "courier-imap-5.0.8.tar" (attached) but am not sure about its setup in Ubuntu. Please help.
Email ServersEmail ProtocolsUbuntuLinux DistributionsLinux

Avatar of undefined
Last Comment
David Favor

8/22/2022 - Mon

What you have is the source, you have to compile it. Look at readme, install.

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.bz2 | tar -xvf
It will unarchive it....
Dr. Klahn

"Courier-imap" is available through the Debian (hence also Ubuntu) package distribution system.  There should not be a need to build it.

apt-get install courier-imap should install it, plus any dependencies it requires.
Peter Chan

Thanks to all.

Please advise to issue below.3a.png
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy

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

Best would be to solve the connections & name resolution problems though,

Dr. Klahn

Agree with noci.  The DNS issue should be solved first.  Try doing a 'nslookup hk.archive.ubuntu.com' and see what you get back for an error message.
David Favor

View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.

More /etc/resolv.conf

Hosts: files DNS

Contrary to David's point, it is unclear what you are looking to do. Courier-IMAP is a sub package of courier mail.
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Peter Chan

I would work with Dovecot and need to resolve issue with Postgresql.

Due to error below, how to resolve it?

Why are you running sudo to run psql?
The error means postgre user is not authorized in /etc/sudoers and can not run sudo.

Commands MySQL, psql commonly do not require rights elevation to run.
Peter Chan

What to adjust now, due to this error?

postgres is not in the sudoers file.  This incident will be reported.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck

sudo is only needed or used when you need root (administrative rights) that a standard user does not have.
To run apps like psql, MySQL clients to DB do not require right elevation.
If you need to connect to the database using a different user, use the -u or -U option as applicable

Further sudo -u postgres while logged in as postrgres user is redundant.

sudo -u Postgres cmd when run, is used by userA who has sudo rights to elevate their rights such that userA can impersonate Postgres user when running cmd.

Commonly this is done by admin's when trying to resolve an issue a user may report. I.e. When I do X, I get the following error, or I get Y.

You are already logged in as postrges so elevating to root to then impersonate postgres seems a n unnecessary ...

psql -U root might be what you thought, considered.

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.


In the image posted, the asker is in the shell as postgres.
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.

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.


Either I am misinterpreting what was posted.
The asker is trying to connect to their postgresql instance using the psql  client

The db user can be specified by use of the -U argyment.

To me it seems the asker got accustomed or perceived the need for rights elevation to perform this task.
Peter Chan

Is there procedure to create Role and grant rights to user?
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck

You have to be more specific.
Useradd to add a local user to a Linux/UNIX system
-u user unique ID
-g prinary group
-G additional group's membership
Visudo is the tool to use to setup which users, or groups have elevation rights and to what extent, from ALL:ALL to an explicit list of command a user or a group can run with elevated rights.
The above deals with rights, privileges on the system level.

Then you can grant/create users with applications such as postrgres ql, MySQL, mariadb where you would need to define what rights a username that could be the same as the local system account
The mysql psql

Htpasswd is used to setup http based auth if needed.

sudo is only needed to perform administrative tasks it is an alternative to the original su which requires the password of the root account.
Sudo once a user is authorized prompts for the user's password.
David Favor

You mention an issue running psql above.

Best to open a new question to resolve this.