Eu tenho dois servidores freepbx do VoIP. Eu configurei o servidor A e o copiei para o Servidor B e mudei o nome do host e o IP.
O arquivo de configuração do postfix no servidor B parece ter 5 linhas excluídas, o que interrompe o postfix, o que faz com que um arquivo de log de quase 100 GB preencha a partição raiz. (Falha ao enviar um e-mail)
Eu consertei isso apenas colocando um novo arquivo de configuração do postfix a cada 30 minutos, mas eu adoraria saber qual é o problema e como isso está acontecendo.
Eu fiz o arquivo 400 com postfix: permissões de ninguém, mas ainda acontece!
[root@voip2 postfix]# ll main.cf
-r-------- 1 postfix nobody 1226 Apr 4 12:30 main.cf
Aqui está o main.cf e como eu o instalei:
cat << 'EOL' >/etc/postfix/main.cf
#
# PostFix Config
##Modify Below [HOSTNAME]
myhostname = [HOSTNAME]
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_use_tls=yes
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_passwd
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
canonical_maps = hash:/etc/postfix/canonical
relayhost = [smtp.hmc1.comcast.net]:587
mydomain = domain.com
mydestination = $myhostname $myhostname.$mydomain localhost.$mydomain localhost
sender_canonical_maps = static:$myhostname@$mydomain
EOL
Aqui está o que meu main.cf parece depois que ele é aleatoriamente bagunçado, isso é consistentemente assim:
#
# PostFix Config
##Modify Below [HOSTNAME]
smtpd_banner = $myhostname ESMTP $mail_name
biff = no
append_dot_mydomain = no
readme_directory = no
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
canonical_maps = hash:/etc/postfix/canonical
mydestination = $myhostname $myhostname.$mydomain localhost.$mydomain localhost
sender_canonical_maps = static:$myhostname@$mydomain
Aqui está o final do arquivo de registro da noite para o dia: (Isso aconteceu durante a noite enquanto eu estava fora)
Apr 4 12:30:03 voip2 postfix/master[21006]: daemon started -- version 2.6.6, configuration /etc/postfix
Apr 4 12:59:25 voip2 postfix/postfix-script[22506]: stopping the Postfix mail system
Apr 4 12:59:25 voip2 postfix/master[21006]: terminating on signal 15
Apr 4 13:00:57 voip2 postfix/postfix-script[2374]: warning: not owned by root: /etc/postfix
Apr 4 13:00:57 voip2 postfix/postfix-script[2384]: warning: not owned by root: /etc/postfix/access
Apr 4 13:00:57 voip2 postfix/postfix-script[2385]: warning: not owned by root: /etc/postfix/canonical
Apr 4 13:00:57 voip2 postfix/postfix-script[2386]: warning: not owned by root: /etc/postfix/canonical.db
Apr 4 13:00:57 voip2 postfix/postfix-script[2387]: warning: not owned by root: /etc/postfix/generic
Apr 4 13:00:57 voip2 postfix/postfix-script[2388]: warning: not owned by root: /etc/postfix/header_checks
Apr 4 13:00:57 voip2 postfix/postfix-script[2389]: warning: not owned by root: /etc/postfix/main.cf
Apr 4 13:00:57 voip2 postfix/postfix-script[2390]: warning: not owned by root: /etc/postfix/master.cf
Apr 4 13:00:57 voip2 postfix/postfix-script[2391]: warning: not owned by root: /etc/postfix/relocated
Apr 4 13:00:57 voip2 postfix/postfix-script[2392]: warning: not owned by root: /etc/postfix/sasl
Apr 4 13:00:57 voip2 postfix/postfix-script[2393]: warning: not owned by root: /etc/postfix/sasl/sasl_passwd
Apr 4 13:00:57 voip2 postfix/postfix-script[2394]: warning: not owned by root: /etc/postfix/sasl/sasl_passwd.db
Apr 4 13:00:57 voip2 postfix/postfix-script[2395]: warning: not owned by root: /etc/postfix/transport
Apr 4 13:00:57 voip2 postfix/postfix-script[2396]: warning: not owned by root: /etc/postfix/virtual
Apr 4 13:00:57 voip2 postfix/postfix-script[2411]: starting the Postfix mail system
Apr 4 13:00:57 voip2 postfix/master[2412]: daemon started -- version 2.6.6, configuration /etc/postfix
Apr 4 13:21:15 voip2 postfix/postfix-script[8412]: refreshing the Postfix mail system
Apr 4 13:21:15 voip2 postfix/master[2412]: reload -- version 2.6.6, configuration /etc/postfix
Apr 5 00:00:01 voip2 postfix/sendmail[6683]: fatal: open /etc/postfix/main.cf: Permission denied
Apr 5 00:01:01 voip2 postfix/sendmail[6737]: fatal: open /etc/postfix/main.cf: Permission denied
Apr 5 00:06:24 voip2 postfix/sendmail[7139]: fatal: open /etc/postfix/main.cf: Permission denied
Apr 5 05:31:28 voip2 postfix/postfix-script[23065]: refreshing the Postfix mail system
Apr 5 05:31:28 voip2 postfix/master[2412]: reload -- version 2.6.6, configuration /etc/postfix
[root@voip2 log]#
Edit: Parece que este é mais um problema FreePBX, eu rastreei o "culpado" e acontece quando eu restaurar um arquivo TGZ do servidor A para o servidor B
Tags configuration postfix