[FUG-BR] Qmail - quase desisitindo e mudando para postfix
Willien Carvalho Fernandes
willien.fernandes em lidertel.com.br
Quinta Março 1 13:07:57 BRT 2007
tenho um tutorial que fiz aki com colegas da consultoria, de
qmail+mysql+vpopmail
da uma comparada com o do fug pois tem algumas confs que utilizei de la.
## QMAIL ##
## ATUALIZAR PORTS ##
portsnap fetch
portsnap extract
#####################
## INSTALAR APACHE 2.0 ##
# cd /usr/ports/www/apache20
# make install clean
## colocar no rc.conf ##
apache2_enable="YES"
#########################
## INSTALAR PHP5 ##
192.168.1.2
# cd /usr/ports/lang/php5
# make config
(Habilitar [X] APACHE)
# make install clean
# cd /usr/ports/lang/php5-extensions
# make config
(Habilitar BZ2, FTP, GD, MBSTRING, MYSQL, SNMP, ZIP, ZLIB )
# make install clean
##########################
## MYSQL ##
# cd /usr/ports/databases/mysql50-server
# make install all clean BUILD_OPTIMIZED=yes BUILD_STATIC=yes
# mkdir -p /home/databases/mysql
# chown -R mysql:wheel /home/databases/mysql
** Incluir no /etc/rc.conf **
mysql_enable="YES"
mysql_dbdir="/home/databases/mysql"
** reiniciar o servidor **
# mysqladmin -u root password 'senha_do_MYSQL'
# cp /usr/local/share/mysql/my-medium.cnf /home/databases/mysql/my.cnf
######################################################################
## QMAIL ##
$ cd /usr/ports/qmail
$ make config (Selecionar tudo menos o rclink)
$ make install all clean
$ echo "OPTIONAL_MANPATH /var/qmail/man" >> /etc/manpath.config
$ cd /var/qmail/configure
$ ./config-fast $NOME_DO_SERVIDOR
########################################################################
PAREI DEPOIS DO VPOPMAIL
## VPOPMAIL ##
mkdir /home/vpopmail
criar um link simbolico do diretório /home/vpopmail para /usr/local/vpopmail
# cd /usr/ports/mail/vpopmail
# make install clean WITH_MYSQL=yes WITH_MYSQL_SERVER=localhost
WITH_MYSQL_USER=vpopmail WITH_MYSQL_PASSWD=vpopmail
WITH_MYSQL_DB=vpopmail WITH_SUID_VCHKPW=yes PREFIX=/home/vpopmail
create database vpopmail;
Instalar o UCSPI
#######################################################################
$ cd /usr/ports/mail/courier-imap
$ make install all clean
OBS:
$ cd /usr/ports/sysutils/daemontools
$ make install all clean
echo "# Configuracao QMAIL" >> /etc/rc.conf
echo "courier_imap_imapd_enable="'"'"YES"'"' >> /etc/rc.conf
echo "courier_imap_pop3d_enable="'"'"YES"'"' >> /etc/rc.conf
echo "svscan_enable="'"'"YES"'"' >> /etc/rc.conf
echo "courier_authdaemond_enable="'"'"YES"'"' >> /etc/rc.conf
echo "# Fim configuracao QMAIL" >> /etc/rc.conf
$ mkdir -p /var/service
$ mkdir -p /var/qmail/supervise/qmail-smtpd/log
$ mkdir -p /var/qmail/supervise/qmail-send/log
$ mkdir -p /var/log/qmail/smtpd
$ mkdir -p /var/log/qmail/send
################################################
# Arquivo /var/qmail/supervise/qmail-smtpd/run #
################################################
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g qmaild`
exec /usr/local/bin/softlimit -m 40000000 \
/usr/local/bin/tcpserver \
-v -x /home/vpopmail/etc/tcp.smtp.cdb \
-c 30 -R -u "$QMAILDUID" -g "$NOFILESGID" 0 smtp \
/usr/local/bin/rblsmtpd -t 5 -b -C \
-r list.dsbl.org \
/var/qmail/bin/qmail-smtpd $NOME_DO_SERVIDOR \
/home/vpopmail/bin/vchkpw /usr/bin/true 2>&1
################################################
# Fim do Arquivo #
################################################
####################################################
# Arquivo /var/qmail/supervise/qmail-smtpd/log/run #
####################################################
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t s10000000 \
n30 /var/log/qmail/smtpd
################################################
# Fim do Arquivo #
################################################
################################################
# Arquivo /var/qmail/supervise/qmail-send/run #
################################################
192.168.1.2
#!/bin/sh
exec env - PATH="/var/qmail/bin:$PATH" qmail-start ./Maildir/
################################################
# Fim do Arquivo #
################################################
###################################################
# Arquivo /var/qmail/supervise/qmail-send/log/run #
###################################################
#!/bin/sh
exec /usr/local/bin/setuidgid qmaill /usr/local/bin/multilog t \
s10000000 n30 /var/log/qmail/send
################################################
# Fim do Arquivo #
################################################
$ cd /var/service
$ ln -s /var/qmail/supervise/qmail-smtpd .
$ ln -s /var/qmail/supervise/qmail-send .
r$ty&u89k%
$ cd /usr/ports/mail/simscam
$ make config (selecionar tudo menos PASSTHRU)
$ make install all clean
$ cd /usr/ports/security/clamav
$ make install all clean
echo "clamav_freshclam_enable="'"'"YES"'"'
echo "clamav_clamd_enable="'"'"YES"'"'
192.168.1.1
#######################################
# Arquivo /home/vpopmail/etc/tcp.smtp #
#######################################
127.0.0.1:allow,RELAYCLIENT=""
192.168.0.:allow,RELAYCLIENT="",QMAILQUEUE="/var/qmail/bin/simscan"
:allow,QMAILQUEUE="/var/qmail/bin/simscan"
# Alterar em /usr/local/etc/clamd.conf
User clamav
# para
User root
# Gerar o DB do SIMSCAN (os dois comandos!)
/var/qmail/bin/simscanmk
/var/qmail/bin/simscanmk -g
$ cd /usr/ports/mail/qmailadmin
$ make install all clean CGIBINDIR=www/cgi-bin WEBDATADIR=www/data
Hermann T. Ribeiro wrote:
> Caros,
>
> configurei o qmail segundo tutorial postado no site da fug, mas depois
> de ter criado domínio: empresa.com.br e usuário
> administrador em empresa.com.br não consigo sequer enviar um email via
> thunderbird. O erro é o clássico "não consigo conectar com
> smtp.empresa.com.br". Já estou quase optando pelo postfix e seguindo
> outro tutorial, mas ainda tenho esperanças de conseguir entender o
> qmail, alguém poderia me auxiliar neste embate ?
>
> Grato,
>
> H.
>
> -------------------------
> Histórico: http://www.fug.com.br/historico/html/freebsd/
> Sair da lista: https://www.fug.com.br/mailman/listinfo/freebsd
>
>
Mais detalhes sobre a lista de discussão freebsd