--- Marco Aurelio <[EMAIL PROTECTED]>
escreveu: > Ol� pessoal..
> Bom, j� estou h� algum tempo tentando habilitar o
> Auth + TLS no sendmail.
> J� consegui chegar � seguinte situa��o:
> ====
> [EMAIL PROTECTED]:~# telnet localhost 25
> Trying 127.0.0.1...
> Connected to localhost.
> Escape character is '^]'.
> 220 phantom.domain.com.br ESMTP
> ehlo localhost
> 250-phantom.domain.com.br Hello IDENT:[EMAIL PROTECTED]
> [127.0.0.1], pleased to
> meet you
> 250-ENHANCEDSTATUSCODES
> 250-PIPELINING
> 250-8BITMIME
> 250-SIZE 15000000
> 250-DSN
> 250-ETRN
> 250-AUTH LOGIN PLAIN
> 250-STARTTLS
> 250-DELIVERBY
> 250 HELP
> =========
>
> 1. Estou utilizando esta��es M$ (Outlook Express),
> quando configuro no
> OutlookExpress
> para "My Server Requires Authentication" a� tento
> enviar um mail, fica
> pedindo a senha
> e n�o aceita a mesma.
> Q: Algu�m poderia me ajudar nisso ? J� consegui
> fazer isso, mas com RH, no
> Slack n�o est� rolando.
>
> 2. Quando configuro no OutlookExpress "This Server
> Requires a Secure
> Connection (SSL)" isto est� funcionando,
> quando envio um e-mail ele pede para aceitar o
> certificado e beleza....o
> e-mail � enviado sem problemas..
>
> 3. Gostaria que a conex�o POP tamb�m fosse sobre SSL
> ou "Log on User Secure
> Password Authentication", por�m n�o est� rolando.
> Talvez eu tenha que habilitar aqui algo como POP3S,
> correto ? N�o adianta eu
> ter o SMTP seguro e o POP aberto, a senha de vai
> trafegar em clear...
> Q: Algu�m poderia me ajudar com isso tamb�m ?
>
> Desde j� agrade�o a todos...
>
> Grande Abra�o
>
> Marco
>
>
> --
> GUS-BR - Grupo de Usu�rios Slackware - BR
> http://www.slackwarebrasil.org/
>
http://www.linuxmag.com.br/mailman/listinfo/slack-users
=====
Ricardson Williams
______________________________________________________________________
Yahoo! Messenger - Fale com seus amigos online. Instale agora!
http://br.download.yahoo.com/messenger/
ADICIONANDO SUPORTE A AUTH e TLS NO SENDMAIL DO SLACKWARE 9.1
Autor: Ricardson Williams
Email: [EMAIL PROTECTED]
OBS: Eh necessario ter instalado os pacotes do sendmail, sendmail-cf, openssl e
openssl-solibs
1) Baixe os programas Sendmail e Cyrus-sasl:
wget ftp://ftp.sendmail.org/pub/sendmail/sendmail.8.12.11.tar.gz
wget ftp://ftp.andrew.cmu.edu/pub/cyrus-mail/cyrus-sasl-1.5.28.tar.gz
2) Descomprima os pacotes:
$ cd /root
$ tar -xzf cyrus-sasl-1.5.28.tar.gz
$ tar -xzf sendmail.8.12.9.tar.gz
3) Vamos a instalacao do cyrus-sasl:
$ cd cyrus-sasl-1.5.28
$ ./configure --enable-login
$ make
$ make install
(a linha abaixo � necessaria para leitura de bibliotecas do sasl pelo sendmail)
ln -s /usr/local/lib/*sasl* /usr/lib/
Agora vamos a configuracao:
$ cd /usr/lib/sasl
$ vi Sendmail.conf (isso mesmo, S com letra maiuscula)
cd
Agora insira no Arquivo Sendmail.conf a seguinte linha: pwcheck_method: shadow
Nao se esqueca que a distancia entre o ":" e a palavra shadow � um TAB.
Agora que o cyrus-sasl esta configurado vamos para o sendmail.
$ cd sendmail-8.12.10
$ cd devtools/Site
$ vi site.config.m4
Dentro do arquivo site.config.m4 insira as seguintes linhas:
APPENDDEF(`confMAPDEF', `-DNEWDB -DSTARTTLS -DTCPWRAPPERS -DNIS -DMAP_REGEX')
APPENDDEF(`confLIBS', `-lnsl -lssl -lcrypto -lwrap -lm -ldb -lresolv')
APPENDDEF(`confENVDEF', `-DSASL')
APPENDDEF(`conf_sendmail_LIBS', `-lsasl')
APPENDDEF(`confLIBDIRS', `-L/usr/lib/sasl')
APPENDDEF(`confINCDIRS', `-I/usr/local/include')
Agora que voce ja criou o site.config.m4 vamos as configuracoes do Sendmail:
Supondo que voce ainda esteje dentro do diretorio sendmail-8.12.9/devtools/Site,
digite:
$ cd /root
$ vi sendmail-slackware-tls.mc
Abaixo tem um exemplo que foi utilizado.(aconselho que use este exemplo)
include(`/usr/share/sendmail/cf/m4/cf.m4')
VERSIONID(`TLS supporting setup for Slackware Linux')dnl
OSTYPE(`linux')dnl
dnl#
dnl# You will need to create the certificates below with OpenSSL first:
define(`confCACERT_PATH', `/etc/mail/certs/')
define(`confCACERT', `/etc/mail/certs/cacert.pem')
define(`confSERVER_CERT', `/etc/mail/certs/sendmail.pem')
define(`confSERVER_KEY', `/etc/mail/certs/sendmail.pem')
define(`confCLIENT_CERT', `/etc/mail/certs/sendmail.pem')dnl
define(`confCLIENT_KEY', `/etc/mail/certs/sendmail.pem')dnl
#dnl AUTH
define(`confAUTH_MECHANISMS', `LOGIN DIGEST-MD5 CRAM-MD5 PLAIN')
TRUST_AUTH_MECH(`LOGIN DIGEST-MD5 CRAM-MD5 PLAIN')
#Denial of Services Attacks
define(`confMAX_DAEMON_CHILDREN', `30')dnl
define(`confCONNECTION_RATE_THROTTLE', `2')dnl
define(`confMAX_RCPTS_PER_MESSAGE', `300')dnl
define(`confBAD_RCPT_THROTTLE', `2')dnl
dnl# These settings help protect against people verifying email addresses
dnl# at your site in order to send you email that you probably don't want:
define(`confPRIVACY_FLAGS', `goaway')dnl
dnl# Uncomment the line below to send outgoing mail through an external server:
dnl define(`SMART_HOST',`mailserver.example.com')
dnl# No timeout for ident:
define(`confTO_IDENT', `0')dnl
dnl# Enable the line below to use smrsh to restrict what sendmail can run:
dnl FEATURE(`smrsh',`/usr/sbin/smrsh')dnl
dnl# See the README in /usr/share/sendmail/cf for a ton of information on
dnl# how these options work:
define(`confSMTP_LOGIN_MSG',`mail.$m')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`use_ct_file')dnl
FEATURE(`mailertable',`hash -o /etc/mail/mailertable.db')dnl
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable.db')dnl
FEATURE(`access_db', `hash -T<TMPF> /etc/mail/access')dnl
FEATURE(`blacklist_recipients')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`redirect')dnl
dnl# Turn this feature on if you don't always have DNS, or enjoy junk mail:
dnl FEATURE(`accept_unresolvable_domains')dnl
EXPOSED_USER(`root')dnl
dnl# Also accept mail for localhost.localdomain:
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
Criando os Certificados TLS.
mkdir -p /etc/mail/certs
cd /etc/mail/certs
openssl req -new -x509 -keyout cakey.pem -out cacert.pem -days 365
openssl req -nodes -new -x509 -keyout sendmail.pem -out sendmail.pem -days 365
openssl x509 -noout -text -in sendmail.pem
chmod 600 sendmail.pem
Agora vamos regerar os binarios do sendmail com suporte a AUTH e TLS.
$ cd /root/sendmail-8.12.10/cf/cf
$ cp /root/sendmail-slackware-tls.mc sendmail.mc
$ sh Build install-cf
$ cd ../..
$ sh Build all
$ sh Build install
Agora � s� reiniciar o sendmail:
$ /etc/rc.d/rc.sendmail restart
Para testar seu sendmail com autenticacao, basta executar o comando abaixo:
$ sendmail -d0.1 -bv root
$ Version 8.12.10
Compiled with: DNSMAP LOG MAP_REGEX MATCHGECOS MIME7TO8 MIME8TO7
NAMED_BIND NETINET NETUNIX NEWDB NIS PIPELINING SASL SCANF
STARTTLS TCPWRAPPERS USERDB XDEBUG
============ SYSTEM IDENTITY (after readcf) ============
(short domain name) $w = teste
(canonical domain name) $j = teste.tux.org
(subdomain name) $m = tux.org
(node name) $k = teste
========================================================
root... deliverable: mailer local, user root
Vefirique se existem as opcoes "SASL" e "STARTTLS".
entao eh isso..estamos com o nosso sendmail com suporte a autenticacao e suporte ssl.
--
GUS-BR - Grupo de Usu�rios Slackware - BR
http://www.slackwarebrasil.org/
http://www.linuxmag.com.br/mailman/listinfo/slack-users