Ubuntu Server Guide Changes, errors and bugs
Download 1.27 Mb. Pdf ko'rish
|
ubuntu-server-guide
- Bu sahifa navigatsiya:
- Configuration Now configure everything to work together and filter email. ClamAV
- Spamassassin
Installation
See Postfix for instructions on installing and configuring Postfix. To install the rest of the applications enter the following from a terminal prompt: sudo apt i n s t a l l amavisd−new s p a m a s s a s s i n clamav−daemon sudo apt i n s t a l l opendkim p o s t f i x −p o l i c y d −s p f −python There are some optional packages that integrate with Spamassassin for better spam detection: sudo apt i n s t a l l pyzor r a z o r Along with the main filtering applications compression utilities are needed to process some email attachments: sudo apt i n s t a l l a r j c a b e x t r a c t c p i o l h a nomarch pax r a r u n r a r u n z i p z i p Note If some packages are not found, check that the multiverse repository is enabled in /etc/apt/ sources. list If you make changes to the file, be sure to run sudo apt update before trying to install again. Configuration Now configure everything to work together and filter email. ClamAV The default behaviour of ClamAV will fit our needs. For more ClamAV configuration options, check the configuration files in /etc/clamav. Add the clamav user to the amavis group in order for Amavisd-new to have the appropriate access to scan files: 246 sudo a d d u se r clamav amavis sudo a ddu ser amavis clamav Spamassassin Spamassassin automatically detects optional components and will use them if they are present. This means that there is no need to configure pyzor and razor. Edit /etc/default/spamassassin to activate the Spamassassin daemon. Change ENABLED=0 to: ENABLED=1 Now start the daemon: sudo s y s t e m c t l s t a r t s p a m a s s a s s i n . s e r v i c e Amavisd-new First activate spam and antivirus detection in Amavisd-new by editing /etc/amavis/conf.d/15− content_filter_mode: u s e s t r i c t ; # You can modify t h i s f i l e t o re−e n a b l e SPAM c h e c k i n g through s p a m a s s a s s i n # and t o re−e n a b l e a n t i v i r u s c h e c k i n g . # # D e f a u l t a n t i v i r u s c h e c k i n g mode # Uncomment t h e two l i n e s below t o e n a b l e i t # @bypass_virus_checks_maps = ( \%bypass_virus_checks , \ @bypass_virus_checks_acl , \ $bypass_virus_checks_re ) ; # # D e f a u l t SPAM c h e c k i n g mode # Uncomment t h e two l i n e s below t o e n a b l e i t # @bypass_spam_checks_maps = ( \%bypass_spam_checks , \ @bypass_spam_checks_acl , \ $bypass_spam_checks_re ) ; 1 ; # i n s u r e a d e f i n e d r e t u r n Bouncing spam can be a bad idea as the return address is often faked. The default behaviour is to instead discard. This is configured in /etc/amavis/conf.d/20−debian_defaults where $final_spam_destiny is set to D_DISCARD rather than D_BOUNCE. Additionally, you may want to adjust the following options to flag more messages as spam: $ s a _ t a g _ l e v e l _ d e f l t = −999; # add spam i n f o h e a d e r s i f at , o r above t h a t l e v e l $ s a _ t a g 2 _ l e v e l _ d e f l t = 6 . 0 ; # add ’ spam d e t e c t e d ’ h e a d e r s a t t h a t l e v e l $ s a _ k i l l _ l e v e l _ d e f l t = 2 1 . 0 ; # t r i g g e r s spam e v a s i v e a c t i o n s $ s a _ d s n _ c u t o f f _ l e v e l = 4 ; # spam l e v e l beyond which a DSN i s not s e n t 247 If the server’s hostname is different from the domain’s MX record you may need to manually set the $my- hostname option. Also, if the server receives mail for multiple domains the @local_domains_acl option will need to be customized. Edit the /etc/amavis/conf.d/50−user file: $myhostname = ’ m a i l . example . com ’ ; @local_domains_acl = ( ” example . com ” , ” example . o r g ” ) ; If you want to cover multiple domains you can use the following in the/etc/amavis/conf.d/50−user @local_domains_acl = qw ( . ) ; After configuration Amavisd-new needs to be restarted: sudo s y s t e m c t l r e s t a r t amavis . s e r v i c e Download 1.27 Mb. Do'stlaringiz bilan baham: |
Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©fayllar.org 2024
ma'muriyatiga murojaat qiling
ma'muriyatiga murojaat qiling