Friday, April 5, 2024
Postfix

Membuat log per hari dengan logrotate – postfix

tahapan nya :

1. login ke server ( ssh )
2. jenis scripts yg di gunakan :

/var/log/maillog {
daily
rotate 31
start 1
compress
create 0600 root
dateext
postrotate
/etc/init.d/postfix reload > /dev/null
endscript

atau

/var/log/maillog {
missingok
notifempty
size 100M
daily
create 0600 root root
rotate 35
dateext
copytruncate
}
3. tambahkan script di atas di :

/etc/logrotate.conf

4. buat juga file berikut :

nano /etc/logrotate.d/maillog

isi kan script file di atas.

5. restart service

service postfix restart

6. nanti akan terlihat ada file log /hari di /var/log/

(Visited 71 times, 1 visits today)
Baca Juga :  Cara Memblok Sender yang spamming di postfix

Similar Posts


Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270

Warning: Trying to access array offset on value of type bool in /home/des1gn/hendro-wibiksono.web.id/wp-content/plugins/floating-related-posts/floating-related-posts-pro.php on line 270