General presentation


List tools available to date:

Filtering the mails from the server


Viewing mails from the server


Moving the mails


Downloading of mails


Tool allowing the sorting of the downloaded mails files


Viewing the downloaded mails


Integrated environment for processing the mail files


Recovery of attached files


Creation of mail files


Sending of mail files


The configuration file


The configuration file often mentioned in this documentation contains 6 lines:

  1. The name of the POP server hosting the mailbox
  2. user username (part of the E-mail address to the left of the @ )
  3. pass the_secret_thing
  4. directory of the tree structure of the files mails (receipts, to send etc...)
  5. the name and the address mail of the shipper
  6. the name of the SMTP server of Internet service provider used

To sum up, the first 3 lines of the configuration file contains the information necessary to read the messages received.
The 4th row indicates where will be stored mails received or sent, and that other files to manage the inbox.
Lines 5 and 6 of the configuration file contains information needed to get the mail.

Instead of specifying the name user and/or the password (in light) in the configuration file, one can ask the operator to seize it.
In this case, the corresponding lines be like syntax:

     2.  ?user
     3.  ?pass

It is also possible to specify in the configuration file a crypted password. To avoid revealing whole or part of the key of encoding by using it 2 times, the username will remain without encoding.
In this case, line 3 will have the following syntax:

     3.  %pass the_secret_encoded_thing

Let see the following chapter for more details on the manner of proceeding.

By default, the various tools of Libremail use port 110 to communicate with the POP server and 25 to communicate with SMTP server. If your Internet provider forces to use another port to receive the emails or to send them, you can specify it in the first and the last line of the configuration file following the name of the POP server or SMTP server.
In this case, the lines concerned will have like syntax :

     1.  POP_server_name port_number
     ...
     6.  SMTP_server_name port_number

Some emails providers as Gmail force to use a software layer called SSL using cryptography for the examination and the recovery of the emails.
In this case, it is the port 995 which must be used.
To directly integrate SSL into Libremail would have resulted in to multiply by more than 10 the size of the 2/3 of the tools of Libremail. This solution was not selected. In the place, it is proposed to you to install the command stunnel and to configure it so that the data forwarding by port 995 use SSL encoding.

Some Internet providers force to use SMTP authentification to send emails. In this case, there is not need to use an additional software, but an additional file is necessary to describe the authentification phase.
The 6th line of the configuration file will then contain the path to this file preceded by the symbol >

     6.  > SMTP_authentication_file_path

See Chapter 13 for a description of the contents of the authentication file.

Alternative for the configuration file

For the majority of the commands of Libremail working with the network, the same Email address is used to receive messages and to send some. It is a basic principle of the email.
On the other hand, the commands deplacemail, deplpartaille and deplpartiel recover the emails in a letter-box to send them in another. They had been written for that !

For these 3 commands, we use an alternative of the configuration file which have the following structure :

The access to the letter-box containing the emails to be treated is done thanks to the first 3 lines of the configuration file. The emails moved or copied are sent to the address email appearing in line 5, via SMTP server indicated in line 6.
If the sending of the email to the new address does not function, the emails of error received in return are sent to the address email specified in line 4. It can be the letter-box containing the emails to be processed or of another mail box.

If one of the commands deplacemail, deplpartaille or deplpartiel is used with a traditional configuration file, (access path starting with / with line 4), an email address for the returns of error is manufactured starting from the contents of the first 2 lines of the configuration file, but without guarantee that the address email generated is valid.

Place of the configuration file

The configuration files can be anywhere on the computer. However, if they are not in the current directory, it would be necessary to indicate an absolute or relating access path to the file, which would be not very practical.

The environment variable libremail_cfg makes it possible to specify the absolute access path to the directory which will contain configuration file(s) used. Thus, it will be enough to just indicate the name of the configuration file (with or without the suffix .cfg).



Encoding of the password


To use passwords encoded in the files of configuration, one will do in the following way:

  1. Modify the include file clecrypt.h by replacing the values 0x00 which it contains by others of its choice:
    (between 0x01 and 0x1F or 1 and 31 in decimal classification).

  2. Remove if required the comment of the line :
    #include "clecrypt.h"  in the file   pop.c  .

  3. Recompile tools using the key of encoding:
        make clecrypt

  4. Only if Libremail was installed with the other commands of the operating system, update this installation :
        make install

Lastly, one will launch the command cryptepass with all the files of configuration which one wants to crypt the password (those whose 3rd line starts with %pass ).

Notice about the safety of encoding:

It acts of a simple and reversible encoding. To guarantee the confidentiality of the crypted passwords, it is recommended not to keep the file clecrypt.h and achievable cryptepass on the machine (and a fortiori on the account user) which contains the configuration file with the crypted password.

For this reason the command make install does not recopy the command cryptepass with the other commands of Libremail.

Nevertheless, without decoding the password, there will remain possible with a third person to reach the mails if she recovers at the same time the file of configuration and the commands described in chapters 2 and 4 of this documentation.

