General presentation
List tools available to date:
Filtering the mails from the server
- filtradr
Syntax: filtradr [-t trace_file] configuration_file
Destroy the mails of certain shippers identified by:
- their complete address,
- the address of a supplier of access @supplier_name,
- a generic address with variable parts.
The addresses to be refused are memorized in the refus_adrfile
located in the root directory of the mailer (4th line of the
configuration file).
The generic addresses call upon the following metacharacters:
- [....]
a series of characters fixed length, each character between [ ],
could be of a different type:
- a means that one will have to find a letter with this position
of the address,
- 9 means that one will have to find a figure at this place,
- x means that any character is accepted.
- a+ , 9+ or x+
a series of one or several letters, figures or characters
unspecified will be at this place (before the next fix
part of the address)
- a* , 9* or x*
idem with the preceding case except that this series of characters
of the type indicated is optional.
By default, the list of the shippers of mails which one destroys the
messages is not preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the addresses of shipper
(declared) of these malls and the date of their destruction.
- filtresujet
Syntax: filtresujet [-(o|O)] [-t trace_file] configuration_file
Destroy the malls of which of subject contains character strings
refused.
The character strings which one does not want to see appearing in the
subjects of the mails are memorized in the refus_sujet file
located in the root directory of the mailer (4th line of the
configuration file).
The syntax of the lines of heading of the mails (of which the one
containing the subject) imposes the use encodings for the special
characters, like accentuated characters. By default, the subjects of
the mails are examinated after conversion of these special characters.
The option -O makes it possible to examine the Original character
strings before conversion.
With the option -o, the original character strings and the
converted strings are both tested.
By default, the list of the mails which one refuses the subject is not
preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the subjects of these mails
and the date of their destruction.
- filtredest
Syntax: filtredest [-(o|O)] [-t trace_file] configuration_file
Destroy the mails which one refuses the recipient.
This order is interesting for the spams when the same mail is sent to
several recipients having addresses alphabetically close.
The character strings which one does not want to see appearing as
recipient of the mails are memorized in the file refus_dest file
located in the root directory of the mailer (4th line of the
configuration file).
The syntax of the lines of heading of the mails (of which the one
containing the recipient) imposes the use encodings for the special
characters, like accentuated characters. By default, the recipients of
the mails are examinated after conversion of these special characters.
The option -O makes it possible to examine the Original character
strings before conversion.
With the option -o, the original character strings and the
converted strings are both tested.
By default, the list of the mails which one refuses the recipient is
not preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the recipients of these mails
and the date of their destruction.
- filtrechamp
Syntax: filtrechamp field_name [-(o|O)] [-f fich_liste] [-t trace_file]
configuration_file
Destroy the mails whose field name field contains character strings
refused.
It acts of an order generic than the 2 preceding ones.
The character strings which one does not want to see appearing in the
field_name field are memorized by defect in the file
refus_field_name located in the root directory of the mailer
(4th line of the configuration file).
It is possible to specify another file using the option -f.
By default, this file is recovered in the root directory of the
transport, unless an absolute access path is not specified, or
relative to this directory.
The syntax of the lines of heading of the mails imposes the use of
encodings for the special characters, among which accentuated characters.
By default, the selected fields are examinated after conversion of these
special characters.
The option -O makes it possible to examine the Original character
strings before conversion.
With the option -o, the original character strings and the
converted strings are both tested.
By default, the list of the mails which one filters starting from a
field is not preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the field name field of these
mails and the date of their destruction.
- selhtm
Syntax: selhtm configuration_file file_liste1 file_liste2
Analyze the header of the mails and memorizes in 2 distinct files:
- those of the traditional mails (with part in text mode),
- those of the mails in pure HTML.
- suphtm
Syntax: suphtm [-pd|-p prefix] [-e|-s] [-m email_answer_file]
[-t address_file] configuration_file
Destroy the mails in pure HTML (often of not requested publicities)
and try to inform their shipper (who for publicities give a false address
most of the time!).
By default, when this field exists, the warning mail is sent to the
address appearing in the Return-Path field: (address in return)
appearing in the heading of the destroyed mail, rather than to the
address of the declared shipper (From field:), who is not always the
real shipper.
But the use of the address in return can make problem if the mail
results from a discussion or diffusion list (mailling list). The
option -e makes it possible to send the warning mails to the
addresses of shippers (From field:)
By default, the warning mail is sent with the true address of
the recipient who refused the message. The problem is that some
suppliers of spams use the addresses of the messages sent in
response to spam even more!
The option -p makes it possible to add a prefix with the address
which will appear in the heading of the mail.
The prefix by defect (option -pd) is suphtm.
For example if the address of the shipper is: truc@fournisseur.fr,
the shipper appearing in the heading of the mall sent will be:
suphtm-truc@fournisseur.fr
One can put the prefix of its choice by using syntax:
suphtm -p prefix_chosen configuration_file
The option -s is a "quiet" option. No mail is sent to inform the
shippers of mails in pure HTML that their message was destroyed.
Even if this option is not ideal with the honest shippers, it can
constitute a last recourse against the morons while avoiding to let
them know that the letter-box is consulted.
The option -m makes it possible to use the file of its choice
for contents of warning emails to be sent instead of using the file
mail-suphtm.en provided with Libremail.
By defect, the list of the shippers of mails in pure HTML which one
destroys the messages is not preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the addresses of (declared)
shipper of these mails and the date of their destruction.
- listesimexped
Syntax : listesimexped [max_differences_number] configuration_file
Lists the mails whose sender's name differs of a small number of characters
from a name appearing on a list.
The list of the sender's name to test appears in the simexped
file located in the root directory of the mailer (4th line of the
configuration file).
By default, the listed emails are those whose sender's name has the
same length, but differs of one character from one of the sender's names
in the list.
If a character appears in lowercase on one side and upercase on the other,
it is not counted as a difference.
The optional parameter max_differences_number allows to list
also mails whose sender's name differs of more than one character from
one of the sender's names in the list.
- supsimexped
Syntax : supsimexped [max_differences_number] [-t trace_file]
configuration_file
Remove from the server the mails whose sender's name differs of a small
number of characters from a name appearing on a list.
As for listesimexped command, the list of the sender's name to test
appears in the simexped file located in the root directory of the
mailer (4th line of the configuration file).
By default, the removed emails are those whose sender's name has the
same length, but differs of one character from one of the sender's names
in the list.
If a character appears in lowercase on one side and upercase on the other,
it is not counted as a difference.
The optional parameter max_differences_number allows to remove
also mails whose sender's name differs of more than one character from
one of the sender's names in the list.
By default, the list of the sender's names whose messages are destroyed
is not kept.
If you wish do it, the option -t allows to choose the name of the
file that will contain the sender's field of these mails and the date
of their destruction.
- supgrosmail
Syntax: supgrosmail [-m email_answer_file] max_size configuration_file
Destroy the mails which exceed a size limit and which does not come
from a shipper authorized to send them.
The addresses of authorized shippers are memorized in the file
accept_gros located in the root directory of the mailer
(4th line of the configuration file).
The shipper of these messages is warned by a mail which is also sent
copies some with the recipient of the destroyed message.
The option -m makes it possible to use the file of its choice
for contents of warning emails to be sent instead of using the file
mail-supgros.en provided with Libremail.
With this option, it is even possible to send different messages
according to the size from the refused email. For that, the only thing
to do is to launch several successive supgrosmail commands
with different settings.
- supbcc
Syntax: supbcc [-pd|-p prefix|-s] [-m email_answer_file]
[-t trace_file] configuration_file
Destroy the mails received in hidden copy, and try to inform the shippers
of these mails.
By default, the mail of warning is sent with the true one addresses of
the shipper. The problem is that certain shippers of spams use the
addresses of the messages sent in response for spammer even more!
The option -p makes it possible to add a prefix with the address
which will appear in the heading of the generated mail.
The prefix by default (option -pd) is supbcc.
For example if the address of the shipper is: truc@fournisseur.fr,
the shipper appearing in the heading of the mail sent will be:
supbcc-truc@fournisseur.fr
A chosen prefix can be put the using syntax:
supbcc -p chosen_prefix configuration_file
The option -s is a "quiet" option. No mail is sent to inform the
shippers of mails in hidden copy that their message was destroyed.
Even if this option is not ideal with the honest shippers, it can
constitute a last recourse against the morons while avoiding letting
them know that the letter-boxes is consulted.
The option -m makes it possible to use the file of its choice
for contents of warning emails to be sent instead of using the file
mail-supbcc.en provided with Libremail.
By default, the list of the shippers of mails in hidden copy whose messages
are destroyed is not preserved.
If one wishes to do it, the option -t makes it possible to choose
the name of the file which will contain the addresses of (declared)
shipper of these mails and the date of their destruction.
- detruitmail
Syntax: detruitmail (-a|mail_number_list) configuration_file
Destroy from the server of transport the mails whose numbers are passed
as a parameter.
The mails numbers are those displayed by the command sjmails .
With the option -a, all the mails present on the server of
transport are destroyed.
If not, one can indicate one or more mail numbers to be destroyed.
If there are several mails to destroy, their numbers are separated
by , (without space between the numbers).
One can also define intervals by using the character - :
first_number-last_number
Viewing mails from the server
- comptemail
Syntax: comptemail [-n] configuration_file
Display the number of mails present on the transport server.
By defect, a sentence indicates the number of mails present.
With the option -n posting is limited to a number.
- sjmails
Syntax: sjmails [-(s|e|d [nb_lines_messages])] [-w width]
[-i] configuration_file
Display the characteristics of all the mails present on the server.
3 views are available:
- -d option : display extended on several lines with possibility of
seeing the beginning of the message,
- -s option : simplified display of one line for each mail,
- -e option : simplified display of one line for each mail, the
address of the shipper is displayed in the place of
its name.
The default view is the one of the -s option.
In the simplified view (options -s and -e), the displayed lines
contain by default 80 characters. The option -w allows
to modify the number of characters per lines.
By default, the mails are sorted in the order of their arrival on
the server of transport. With the option -i they are sorted
from the last arrived to the first one.
- voirmail
Syntax: voirmail [-(h|H|b|B)] mail_number configuration_file
Display the contents of a mail present on the server.
If a field of the header (in particular To: and Cc:) occupy several
lines, only the first line will be displayed. The downloading of the
mail will make it possible to see this field in entirety.
If the e-mail includes several sections, this command displays the
text of the e-mail and the names of the attached files.
By default, when the mail is available both in text version (text/plain)
and in html version (text/html), the version text/plain that is
displayed.
Four options allow to display the text/html section after doing
several changes to make the content more readable.
- The option -h displays the text/html section such as
it is in the mail.
- The option -H displays the text of the text/html section
after taking off HTML tags and converting special characters
written &...;
- The option -b displays the part of text/html section
from the tag <body ...>
- The option -B displays the text of the part of the
text/html section from the tag <body ...> after
taking off HTML tags and converting several special
characters.
The interest of the options -b and -B is to avoid to
display the list of CSS definitions which is sometimes very long
on several mails without necessarily using the majority of these
definitions later in the mail !
Contrarily to the options -h and -H , they allow
to limit the display to the most important.
If a attached filename has at least 2 extensions, or only one
extention other than .exe , and than the contents of the
file starts with the signature of achievable MS-DOS/Windows , the
indication VIRUS ? will be also displayed.
- vsourcemail
Syntax: vsourcemail mail_number configuration_file
Display the source of an email present on the server without any
processing.
Moving the mails
- deplacemail
Syntax: deplacemail [-c] [mail_number] configuration_file
Move towards another letter-box the emails on standby on the mail
server.
You can choose to move :
- all the emails (default operation)
- a particular email identified by its number
The -c makes it possible to copy the emails in the other mailbox
while keeping them in the original mailbox.
he configuration file used to connect to the first mailbox, and to send
mail to another address is a variant of the configuration file used by
the majority of the other tools of Libremail.
- deplpartaille
Syntax: deplpartaille [-c] size configuration_file
Alternative of deplacemail in which are moved the emails which exceed a
limiting size, or on the contrary which does not reach a minimal size.
- If the parameter size is positive, the emails exceeding this
size will be moved,
- If the parameter size is negative, emails smaller than
-size will be moved.
The size parameter can be expressed in bytes (default syntax) or in
Kbytes by following the numerical value of the letter k.
The -c makes it possible to copy the emails in the other
mailbox while keeping them in the original mailbox.
The configuration file is a variant also used by the command
deplacemail.
- deplpartiel
Syntax: deplpartiel [-c] [-n] field_name string configuration_file
Move the emails of the server whose field field_name contains
the character string string (default operation).
The -n makes it possible to move the emails whose field
field_name does not contain this character string.
The -c makes it possible to copy the emails in the other
mailbox while keeping them in the original mailbox.
The configuration file is a variant also used by the commands deplacemail
and deplpartaille.
Downloading of mails
- chargemail
Syntax: chargemail [-(k|d)] [mail_number] configuration_file
Download the mails of the server and memorizes them in files of name
r<number>.n (with a sequence number on 7 digits).
It is also possible to download a particular mail (identified by its
number). In this case, this mail is preserved on the server. The
mail numbers are those displayed by the command sjmails .
By default, if all the mails are downloaded, it are removed server.
If one downloads one of them, it is preserved on the server.
The option -k makes it possible to preserve downloaded mail(s)
on the server in all the cases.
The option -d allows to remove them in all the cases.
- chargepartaille
Syntax: chargepartaille configuration_file
Alternative of chargemail, more particularly intended for those which
use a traditional telephone line.
The problem at the time of a downloading of a significant list of
mails (with chargemail as with the mailers of the trade) is that in
the event of stop of transmission during the downloading, the
recovered mails remain on the server and will again be downloaded the
following time.
To avoid this problem, chargepartaille downloads initially the
smallest mails, then by increasing size, and periodically removes
server the already downloaded mails, without waiting all of them
to be downloaded.
- chargepartiel
Syntax: chargepartiel [-(k|d)] [-n] field_name field_string
configuration_file
Download the mails of the server whose field field_name contains the
character strings field_string (operation by default).
The option -n permit to download the mails whose field_name
field does not contain this character strings.
By default, the downloaded mails are removed server.
The option -k makes it possible to preserve them on the server.
The option -d has no effect (default option) and exists
only for the syntax compatibility with the chargemail command.
- chargexpedok
Syntax: chargexpedok [-(k|d)] configuration_file
Download the mails of the server coming from a shipper indexed in the
file accept_adr located in the root directory of the transport (4th
line of the configuration file).
By default, the downloaded mails are removed server.
The option -k makes it possible to preserve them on the server.
The option -d has no effect (default option) and exists
only for the syntax compatibility with the chargemail command.
- chargechampok
Syntax: chargechampok field_name [-f fich_liste] [-(k|d)]
configuration_file
Download the mails of the server whose field field_name contains
character strings indexed by defect in the fileaccept_field_name
located in the root directory of the transport (4th line of the
configuration file).
It is possible to specify another file with the option -f.
By default, this file is recovered in the root directory of the
transport, unless an absolute access path is specified, or a
relative path to this directory.
By default, the downloaded mails are removed server.
The option -k makes it possible to preserve them on the server.
The option -d has no effect (default option) and exists
only for the syntax compatibility with the chargemail command.
Tool allowing the sorting of the downloaded mails files
- entetemail
Syntax: entetemail [-m] [directory]
Displays for each mail of a directory the lines of the header
starting by a key word, preceded by the name of the file
concerned.
By default, if a field of the heading is distributed on several lines,
only the first line (including the name of the field) is displayed.
With the option -m, if a field is on several lines, all the
contents of the field is displayed.
This tool combined with grep (fgrep, egrep), sed, cut, mv, etc...
makes possible to distribute the downloaded mails files in various
directories according to their characteristics:
- shipper
- key word in the subject
- etc ...
A very complete shell file
is provided as an example.
Viewing the downloaded mails
These tools display the totality of information without additional
intervention of the operator. One can redirect the screen output
towards a file or the printer.
- sjfmails
Syntax: sjfmails [-(s|d [nb_lines_messages])] [-w width] [-i] [-(n|N)]
[directory]
Display the characteristics of the files mails present in a
particular directory.
2 views are available:
- wide display (-d option)
on several lines with possibility of seeing the beginning of the
message.
- simplified display (-s option)
a line for each mail. In this last case, the tool chooses between
the display of the shipper or the recipient according to the first
letter of the filename (leaving or entering mail).
The mails are classified by order ascending of the filenames.
In this view, the displayed lines contain by default 80 characters.
The option -w allows to modify the number of characters per
lines.
The option -n displays at the beginning of line the letter
N for the mail files whose name ends with the suffix .n
i.e. those which were not still read by the command vmailfic.
The option -N does not display the mail files whose name ends
by the suffix .n
By default, the mails are sorted by crescent numerical order of
the filenames (or by crescent ASCII order if files coming from
Microsoft Internet mail appear in the directory).
The option -i reverses the display order. The mails are
sorted by decreasing numerical order of the filenames (or by
decreasing ASCII order).
- voirfmail
Syntax: voirfmail [-(h|H|b|B)] mail_file_name
Display the contents of a particular mail file.
If the e-mail file has several sections, this command displays
the text of the e-mail and the names of the attached files.
By default, when the mail is available both in text version (text/plain)
and in html version (text/html), the version text/plain that is
displayed.
Four options allow to display the text/html section after doing
several changes to make the content more readable.
- The option -h displays the text/html section such as
it is in the mail.
- The option -H displays the text of the text/html section
after taking off HTML tags and converting special characters
written &...;
- The option -b displays the part of text/html section
from the tag <body ...>
- The option -B displays the text of the part of the
text/html section from the tag <body ...> after
taking off HTML tags and converting several special
characters.
The interest of the options -b and -B is to avoid to
display the list of CSS definitions which is sometimes very long
on several mails without necessarily using the majority of these
definitions later in the mail !
Contrarily to the options -h and -H , they allow
to limit the display to the most important.
If a attached filename has at least 2 extensions, or only one
extention other than .exe , and than the contents of the
file starts with the signature of achievable MS-DOS/Windows, the
indication the indication VIRUS ? will be also displayed.
Integrated environment for processing the mail files
These tools are displayed in page layout view. They take account of
the size of the display zone. They are conversational tools:
- the arrows and other keys make it possible to move in the text
displayed,
- these tools are called the ones the others.
- vmaildir
Syntax: vmaildir [-(c|n)] [-i] [directory]
Display the tree structure of the directories intended for the mail
files and allows:
- to select a directory (by call of vmailsj)
- to create a new mail (by call of cremail)
A display in 3 colors makes it possible to locate the directories
containing some unread mails which are displayed in intensified
brightness, and the directories not containing any email, which
appear by default in dark blue.
Environment variables libremail_bright and
libremail_dark makes it possible to change the color of
highlighted lines.
However, the analysis which does not carry that on the filenames
is less accurate than that of vmailsj .
The option -c displays on the left of directory name the
number of mail files not yet read by vmailfic (for which the
name ends with the suffix .n) and the full number of mail
files of the directory.
The option -n displays on the left of directory name only
the number of emails not yet read by vmailfic.
The option -i is not used directly by vmaildir but passed in
parameter at when vmailsj is called to reverse the display order.
Too minor defect to justify a correction:
The first time that one creates or that a mail is removed,
subdirectory (sortie or poubelle) is created. It will not appear
immediatly in the list of the displayed directories. It will be
necessary to start again vmaildir to see it.
- vmailsj
Syntax: vmailsj [-i] [directory]
Display the principal characteristics of the files mail of a
directory (a line by mail).
By default, mails are sorted by date and hour crescents. A correction
between the time zone of the email sender and the time zone of the
reader is carried out.
The option -i makes it possible to reverse the display order.
According to the nature of the mail (entering or outgoing), it is
either the shipper, or the recipient which is displayed.
One can:
- print this list of mails
- seek in the list a particular mail starting from character
strings appearing in one of the fields posted
- select a mail to examine it (call of vmailfic)
- answer, transfer it or destroy it
- modify it if it is a mail on standby sending
- add enclose files (if mail on standby of sending)
- create a new mail (call of cremail)
- recover the name of a file mail, to examine it without conversion
The not yet visualized entering mails (.n suffix) are displayed in
intensified brightness.
After the first examination, these files are displayed in normal
brightness or do not appear any more in the list if they were removed.
The environment variable libremail_new makes it possible to
specify a character to be displayed at the beginning of line for the
emails not yet visualized. It is an alternative to the intensified
brightness for the Braille terminals.
- vmailfic
Syntax: vmailfic mail_filename
Displays the contents of a mail file (text of the mail and names of
the attached files) and allows:
- to answer it (call of the tool repmail)
- to transfer it (call of the tool trsfmail)
- to remove it
the mail file is initially sent in a trash directory "poubelle".
If it is there already, this file is removed.
- to recover an e-mail appearing in the directory "poubelle".
- to print it
- to seek character strings appearing in this mail
- to modify it (authorized only for the files mail on standby of
sending).
- d'obtenir la traduction du mail (via un logiciel de traduction
automatique en ligne de commande comme Apertium).
- to join files if mail on standby of sending (call tool to
joindre)
- to extract the files joined to the mail (call of recuppj)
- to copy the complete mail, the message alone or the address of the
shipper in another file, or to add the address of the shipper
in the address book (file carnet-adr) or in the list of
the shippers
refused (file refus_adr).
- to recover the name of the file containing the mail.
- If an e-mail is multi section, one can choose to display the
text/html section instead of the text/plain section.
- When displaying a text/html section, you can choose to display
the html text as it is writen or without the html tags. You can
also choose to ignore all the html code which is before the tag
<body ...>
Recovery of attached files
This tool can be called separately or since vmailfic .
- recuppj
Syntax: recuppj mail_filename
Recover the attached files contained in a mail.
If the root of the directories of the transport is known (call since
vmaildir -> vmailsj -> vmailfic),the attached files are memorized
in:
- the directory mentioned in the file <root>/dirpj
if it exists
- the directory <root>/pjointes in the contrary case.
If the root of the directories of the transport is unknown, the
user will seize with the keyboard the destination directory of the
attached files.
The recovered filenames will not contain spaces.
Creation of mail files
These tools could be called separately or from the tools described in
the paragraph 6.
The files mails created have a name of the form e<number>
with a sequence number of 7 digits. They are memorized in the directory
sortie .
The text editor vi is used by defect.
If one prefers to use another editor, it will be enough to put
its name in the variable of environment $EDITOR.
- cremail
Syntax: cremail [emails_directory]
Creation of a mail file.
Allows to seize the subject of the mail, the message, then to select
the recipients from the address book (file carnet-adr located
in the root directory of the mailer - 4th line of the configuration
file).
One can also manually seize recipients who do not appear in the
address book.
All the types of recipients (principal, in copy and hidden copy) are
accepted.
If a file signature was created in the root transport directory,
its contents, preceded by a line by indents, is added at the end of
the text of the created mails.
- repmail
Syntax: repmail mail_filename [emails_directory]
Response to a received mail file.
The subject of the mail of answer is generated automatically.
The message is reproduced (principal fields of the header included)
with > on each line. The list of possible attached files (but not their
contents) is added at the end of the message. The possible signature
(see cremail) also appears.
One can seize the answer under editor vi or the editor mentioned
in the environment variable $EDITOR.
The choice of the recipients of the answer is done automatically
starting from a menu offering up to 9 possibilities.
- trsfmail
Syntax: trsfmail mail_filename [emails_directory]
Redirection of a mail received towards other recipients.
The subject of the transferred mail is generated automatically.
The transferred mail includes the text of the mail (in text mode)
The possible signature of the reexpeditor is not added.
One can select the recipients starting from the address book and
choose some others which do not appear in it.
- joindre
Syntax: joindre mail_filename [file_to_join]
Tool which makes it possible to add enclosures to a mail to send.
The names of the attached files can be passed in parameter or be seized
with the keyboard.
The possible spaces in the filenames are removed automatically.
Sending of mail files
- envmail
Syntax: envmail configuration_file
Send the mails present in the directory sortie and moves
the corresponding files in the directory of the mails
envoyes .
If the files mail do not comprise mention of shipper, it is added
starting from the file of configuration.
Notes
The automatic sending of mails by the tools of filtering
suphtm and supgrosmail (see in chapter 1) does not
leave a file in the directory envoyes .
The configuration file
The configuration file often mentioned in this documentation contains
6 lines:
- The name of the POP server hosting the mailbox
- user username (part of the E-mail address to the left of
the @ )
- pass the_secret_thing
- directory of the tree structure of the files mails
(receipts, to send etc...)
- the name and the address mail of the shipper
- 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 :
- lines 1 to 3 : unchanged
- line 4 : email address for the errors of copy returned
- line 5 : email address ot the recipient of the copies
- line 6 : unchanged
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:
- 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).
- Remove if required the comment of the line :
#include "clecrypt.h" in the file
pop.c .
- Recompile tools using the key of encoding:
make clecrypt
- 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:
- SMTP server name
- Optional line: port port_number
- A blank line compulsory
- Several lines indicating the messages to be sent to the
SMTP server to perform authentication
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:
smtp.tele2.fr
port 587
auth login
b64 cxu-1a2-b3c
b64 supersecret
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:
smtp.tele2.fr
port 587
auth login
Y3h1LTFhMi1iM2M=
c3VwZXJzZWNyZXQ=
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 :
- on the left side : the indication of the language of the mail or of
the kind of translation to do,
- on the right side : the command-line to run to do the translation.
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 :
- #!utf-8 (in first column) indicates that the translation software
has to use the charset UTF-8 although the computer uses a ISO-8859-1(5)
charset.
- #!iso-8859 (in first column) indicates that the translation software
has to use the charset ISO-8859-1 although the computer uses the UTF-8
charset.
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 of which it name starts with
libremail_,
- variables initialized by the tool vmaildir and used
by other tools of Libremail,
- some system variables nonspecific to Libremail.
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.
|