Serviço postfix

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: myhostname in /srv/www/lbr.com.br/site/modules/assunto/assunto.php(98) : eval()'d code on line 51

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

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

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

Utilizaremos neste exemplo as seguintes variáveis:

Domínio : exemplo.com.br

Network : 192.168.100.0/24

  1. Instalar os pacotes:
    nail
    postfix
    procmail
    
  2. Adicionar estas linhas no arquivo /etc/postfix/main.cf
    receive_override_options = no_address_mappings
    
    mailbox_command = /usr/bin/procmail
    
    mydomain = exemplo.com.br
    myorigin = 
    
    smtpd_helo_restrictions =
                                   check_helo_access hash:/etc/postfix/access,
                                   permit_mynetworks,
                                   reject_invalid_hostname,
                                   reject_non_fqdn_hostname
    
    smtpd_sender_restrictions =
                                   check_sender_access hash:/etc/postfix/access,
                                   permit_mynetworks,
                                   reject_unknown_sender_domain,
                                   reject_invalid_hostname,
                                   reject_unauth_destination,
                                   reject_non_fqdn_sender,
                                   reject_unknown_recipient_domain
    
    smtpd_client_restrictions =
                                   check_client_access hash:/etc/postfix/access,
                                   permit_mynetworks,
                                   reject_rbl_client bl.spamcop.net,
                                   reject_rbl_client dnsbl.njabl.org,
                                   reject_rbl_client list.dsbl.org,
                                   reject_rbl_client sbl.spamhaus.org
    
    smtpd_recipient_restrictions =
                                   permit_auth_destination,
                                   permit_mynetworks,
                                   reject_unauth_destination,
                                   reject_non_fqdn_sender,
                                   reject_non_fqdn_recipient,
                                   permit
    
    mydestination = , 
    
    maximal_queue_lifetime = 1
    
    mynetworks = 127.0.0.0/8, 192.168.100.0/24
    
    transport_maps   =  hash:/etc/postfix/transport
    smtp_helo_name   = 
    sample_directory = /etc/postfix
    
  3. Criar o arquivo /etc/procmailrc com o seguinte conteúdo:
    DEFAULT=/Maildir/
    
  4. Configurar o serviço postfix para iniciar automaticamente.
  5. Iniciar o serviço postfix.
IP
3.236.51.151