Despite everything, if the same password is used for the management of a Web site and for associated account email, this encoding will make the password less visible. The command cryptepass of Libremail or how it works, must be knowned to decrypt the password.

The SMTP authentication file


To achieve a SMTP authentication before sending mails, it is necessary to create a file with the authentication following structure:

The first few lines of the authentication describe features of the SMTP connection.

The first line contains the name of the SMTP server used by the Internet service provider to which you are connected. That would be the information of the 6th line of the configuration file if SMTP authentication was not required.

By default, the SMTP connection uses port 25. If it is necessary to use another port, it is shown in the following line under form:

          port port_number

A blank line it is necessary to indicate that the first part of authentication file is complete.

The text lines that follow contain different messages sent to the SMTP server to perform authentication.
It is a simplified athentification why it is assumed that SMTP server ask the same questions, and therefore wait always the same answers.

Messages dialogue authentication are transmitted using BASE64 encoding. To simplify the seizure of response to send, it's possible to ask Libremail to make the conversion. To this end, line to be converted will begin with the string of 4 characters "b64 " followed by the message to be sent in clear.

Example

The provider Tele2 uses in France the SMTP server smtp.tele2.fr with whom we can talk through the port 587.
Each user of the service provider must create an account whose name has the form: cxu-XXX-XXX (with a digit or a letter ta replace each X).
The "auth login" is one of the commands recognized by the Tele2 SMTP.

Suppose a user has the cxu-1a2-b3c account and he has chosen as a password supersecret (super secrecy). His SMTP authentication file can be:

It may be preferable not to let certain information in clear in the authentication file. For this, the tool convb64 lets you convert a line of text in base64 if we tape b64 at the beginning of the line, or from the base64 if the tape directly on the string to be converted.
By transforming the last 2 lines of the file authentication, would yield the following results:


The file trad-libremail


The file trad-libremail is a file that allows to interface the command vmailfic with a command-line machine translation software.

The main lines of this file have the following structure :
The left part information starts by a letter in first column. If the language name or the translation description uses several words, the _ has to be used to replace spaces.

We can separate the left and right parts of the line by as much spaces or tabs as necessary so that the file trad-libremail has a good-looking visual appearance.


Some translation machine softwares can need a particular charset to work well. For example Apertium is foreseen to work with the charset UTF-8.

It is possible to indicate this restriction in the file trad-libremail the following way :
The file trad-libremail can include blank lines and comments. Every lines not starting by a letter in column 1 or by #! are considered as comments.

Example

This example of file allows to translate the mails written in different languages to French using the free software Apertium.

    #!utf-8
    English_via_Spanish    apertium en-es | apertium es-fr
    direct_English         apertium en-fr
    English_to_Spanish     apertium en-es

    Spanish                apertium es-fr

    Catalan                apertium ca-fr

    Esperanto              apertium eo-fr

    Portuguese_via_Spanish apertium pt-es | apertium es-fr
    Portuguese_direct      apertium pt-fr
    


Environment variables of Libremail

Libremail uses 3 kinds of environment variables:

Variables defined by the user

libremail_cfg allows the user to define the directory where are the configuration files of its mails boxes.
libremail_bright allows the user to define the color to put information in obviousness by a displaying it in intensified brightness.
libremail_dark allows the user to define the color of the lines concerning the directories which do not contain any email.
libremail_new allows the user to define a character to put in first column in vmailsj to indicate the mails not yet read.
libremail_errtimeout allows the user to define the duration of display for several error messages or warnings.
libremail_xorig allows the user to define what will be displayed for the mails whose sender field From: was modified by an intermediate distributor.

Variables initialized by vmaildir or vmailsj

mailenv is initialized by the tool vmaildir and used by other tools of Libremail. It contains the directory in which the emails intended are memorized to be sent.
mailpoub is initialized by the tool vmaildir and used by vmailsj and vmailfic.
It contains the directory towards which the emails sent to the dustbin are moved.
libremail-cmd-trad is initialized by the tool vmailsj and used by vmailfic to memorize the name of the file which will contain the call of the automatic translation software of to be used to translate the email.
By using the same file for all the emails consulted from the same call of vmailsj we avoid to ask again the language of the email to the user for each consulted email.

System variables nonspecific to Libremail

EDITOR is an optional environment variable nonspecific to Libremail.
It makes it possible the user to specify the text editor of his choice to write the emails. By default, the editor vi is used.
LANG is a system environment variable which contains the language of the user. When no file deflang-libremail is present, this variable is used by Libremail to determine the display language of the messages intended for the user and the language for sending the emails generated by several filtering tools. It is useful also to choose the character set (ISO-8859-n or UTF-8) used to display texts.
PATH is a system environment variable which contains the list of access paths to the command files. It allows Libremail to find the file mess-libremail (messages which can be sent to the user) as well as contents of the emails generated by several filtering tools.