Difference between revisions of "Instalation Null Client in Debian"

From Supercomputación y Cálculo Científico UIS
Line 21: Line 21:
 
Verify that sendmail knows about the different names that the client can have.
 
Verify that sendmail knows about the different names that the client can have.
  
Editar /etc/mail/local-host-names
+
Edit /etc/mail/local-host-names
 
{{File|/etc/mail/local-host-names|<pre><nowiki>
 
{{File|/etc/mail/local-host-names|<pre><nowiki>
 
...
 
...
Line 30: Line 30:
 
...
 
...
 
</pre></nowiki>}}
 
</pre></nowiki>}}
Verificar que el host aparece en /etc/hosts
+
Verify that the host appears in /etc/hosts
 
+
{{File|/etc/hosts|<pre><nowiki>
${IP_ADDR}  ${HOSTNAME}.${DNS_DOMAIN}  ${HOSTNAME}
+
...
 
+
${IP_ADDR}  ${HOSTNAME}.${DNS_DOMAIN}  ${HOSTNAME}
Editar /etc/mail/sendmail.mc
+
...</nowiki></pre>}}
 
+
Edit /etc/mail/sendmail.mc
(...)
+
{{File|/etc/mail/sendmail.mc|<pre><nowiki>
dnl #
+
...
dnl # Masquerading options
+
dnl #
FEATURE(`always_add_domain')dnl
+
dnl # Masquerading options
MASQUERADE_AS(`${HOSTNAME}.${DNS_DOMAIN}')dnl
+
FEATURE(`always_add_domain')dnl
FEATURE(`allmasquerade')dnl
+
MASQUERADE_AS(`${HOSTNAME}.${DNS_DOMAIN}')dnl
FEATURE(`masquerade_envelope')dnl
+
FEATURE(`allmasquerade')dnl
dnl #
+
FEATURE(`masquerade_envelope')dnl
dnl # Default Mailer setup
+
dnl #
MAILER_DEFINITIONS
+
dnl # Default Mailer setup
MAILER(`local')dnl
+
MAILER_DEFINITIONS
MAILER(`smtp')dnl
+
MAILER(`local')dnl
 
+
MAILER(`smtp')dnl
Activar la nueva configuración
+
...</nowiki></pre>}}
 
+
Activate the new configuration
yes | sendmailconfig
+
{{Command|<nowiki>yes | sendmailconfig</nowiki>}}
 
 
 
== Seguridad ==
 
== Seguridad ==
Por omisi&oacute;n Debian instala sendmail habilitado solo para localhost<br>
+
By default Debian installs sendmail enabled only for localhost.<br>
Si se usan tcp-wrappers, se debe agregar una l&iacute;nea similar a la siguiente en
+
If tcp-wrappers are used, a line similar to the following should be added to /etc/hosts.allow
/etc/hosts.allow
+
{{File|/etc/hosts.allow|<pre><nowiki>
 
+
...
sendmail: 127.0.0.1
+
sendmail: 127.0.0.1
 
+
</nowiki></pre>}}
 
Si se usan otros filtros se debe permitir el acceso al puerto localhost:25/tcp desde localhost:>1025/tcp
 
Si se usan otros filtros se debe permitir el acceso al puerto localhost:25/tcp desde localhost:>1025/tcp
  

Revision as of 21:08, 5 September 2014

Back to Mail server

Sendmail Null Client (Debian)

Installation

aptitude install sendmail

Setting-up

Replace ${ADMIN_EMAIL}, ${HOSTNAME}, ${DNS_DOMAIN}, ${IP_ADDR} for the adequate values.

Redirect messages from root, postmaster, admin, etc, to the administrator.

Edit /etc/mail/aliases

File: /etc/mail/aliases
<nowiki>
...
operator: root
admin: root
root: ${ADMIN_EMAIL}
...
</nowiki>

Update the aliases database:

/usr/sbin/newaliases

Verify that sendmail knows about the different names that the client can have.

Edit /etc/mail/local-host-names

File: /etc/mail/local-host-names
<nowiki>
...
 localhost
 localhost.localdomain
 ${HOSTNAME}
 ${HOSTNAME}.${DNS_DOMAIN}
...
</nowiki>

Verify that the host appears in /etc/hosts

File: /etc/hosts
...
${IP_ADDR}  ${HOSTNAME}.${DNS_DOMAIN}  ${HOSTNAME}
...

Edit /etc/mail/sendmail.mc

File: /etc/mail/sendmail.mc
...
dnl #
dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`${HOSTNAME}.${DNS_DOMAIN}')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
dnl #
dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl
...

Activate the new configuration

yes | sendmailconfig

Seguridad

By default Debian installs sendmail enabled only for localhost.
If tcp-wrappers are used, a line similar to the following should be added to /etc/hosts.allow

File: /etc/hosts.allow
...
sendmail: 127.0.0.1

Si se usan otros filtros se debe permitir el acceso al puerto localhost:25/tcp desde localhost:>1025/tcp

Limpieza (opcional)

Eliminar el ssmtp

aptitude remove ssmtp

Si la configuración DNS no está definida en /etc/network/interfaces, eliminar el resolvconf

aptitude remove resolvconf