Difference between revisions of "Instalation Null Client in Debian"
Line 5: | Line 5: | ||
{{Command|<nowiki>aptitude install sendmail</nowiki>}} | {{Command|<nowiki>aptitude install sendmail</nowiki>}} | ||
== Setting-up == | == Setting-up == | ||
− | Replace ${ADMIN_EMAIL}, ${HOSTNAME}, ${DNS_DOMAIN}, ${IP_ADDR} for the adequate values. | + | 1. Replace ${ADMIN_EMAIL}, ${HOSTNAME}, ${DNS_DOMAIN}, ${IP_ADDR} for the adequate values. |
− | Redirect messages from root, postmaster, admin, etc, to the administrator. | + | 2. Redirect messages from root, postmaster, admin, etc, to the administrator. |
Edit /etc/mail/aliases | Edit /etc/mail/aliases | ||
Line 19: | Line 19: | ||
Update the aliases database: | Update the aliases database: | ||
{{Command|<nowiki>/usr/sbin/newaliases</nowiki>}} | {{Command|<nowiki>/usr/sbin/newaliases</nowiki>}} | ||
− | Verify that sendmail knows about the different names that the client can have. | + | 4. Verify that sendmail knows about the different names that the client can have. |
Edit /etc/mail/local-host-names | Edit /etc/mail/local-host-names | ||
Line 50: | Line 50: | ||
MAILER(`smtp')dnl | MAILER(`smtp')dnl | ||
...</nowiki></pre>}} | ...</nowiki></pre>}} | ||
− | Activate the new configuration | + | 5. Activate the new configuration |
{{Command|<nowiki>yes | sendmailconfig</nowiki>}} | {{Command|<nowiki>yes | sendmailconfig</nowiki>}} | ||
== Seguridad == | == Seguridad == | ||
Line 59: | Line 59: | ||
sendmail: 127.0.0.1 | sendmail: 127.0.0.1 | ||
</nowiki></pre>}} | </nowiki></pre>}} | ||
− | + | If different filters are used, it's necessary to allow the access to the port localhost:25/tcp from localhost:1025/tcp | |
− | |||
== Limpieza (opcional)== | == Limpieza (opcional)== | ||
− | + | Remove ssmtp | |
− | + | {{Command|<nowiki>aptitude remove ssmtp</nowiki>}} | |
− | + | If the DNS setup isn't defined in /etc/network/interfaces, remove resolvconf | |
− | + | {{Command|<nowiki>aptitude remove resolvconf</nowiki>}} | |
− | |||
− |
Revision as of 21:16, 5 September 2014
Back to Mail server
Sendmail Null Client (Debian)
Installation
Setting-up
1. Replace ${ADMIN_EMAIL}, ${HOSTNAME}, ${DNS_DOMAIN}, ${IP_ADDR} for the adequate values.
2. Redirect messages from root, postmaster, admin, etc, to the administrator.
Edit /etc/mail/aliases
<nowiki> ... operator: root admin: root root: ${ADMIN_EMAIL} ...</nowiki>
Update the aliases database:
4. Verify that sendmail knows about the different names that the client can have.
Edit /etc/mail/local-host-names
<nowiki> ... localhost localhost.localdomain ${HOSTNAME} ${HOSTNAME}.${DNS_DOMAIN} ...</nowiki>
Verify that the host appears in /etc/hosts
... ${IP_ADDR} ${HOSTNAME}.${DNS_DOMAIN} ${HOSTNAME} ...
Edit /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 ...
5. Activate the new configuration
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
... sendmail: 127.0.0.1
If different filters are used, it's necessary to allow the access to the port localhost:25/tcp from localhost:1025/tcp
Limpieza (opcional)
Remove ssmtp
If the DNS setup isn't defined in /etc/network/interfaces, remove resolvconf