Instalação do Servidor de E-mail

Notice: Undefined variable: mydomain in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 14

Notice: Undefined variable: mydomain in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 18

Notice: Undefined variable: spam_quarantine_to in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 27

Notice: Undefined variable: spam_quarantine_to in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 28

Notice: Undefined variable: mydomain in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 28

Notice: Undefined variable: spam_quarantine_to in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 32

Notice: Undefined variable: spam_quarantine_to in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 33

Notice: Undefined variable: mydomain in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 33

Notice: Undefined variable: sa_auto_whitelist in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 38

Notice: Undefined variable: myhostname in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 69

Notice: Undefined variable: mydomain in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 69
  1. Pacotes necessários:
    postfix
    spamassassin
    amavisd-new
    clamav
    
  2. Configuração do Amavis Editar o arquivo /etc/amavisd.conf

    Substituir a linha de:

     = 'example.com';
    
    para
     = 'lbr.com.br';
    
    Comentar a linha
    @bypass_spam_checks_acl  = qw( . );
    
    Substituir de:
     = 'spam-quarantine';
    # = "spam-quarantine@";
    
    para
      # = 'spam-quarantine';
       = "spam@";
    
    Descomentar a linha:
      # = 1;    # turn on AWL (default: false)
    
  3. Colocar o serviço amavisd para iniciar automaticamente no boot e iniciar o serviço.
  4. Configuração do postfix

    Editar o arquivo /etc/postfix/main.cf e adicionar as linhas:

    smtpd_recipient_restrictions= check_client_access hash:/etc/postfix/access,
                                  check_recipient_access hash:/etc/postfix/access,
                                  check_sender_access hash:/etc/postfix/access,
                                  permit_mynetworks,
                                  permit_sasl_authenticated,
                                  reject_invalid_hostname,
                                  reject_non_fqdn_hostname,
                                  reject_non_fqdn_recipient,
                                  reject_non_fqdn_sender,
                                  reject_rbl_client bl.spamcop.net,
                                  reject_rbl_client dnsbl.njabl.org,
                                  reject_rbl_client list.dsbl.org,
                                  reject_rbl_client opm.blitzed.org,
                                  reject_rbl_client relays.ordb.org,
                                  reject_rbl_client sbl.spamhaus.org,
                                  reject_unauth_destination
                                  reject_unauth_pipelining,
                                  reject_unknown_hostname,
                                  reject_unknown_recipient_domain,
                                  reject_unknown_sender_domain
    
    content_filter = smtp-amavis:[127.0.0.1]:10024
    
    mydestination = , , /etc/postfix/relay-domains
    
    
  5. Criar o arquivo: /etc/postfix/relay-domains e preencher com os dominios que o servidor responderá ex:
    lbr.com.br
    intranet.com
    intra
    
  6. Editar o arquivo /etc/postfix/master.cf e adicionar as linhas:
    smtp-amavis unix -   -  n   -  2  smtp
      -o smtp_data_done_timeout=1200
      -o disable_dns_lookups=yes
    
    127.0.0.1:10025 inet n   -  n   -  -  smtpd
      -o content_filter=
      -o local_recipient_maps=
      -o relay_recipient_maps=
      -o smtpd_restriction_classes=
      -o smtpd_client_restrictions=
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o mynetworks=127.0.0.0/8
      -o strict_rfc821_envelopes=yes
    
  7. Reiniciar o postfix
    service postfix restart                                                
IP
3.236.51.151