primon
(usa Red Hat)
Enviado em 08/01/2008 - 01:09h
Valeu pela dica, mas acho que já estou usando assim, veja o meu main.cf:
######################################### CAMINHOS
#---- Diretorio dos Comandos
command_directory = /usr/sbin
#---- Diretorio das Configuracoes
config_directory = /etc/postfix
#---- Diretorio da Daemon - Usados no MASTER.CF daemon_directory = /usr/libexec/postfix
#---- Caminho do Mailq
mailq_path = /usr/bin/mailq
#---- Caminho dos Manuais
manpage_directory = /usr/shar/man
#---- Caminho do NewAliases
newaliases_path = /usr/bin/newaliases
#---- Diretorio do README
readme_directory = /usr/share/doc/postfix-2.3.3/
#---- Caminho dos exemplos
sample_directory = /etc/postfix
#---- Caminho do SendMain
sendmail_path = /usr/sbin/sendmail
#---- Caminho das QUEU's
queue_directory = /var/spool/postfix
#---- Diretorio de Armazenamento de E-mails mail_spool_directory = /var/mail
######################################### GERAIS
#---- Usuario que ira executar os DAEMONS
mail_owner = postfix
#---- Grupo do POSTFIX
setgid_group = postdrop
#---- Numero maximo de destinatarios de um mesmo e-mails
smtpd_recipient_limit = 30
#---- Enviar todos os e-mails para uma unica conta
#always_bcc = pegatudo@cathedraw.com.br
#---- Bloquear e-mails por assunto, conteudo e anexos
header_checks = pcre:/etc/postfix/header_checks
mime_header_checks = $header_checks
nested_header_checks = $header_checks
body_checks = regexp:/etc/postfix/body_checks
#---- Tempo de mensagem em fila
maximal_queue_lifetime = 1d
#---- Formato da Caixa de E-mail ( Mailbox / Maildir )
home_mailbox = Maildir/
#---- Tamanho da caixa do usuáo ( 50 Megas )
#mailbox_size_limit = 51200000
#---- Tamanho maxio da mensagem ( 10 Megas )
message_size_limit = 10240000
#---- Respeita RFC 821 - MAIL FROM e RCPT TO
strict_rfc821_envelopes = yes
#---- Desabilita VRFY
#disable_vrfy_command = yes
#---- Habilita requisicao de HELO/EHLO
smtpd_helo_required = yes
#---- Codigos de erros
unknown_local_recipient_reject_code = 550
#---- Verifica os 50 K inicais dos Anexos
body_checks_size_limit = 51200
#---- Tamanho da mensagem de erro
bounce_size_limit = 50000
#---- Tamanho mámo do HEADER aceito
header_size_limit = 102400
#---- Entrega de e-mails para mesmo destino
smtp_destination_concurrency_limit = 20
#---- Entrega de e-mails para mesmo destino - remoto
default_destination_concurrency_limit = 20
#---- Entrega de e-mails para mesmo destino - local
default_destination_recipient_limit = 50
#---- Tempo de reenvio de mensagem em fila
fast_flush_refresh_time = 1h
#---- Tempo para deletar as mensagens em fila
fast_flush_purge_time =12h
#---- Tipo de Pasta
html_directory =no
# Tipo de transporte dos e-mail's do Postfix
default_transport =smtp
local_transport =local:$myhostname
best_mx_transport =
#---- Nivel de Debug
debug_peer_level = 2
######################################### SERVIDOR
#---- Dominios que o servidor entrega e-mails localmente
# Ex: localhost.$mydomain, $mydomain, $transport_maps
mydestination = $myhostname, localhost.$mydomain, localhost, mysql:/etc/postfix/mysql_destination.cf
#relay_domains = 200.250.222.20
#---- Dominio do Servidor
mydomain = cathedraw.com.br
#---- Nome totalmente qualificado do servidor
myhostname = expert.cathedraw.com.br
#---- Redex que serao liberadas para Relay
mynetworks = 172.22.1.0/24, 127.0.0.0/8, 172.22.2.0/24, 200.250.222.20
#---- Configurando o RELAY
# host - Encaminha e-mail's apenas p/ a maquina local
# subnet - Apenas p/ clientes SMTP da mesma SUBREDE da maq. local
# class - De clientes SMTP da mesma classe da maq A B ou C
mynetworks_style = host
#---- Qual interface responde pelo POSTFIX
inet_interfaces = all
#---- Qual dominio sera mostrado apos o @ no campo FROM dos e-mail's
myorigin = $myhostname
#---- O servidor faz RELAY em redes confiaveis (mynetworks_style e
# mynetworks) ou por origem nao confiavel que o destino "bater"
# como relay_domains
relay_domains = $mydomain
#mynetworks, $mydestination
#$mydestination,mysql:/etc/postfix/mysql_destination.cf
#localhost
#mydestination
relay_domains_reject_code = 554
#---- Especifica se o e-mail vai ser enviado diretamente para um
# servidor na internet ou por um servidor local e fazer relay
relayhost =
#---- Banner do servidor SMTP
smtpd_banner = $myhostname - Servidor de E-mail
######################################### ALIASES
#---- Arquivo com alias
alias_maps =hash:/etc/aliases
#alias_maps = dbm:/etc/aliases
#alias_maps = hash:/etc/aliases
#alias_maps = hash:/etc/aliases, nis:mail.aliases
#alias_maps = netinfo:/aliases
######################################### MYSQL
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_mailbox_base = /cathedraw/postfix
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_uid_maps = static:150
virtual_gid_maps = static:150
######################################### QUOTA
#virtual_mailbox_limit_inbox = no
#virtual_mailbox_limit_maps= mysql:/etc/postfix/mysql_virtual_mailbox_limit_maps.cf
#virtual_mailbox_limit_override = yes
#virtual_maildir_extended = yes
#virtual_create_maildirsize = yes
#virtual_mailbox_limit = no
#virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
#virtual_overquota_bounce = yes
######################################### MAILDROP
fallback_transport = /usr/bin/maildrop
transport_maps = mysql:/etc/postfix/mysql_transport_maps.cf
maildrop_destination_recipient_limit =1
maildrop_destination_concurrency_limit =1
######################################### SASL2
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sasl_local_domain = $myhostname
smtp_sasl_password_maps = mysql:/etc/postfix/mysql_auth.cf
######################################### RULES
#-- HELO RESTRICTIONS
smtpd_helo_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
#-- SENDER RESTRICTIONS
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks,
# REJEITA REMETENTE SEM FQDN
reject_non_fqdn_sender,
# REJEITA DESTINATARIO SEM FQDN
reject_non_fqdn_recipient,
# FECHA O RELAY
reject_unauth_destination,
# REJEITA DESTINATARIO SEM DOMINIO EXISTENTE
reject_unknown_recipient_domain,
# REJEITA REMETENTE SEM DOMINIO EXISTENTE
reject_unknown_sender_domain,
# REJEITA HOSTNAME SEM FQDN
#reject_non_fqdn_hostname,
# QUANDO A SINTAXE DO HELO/EHLO EH INVALIDA
reject_invalid_hostname,
# LISTA DE RBLs
reject_rbl_client relays.ordb.org,
reject_rbl_client bl.spamcop.net,
reject_rbl_client rmst.dnsbl.net.au,
reject_rbl_client sbl-xbl.spamhaus.org,
reject_rbl_client korea.services.net,
reject_rbl_client list.dsbl.org,
#reject_rbl_client dnsbl.sorbs.net,
reject_rbl_client dnsbl.njabl.org,
reject_rbl_client sbl.spamhaus.org,
reject_rbl_client whois.rfc-ignorant.org,
reject_rbl_client bogusmx.rfc-ignorant.org,
reject_rhsbl_sender dsn.rfc-ignorant.org,
# Remetente sem FQDN
reject_non_fqdn_sender,
#
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
#reject_non_fqdn_sender,
reject_unauth_destination,
reject_unauth_pipelining
smtpd_recipient_restrictions = permit_sasl_authenticated,
permit_mynetworks,
reject_unknown_client,
reject_unauth_pipelining,
reject_invalid_hostname,
#reject_unknown_hostname,
#reject_non_fqdn_hostname,
reject_unauth_destination