exim4
is very handy to be able to send mails from the system to send warnings, logs, etc.
will use exim4 which debian and ubuntu installed by default and that is easier to configure than sendmail. If sendmail was installed incompatibilities can occur, so it should uninstall it first.
First install exim4:
apt-get install exim4
Run the Setup Wizard:
dpkg-reconfigure exim4-config
Answering the following:
In "general mail settings" select "Internet site."
In "Name of the mail system," wrote the domain name you qualify email addresses without domain name will usually be the name of the machine, for example, "nombredemimaquina.int." We must ensure that as such is defined in / etc / hosts.
In "IP addresses on incoming SMTP connections that" write "127.0.0.1" not to accept requests from other machines.
"Other destinations for which mail is accepted" we can leave the default value, which is the name of the team.
In "Domains for which mail is forwarded to" leave the value blank.
In "Machines to relay mail" also left blank.
In "Limit the number of DNS queries" we value "No".
In "Mechanism for local mail delivery" select "mbox format."
And in "Split configuration into small files" select "No".
Now we can send mails.
Now we can configure the server to send us the internal mail to an email account.
This edit file:
/ etc / aliases
And edit / add lines as follows:
root: usuariosistema
usuariosistema: usuario@correoelectron.ico Thus
root messages to be delivered to this usuariosistema and sent to the email address you entered.
To avoid marking our mail as spam, we can use an alternative configuration to be sent through the mail our smtp server.
Edit the file:
/ etc/exim4/passwd.client
And add a line of the form:
servidor.smtp: username: password
Reconfigure exim4: dpkg
-reconfigure exim4-config
But this time the first option select "mail sent by smarthost; is received via SMTP."
answer the remaining questions as before, and when asked "IP address or computer name for the outgoing smarthost", enter the smtp server address that we will use.
In "Desire Hide local mail name in outgoing mail "tick" No ".
now deliver the mail through our SMTP server.
For the particular case of wanting to use a gmail account, we can use this tutorial .
0 comments:
Post a Comment