Instalando simples servidor de smtp relay com qmail

download

INSTALANDO SIMPLES SERVIDOR DE SMTP RELAY COM QMAIL…. VIA PORTS… PARA FREEBSD

############################################
Atualizar Ports

Criar um arquivo chamado ports-supfile contendo o seguinte:

###
*default host=cvsup2.br.FreeBSD.org
*default base=/usr
*default prefix=/usr
*default release=cvs tag=.
*default delete use-rel-suffix
*default compress
ports-all
###

cvsup -g -L 2 ports-supfile

cd /usr/ports/sysutil/portupgrade
make all install clean

cd /usr/ports
make fetchindex
portsdb -u

##########

Instalando Qmail pelo ports

cd /usr/ports/mail/qmail
make make WITH_QMAILQUEUE_PATCH_BARRIER=YES WITH_BIG_TODO_PATCH_BARRIER=YES WITH_BIG_CONCURRENCY_PATCH_BARRIER=YES WITH_OUTGOINGIP_PATCH_BARRIER=YES

make install
make clean

##########

Instalando o TcpServer

cd /usr/ports/sysutils/ucspi-tcp
make all install clean

##########

Acertando o Man Pages

echo “OPTIONAL_MANPATH /var/qmail/man” >> /etc/manpath.config
makewhatis

##########

Liberando os Ips que poderao utilizar o server para manda email (RELAY)

editar o /etc/tcp.smtp e incluir os ips que desejar
127.:allow,RELAYCLIENT=””
192.168.:allow,RELAYCLIENT=””
:allow,RELAYCLIENT=””

montar o db:
/usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp ########## Editar o rc.conf e incluir o seguindte: # qmail options qmail_smtp_enable=”YES” qmail_pop_enable=”NO” qmail_enable=”YES” ########## Forçar o OS a utilizar o sendmail do qmail unlink /usr/sbin/sendmail ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail ########## Configurando QMAIL cd /var/qmail/configure config-fast nome_da_maquina.dominio_o_qual_ela_faz_parte ########## Script para analizar quantidade de emails na fila /usr/local/sbin/fila ##### #!/bin/sh echo ” Analizando Quantidade de emails na fila …” echo “…” /var/qmail/bin/qmail-qstat ##### chmod 555 /usr/local/sbin/fila rehash ########## Levantando o serviço de smtp /usr/local/etc/rc.d/qmail.sh start

Deixe uma resposta