Raspberry Pi, an email with Citadel Server

Warning : This article has been automatically translated by Google Translate


Danger : This article has been automatically translated by Google Translate


After the standard tool that is Postfix (see the article here), I wanted to test a more comprehensive tool : Citadel.
email-0

For this new article I wanted something with more functionality than a simple email server. Citadel proposes to go further in a suite is that easy to use. The features are many and really desires :

  • POP3 email retrieval, IMAP
  • Calendar WebDAV, CalDAV
  • Webmail
  • Push to mobile
  • Embedded web server and database
  • etc.

You will see at the end that the picture is not so rosy !

  1. As at the beginning of tutorial, a full update of the system is necessary !
    sudo apt-get update && sudo apt - get upgrade
  2. Install Inadyn to have your domain name or use the domain you already own. You can find all Info for Inadyn in this article.
  3. Change the/etc/hosts file
    127.0.0.1      <your domain name>
  4. Change the file/etc/hostname
    <your domain name>
  5. Restart Raspberry Pi
    reboot
  6. Install all the Citadel tools
    sudo apt - get install citadel-suite
  7. During the installation, a series of questions will be asked :
    1. The first request which will be able to connect to the system for the sending/receiving of emails. By default the value is everyone with the IP 0.0.0.0. You can change the value if you want to restrict access. Attention if you put * It may be difficult with a listen on IPv6 addresses.
    2. The authentication method.
      email-2I chose Internal. It's Citadel that will manage everything. The Host method may also be appropriate if you want only people with an account on the machine to be able to have emails.
    3. The administrator account
      email-3Unless you want a particular name, no reason to change. If during the previous stage you selected “Internal”, the account must already exist.
    4. The password of the administrator. Pas besoin d’expliquer 😉 A saisir deux fois
      email-4
    5. Integration of the Web interface
      email-5You have the choice between Apache or the embedded Web server. The integrated server is presented as very light and powerful. Not very well familiar with Apache (oui je reste fan de Nginx 🙂 ) I chose the internal server.
    6. The default port. I have no other service to rotate so I keep the port 80
      email-6
    7. The HTTPS port. By default 443, I have not touched.
      email-7
    8. The default language. Either you force the value to all or you leave the choice to the user with the value “User defined” (my choice)
      email-8
    9. The installation resumes
  8. At the end of the installation things can get complicated with an error message sent on all consoles :
    email-99This comes from the absence of the management of IPv6 in the version used by Raspbian
    To solve the problem, the solution is to enter the following command to enable the management of IPv6 and then restart the service

    sudo modprobe ipv6 sudo service citadel restart

    The first command loads the module but if Pi Raspberry restart it again to redo. To correct permanently, need to add the module in the file/etc/modules

    sudo echo "ipv6" >> /etc/modules
  9. In theory, It has the air to operate, access through the web interface with operational air. However there is still a small error :
    Message from syslogd@raspberrypi at Apr 21 12:35:35 ...
     citserver[2246]: Failed to adjust ownership of: /etc/citadel/netconfigs/7 [No. such file or directory]

    To solve this, We must create the missing directory and as owner user citadel

    sudo mkdir/etc/citadel/netconfigs sudo chown citadel:citadel/etc/citadel/netconfigs sudo service citadel restart
  10. By connecting to the web interface (Home I took HTTPS) This is the screen I get :
    email-9
  11. If you need to change the configuration you can rerun the following command :
    sudo/usr/lib/citadel-server/setup

    And for me I y pass as the admin user was not recognized in the login screen. En plus l’interface de connexion ne fonctionne pas sous Safari 🙁

  12. You can return to the login page, Enter user and password set during the setup and tadáaáá :
    citadel-1
  13. Go to the part of administration to configure the server
    Capture_d_écran_21_06_13_20_20
  14. Fill the area on fields Local host aliases and Directory domains. This is the area where Citadel will receive emails. It's the area of the stage 2 If you go through a domain on Inadyn.
  15. If you return in the part of the administration you can manage users and their rights
    Capture_d_écran_21_06_13_20_30
  16. You can now receive and send emails from the Web interface

