52108435 servidor de email postfix para ubuntu

7

Click here to load reader

Upload: carlo-seixas

Post on 26-Jul-2015

40 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 52108435 Servidor de Email Postfix Para Ubuntu

SERVIDOR DE E-MAIL

POSTFIX

Postfix é o Mail Transfer Agent (MTA) padrão do Ubuntu. Ele tenta ser rápido, fácil

de administrar e seguro. Este tutorial explica como instalar e configurar o postfix.

Abra o console do ubuntu e execute o comando abaixo para logar como usuário

root e ter as permições necessárias:

sudo -s -H

Executando esse comando irá pedir senha de usuário root, digitado a senha você

terá as permissões necessárias para modificar, instalar, etc.

Antes de começar a instalação troque a sua source list, para que todos os pacotes

para instalação estejam disponíveis:

sudo gedit /etc/apt/sources.list

Abrirá o arquivo sources.list, então substitua pela nova source list abaixo:

########## # # # # # Offical Ubuntu # # # # # ##########

deb http://us.archive.ubuntu.com/ubuntu/ intrepid main restricted

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid main restricted

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-updates main restricted

deb http://us.archive.ubuntu.com/ubuntu/ intrepid universe

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid universe

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates universe

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-updates universe

deb http://us.archive.ubuntu.com/ubuntu/ intrepid multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid multiverse

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-updates multiverse

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe

multiverse

Page 2: 52108435 Servidor de Email Postfix Para Ubuntu

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-backports main restricted universe

multiverse

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-security main restricted

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-security main restricted

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-security universe

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-security universe

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-security multiverse

deb-src http://us.archive.ubuntu.com/ubuntu/ intrepid-security multiverse

deb http://us.archive.ubuntu.com/ubuntu/ intrepid-proposed restricted main multiverse

universe

deb-src http://security.ubuntu.com/ubuntu intrepid-security multiverse

deb http://security.ubuntu.com/ubuntu intrepid-security multiverse

deb-src http://security.ubuntu.com/ubuntu intrepid-security universe

deb http://security.ubuntu.com/ubuntu intrepid-security universe

deb-src http://security.ubuntu.com/ubuntu intrepid-security main restricted

deb http://security.ubuntu.com/ubuntu intrepid-security main restricted

deb-src http://archive.canonical.com/ubuntu intrepid partner

deb http://archive.canonical.com/ubuntu intrepid partner

########################################################

deb http://ppa.launchpad.net/andrewsomething/ubuntu intrepid main

deb-src http://ppa.launchpad.net/andrewsomething/ubuntu intrepid main

# Openoffice 3.0

deb http://ppa.launchpad.net/openoffice-pkgs/ubuntu intrepid main

# Wine

# wget -q http://wine.budgetdedicated.com/apt/387EE263.gpg -O- | sudo apt-key add -

deb http://wine.budgetdedicated.com/apt intrepid main

deb http://ppa.launchpad.net/ubuntu-wine/ubuntu intrepid main

# Ubuntu Tweak

deb http://ppa.launchpad.net/tualatrix/ubuntu intrepid main

# Google

Page 3: 52108435 Servidor de Email Postfix Para Ubuntu

# wget -q -O – http://dl.google.com/linux/linux_signing_key.pub | sudo apt-key add –

deb http://dl.google.com/linux/deb/ stable non-free

# Gnome-Do

deb http://ppa.launchpad.net/do-core/ubuntu intrepid main

# deb http://ppa.launchpad.net/do-testers/ubuntu intrepid main

# Medibuntu

# wget -q http://fr.packages.medibuntu.org/medibuntu-key.gpg -O- | sudo apt-key add -

deb http://packages.medibuntu.org/ intrepid non-free free

deb-src http://packages.medibuntu.org/ intrepid free non-free

# VLC

deb http://nightlies.videolan.org/build/intrepid-i386/arch ./

# Avant Window Navigator

deb http://ppa.launchpad.net/awn-testing/ubuntu intrepid main

deb-src http://ppa.launchpad.net/awn-testing/ubuntu intrepid main

# _Rhythmbox_

# _OGMRip_

# _Cairo-Dock_

# _Affinity_

deb http://ppa.launchpad.net/gilir/ubuntu intrepid main multiverse universe

# Banshee

deb http://ppa.launchpad.net/banshee-team/ubuntu intrepid main

deb-src http://ppa.launchpad.net/banshee-team/ubuntu intrepid main

deb http://ppa.launchpad.net/banshee-unstable-team/ubuntu intrepid main

# Mozilla

deb http://ppa.launchpad.net/mozillateam/ubuntu intrepid main universe

# I forget

deb http://ppa.launchpad.net/fta/ubuntu intrepid main

Page 4: 52108435 Servidor de Email Postfix Para Ubuntu

# Network Manager

deb http://ppa.launchpad.net/network-manager/ubuntu intrepid main

