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).

< Previous               Summary               Next >