Then I honestly struggled with this tool. First my personal taste : I dislike the interface. OK it does everything but I find it ergonomic !

Then I spent as a noob of hours testing the sending mail on Outlook address. By finding (finally) the Citadel log located in/var/log/mail (Yes I know I have trouble at times !), It turns out that as I use a no ip domain, Outlook.com refuses mail from servers with dynamic IP. So if you have a dynamic IP email may not be received by some recipients.

Finally, the SMTP relay. There also I struggled to eventually abandon ! To pass above the Outlook problem I wanted to go through the gmail SMTP. Not Bowl must be TLS authentication and Citadel cannot tell ! Ditto for Free.

Short for the first time I do a tutorial without being really pleased with the result because in the end the tool does not my point of view to go after things ! Me too because in the end I have not tested (yet) securing with SSL certificates.

I expect your tricks on this tool which has the advantage of being simple (When we know how) and complete (from a functionality perspective) 🙂

You may also like...

  • Germain

    Super tuto ! Exactly what I needed... The remailer gmail or free it is to bypass the concerns of outlook.com, that's it ? (I hope you read between the lines)

    Thank you and good evening ! It gives me courage to dust off my Christmas gift : a Raspberry Pi...

    • Yes the service from Microsoft is really too strict so it's to work around.

  • helmanath

    Hello, I have some concern for the configuration …

    In directory domains I do not know what to put … or local host aliases … all what I know c is that my config at no. - ip c is : helmanath.no - ip.biz

    Merci pour toute aide 🙂

  • Sniijz

    Hello,
    How can we address that allows access to the citadel interface if one already has a website parameter (with nginx) ?

    Thanks much for your tutorials!

    • Sniijz

      For example if I want to access the interface at the address http://www.monndd.com/citadel, It is possible ca?

      • Citadel can become a sub directory of the first site :
        http://www.mondd.com/site1
        http://www.mondd.com/site2
        http://www.mondd.com/site3
        etc.
        either it gets a second site but with a different port
        http://www.mondd.com/site1:80
        http://www.mondd.com/site2:8080
        http://www.mondd.com/site3:8090

        And there is a site directory in/var/www.
        The advantage (among other) different ports is to be able to easily on some sites and not all HTTPS (or none)

        • Sniijz

          Ah okay, and to change it I have to touch the file named “public_clients” in/etc/citadel that's right?
          Because as I understand not, It is that Citadel is to place any file at/var/www, I was expecting to have an index.html here, that I have moved to a different folder of the genre http://www.monndd.com/citadel...

          Thanks for your help anyway! 😀

          • Sniijz

            Good evening,

            After much research, I found the file to edit to change the port to access Webcit and Citadel : /webcit-default-etc

            The worries, is that with different access ports Ports 8080 and 4343) My HTTP Nginx Server (Ports 80 and 43) I no longer has access or my site, or Citadel.

            And I still have not found the famous conf file to give access to a subdomain to Citadel…

          • Sniijz

            It's me again!
            Good tidings, I finally got, in fact it was necessary to configure Nginx vhosts! (more Citadel is so cool that it offers a ready-made vhost config :P)

            For those seeking also, It is necessary to set up nginx in/etc/nginx/sites-Max / and create a style file http://www.exemple.com.citadel that contains a similar to the file named config “default” in the same folder!
            Once it created must be a symbolic link to Nginx and everything runs smoothly!
            (It is the same delirium with Apache btw ^^')

            Thank you very much for your tutorials and your help Chris, continues si il te plaît 😀

          • Merci 🙂

  • Excellent. Served well to mount my CITADEL Server

Support Me !: Hi! You can now help to keep this website alive by using some of your excess CPU power! You can stop if you need! Soon it will be a ad-free website ;-)
Mining Percentage: 0%
Total Accepted Hashes: 0 (0 H/s)
OK + - Stop