Make a web site - Chapter 24 . Running a Mail Server 629

Chapter 24 . Running a Mail Server 629 6. Configure maildrop to filter messages through SpamAssassin and ClamAV by changing your /etc/maildroprc file to look like this: # Global maildrop filter file DEFAULT= $HOME/Maildir if ( $SIZE < 60000 ) { xfilter /usr/bin/spamc -f } xfilter /usr/local/sbin/clam-mailscan if (/^X-Spam-Flag: YES/ || /^X-Virus-Alert:/ ) { exception { to $DEFAULT/.Trash/ } } The line starting with DEFAULT tells maildrop which location messages should be stored to. This causes maildrop to save the messages to a directory named Maildir under the recipient s home directory (which is automatically substituted for the $HOME variable by maildrop). The IMAP server is expecting to find messages in this directory. The first if block filters messages that are less than 60,000 bytes through spamc, and the line after that runs the message through the clam-mailscan program. The final if block checks for the presence of X-Spam-Flag and X-Virus-Alert headers. If either of these headers are found, maildrop attempts to deliver the message to a Trash folder located under the default folder. By enclosing this step within an exception block, maildrop is instructed to take the default action instead of aborting delivery in the event that this step fails. This allows you to safely prevent mail sorting for an individual account by simply removing its Trash folder. You can find more information about the features and syntax of the /etc/mail droprc file by running man maildropfilter and man maildropex. 7. Create Maildir mail directories for every user already on the system. This step needs to be performed for every user that is already on the system and needs to be run as the user because executing it as root results in maildrop being unable to write to the new directories: $ maildirmake.maildrop $HOME/Maildir $ maildirmake.maildrop -f Trash $HOME/Maildir 8. Create mail directories under /etc/skel. The contents of /etc/skel will be copied to the home directories of any new accounts: # maildirmake.maildrop /etc/skel/Maildir # maildirmake.maildrop -f Trash /etc/skel/Maildir Note
From our experience, we are can tell you that you can find a reliable and cheap webhost service at Java Web Hosting services.

Leave a Reply