Courier Mail Server

Personal memo on how I did  install a working mail server Courier on my personal desktop machine, a Fedora 26 one.

Thanks so much to Sam Varshavchik without whose step by step help I couldn’t have made.
  1. My goals:
    1. to retrieve mail from my remote server (managed by a professional provider). I do that by fetchmail, and it transfers mails to courier;
    2. to manage mails by courier as my local mail server, in particular to be able to check them by the bundled webmail SqWebMail;
    3. to download mails by my local mail client (Evolution) from the local mail server. To do that, courier needs to listen to a pop3 port;

    Let’s see how I did

  2. I downloaded the following four tarball source codes:

  3. rpmbuild -ta each of them:

    Note: I was installing as root, but at some point I was asked to shift to a non-admin system user, say user myself (I do not remember when/why)
    Note: I had missing dependencies; I could install every missing package by dnf install <package>. Among other, I needed:

  4. hence, root and myself’s RPMS folders contain:

    and I could rpm -ivh all the rpm’s:

    Note: for courier-unicode, a older version seems to be sitting on Fedora 26, so first I needed to:

    then

  5. Now I had to define my mail users. I followed instruction at A simple userdb setup:  it is asked to create a system user, say vmail; I did that.
    I created file:

    (note, for some reason, on my machine it did not work with file at /usr/local/etc/authlib/userdb)
    I retrieved info about vmail by (check vmail line):

    and wrote them within /etc/authlib/userdb:

    for each of my users, I created MailDir:

    and wrote the relevant line of info within /etc/authlib/userdb (note I use gid, uid as vmail’s ones)

    to include the password I launched

    inserted the password at the prompt and got the file overwritten as

  6. I still needed to define the hosted domain. I looked for file /etc/courier/hosteddomains/hosteddomains, wrote therein the line mydomain.glt, and launched

  7. there was still a last step: to select Courier’s sendmail as the preferred mta (since Fedora seems to be shipped with postfix and original sendmail too)

    I may check with (long output is not pasted)

  8. Now I may launch the program I wish to use:

    Also, I may check:

    If I try to ship a mail by

    I may check that it pops up within the MailDir


    and I see it from within the webmail, at url http://localhost/cgi-bin/webmail?index=1


  9. To download mail from the remote server, I use fetchmail. It needs a config file .fetchmailrc (to be saved within the main vmail folder) whose content is:
  10. last but not least, I wish to launch all I need at booting. This seems has to be done by creating files .desktop under the /root/.config/autostart/ folder
    whose content is, say for courier.desktop
    and similarly for the other ones.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*
*