# Themes

deb http://ppa.launchpad.net/kwwii/ubuntu intrepid main

deb-src http://ppa.launchpad.net/kwwii/ubuntu intrepid main

# DropBox

deb http://linux.getdropbox.com/ubuntu intrepid main

deb-src http://linux.getdropbox.com/ubuntu intrepid main

# Deluge-torrent

deb http://ppa.launchpad.net/deluge-team/ubuntu intrepid main restricted universe

multiverse

deb-src http://ppa.launchpad.net/deluge-team/ubuntu intrepid main restricted universe

multiverse

# Empathy/Telepath

deb http://ppa.launchpad.net/telepathy/ubuntu intrepid main

deb-src http://ppa.launchpad.net/telepathy/ubuntu intrepid main

# Exaile

deb http://ppa.launchpad.net/exaile-devel/ubuntu intrepid main

# Compiz

deb http://ppa.launchpad.net/compiz/ubuntu intrepid main

deb-src http://ppa.launchpad.net/compiz/ubuntu intrepid main

# Terminator

deb http://ppa.launchpad.net/gnome-terminator/ubuntu intrepid main

# GScrot

deb http://ppa.launchpad.net/gscrot/ubuntu intrepid main

Page 5: 52108435 Servidor de Email Postfix Para Ubuntu

# Midori

deb http://ppa.launchpad.net/stemp/ubuntu intrepid main

# Avant Window Navigator

deb http://ppa.launchpad.net/reacocard-awn/ubuntu/ intrepid main #Avant Window

Navigator

# Ultamatix

deb http://repoubuntusoftware.info intrepid all

# wget -q http://download.virtualbox.org/virtualbox/debian/sun_vbox.asc -O- | sudo apt-key

add -

deb http://download.virtualbox.org/virtualbox/debian intrepid non-free

INSTALAÇÃO

Para instalar o postfix com SMTP-AUTH e Transport Layer Security (TLS), execute o seguinte comando:

sudo apt-get install postfix

NOTA: Simplesmente pressione tab depois enter para as perguntas durante o

processo de instalação, a configuração será feita em detalhes no próximo passo.

Instale os seguintes pacotes, utilizando os comandos abaixo:

sudo apt-get install heirloom-mailx

sudo apt-get install mailutils

CONFIGURAÇÃO BÁSICA

Para configurar o postfix, execute o seguinte comando:

sudo dpkg-reconfigure postfix

Page 6: 52108435 Servidor de Email Postfix Para Ubuntu

A interface do usuário será mostrada. Em cada tela, selecione os seguintes valores:

Ok

Site de Internet

infobayeux.com

Nenhum (deixe em branco, o e-mail será gravado na pasta padrão)

infobayeux.com, localhost,localdomain, localhost

Não

Ok

Obs.: Deixe os números que estão escritos, de um espaço e digite 192.168.2.0/24

Sim

0

+

Todos

NOTA: Substitua infobayeux.com pelo nome do seu servidor de e-mail.

Pronto o seu servidor esta configurado!

TESTE

Para testar se o servidor de e-mail esta funcionando, usando uma outra máquina,

no windows, clique em Iniciar/Executar e digite cmd

Abrirá o prompt de comando.

telnet

open <ip_servidor> [porta] (geralmente a porta é 25, senão 23)

220 professor-desktop ESMTP Postfix(Ubuntu)

helo teste

250 professor-desktop

mail

501 5.5.4 Syntax: MAIL FROM<adress>

mail from: usuario@exempĺo.com

250 2.1.0 oK

rcpt

Page 7: 52108435 Servidor de Email Postfix Para Ubuntu

501 5.5.4 Syntax: RCPT TO<adress>

rcpt to: [email protected]

250 2.1.0 oK

data

354 End data with <CR><LF>.<CR><LF>

Subject: testando

Olá, estou testando o servidor de e-mail!

.

250 2.0.0 ok:queued as 2EFB21BB80

quit

221 Bye

Connection closed by foreign host.

NOTAS:

O que esta escrito em negrito você deverá digitar, o resto são as respostas do

servidor.

Substitua nome.usuario.servidor pelo nome do usuário da máquina do servidor que

você irá mandar o e-mail.

Ex: [email protected], [email protected], [email protected].

Você deve substituir também o nome de e-mail do servidor (@infobayeux.com)

pelo nome de e-mail que você deu.

Para verificar se o e-mail foi entregue na máquina do servidor, abra o console do

Ubuntu e digite o que esta em negrito:

root@professor-desktop:/home/professor# cd /var/mail

root@professor-desktop:/var/mail# cat nome.usuario.servidor

NOTA: Substitua nome.usuario.servidor pelo nome do usuário que foi mandado o e-

mail (rcpt).

Abrirá o arquivo com todos os e-mails enviados para o tal usuário da máquina

servidor.

By Letícia Arthus ®