Link to home
Start Free TrialLog in
Avatar of Peter Chan
Peter ChanFlag for Hong Kong

asked on

Issue to Courier

Hi,
I get file "courier-imap-5.0.8.tar" (attached) but am not sure about its setup in Ubuntu. Please help.
courier-imap-5.0.8.tar.bz2
Avatar of arnold
arnold
Flag of United States of America image

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....
Avatar of Dr. Klahn
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.
Avatar of Peter Chan

ASKER

Thanks to all.
Klahn,

Please advise to issue below.User generated image

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,

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.
ASKER CERTIFIED SOLUTION
Avatar of David Favor
David Favor
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
More /etc/resolv.conf

/etc/nsswitch.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.
I would work with Dovecot and need to resolve issue with Postgresql.

Due to error below, how to resolve it?
User generated image
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.
What to adjust now, due to this error?

postgres is not in the sudoers file.  This incident will be reported.
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.

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.
Hi,
Is there procedure to create Role and grant rights to user?
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.
You mention an issue running psql above.

Best to open a new question to resolve this.