================================================================================ SENDMAIL en RHEL4 ================================================================================ #vi /etc/mail/local-host-names # Domains from where we *get* emails mydomain.com mail.mydomain.com email.mydomain.com #cp /etc/mail/sendmail.mc /etc/mail/sendmail.mc.default #vi /etc/mail/sendmail.mc Comment: dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA') dnl FEATURE(`accept_unresolvable_domains')dnl We set the domain name here: *mydomain.com* MASQUERADE_AS(mydomain.com)dnl From where is it possible to send emails: #vi /etc/mail/relay-domains mydomain.com mail.mydomain.com email.mydomain.com 190.40.95.95 Set who can *mail relay* #vi /etc/mail/access 192.168.1.2 RELAY 192.168.1.3 RELAY 192.168.1.4 RELAY 192.168.1.243 RELAY Compile #cd /etc/mail #make #vi /etc/aliases # Person who should get root's mail root: hugomartin #/sbin/newaliases #/sbin/service sendmail restart #/sbin/chkconfig --level 345 sendmail on #/sbin/iptables -t filter -A INPUT -p tcp -s 0/0 -d 0/0 --dport 25 -j ACCEPT SETTING POP3, IMAP ================== # vi /etc/dovecot.conf protocols = imap pop3 NOTE: Sometimes this is necessary for IPv4: imap_listen = * pop3_listen = * #/sbin/chkconfig dovecot on #/sbin/service dovecot start MAIL-RELAY ========== #vi /etc/mail/sendmail.cf # "Smart" relay host (may be null) DS <--- search for DS -> restart sendmail. ================================================================================ by Eng. Hugo Martin C. V. (SCNP) 2006 (cc) www.hackcraft.com Source: http://www.linuxparatodos.net/geeklog/staticpages/index.php?page=14-como-sendmail-corporativo