Web hosting reseller - 629Chapter 24Running a Mail Server6.Configure maildrop to filter
629Chapter 24Running a Mail Server6.Configure maildrop to filter messages through SpamAssassin and ClamAV bychanging your /etc/maildroprcfile to look like this: # Global maildrop filter fileDEFAULT= $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 DEFAULTtells maildropwhich location messages shouldbe stored to. This causes maildrop to save the messages to a directory namedMaildirunder the recipient s home directory (which is automatically substi- tuted for the $HOMEvariable by maildrop). The IMAP server is expecting tofind messages in this directory. The first ifblock filters messages that are less than 60,000 bytes throughspamc, and the line after that runs the message through the clam-mailscanprogram. The final ifblock checks for the presence of X-Spam-Flagand X-Virus-Alertheaders. If either of these headers are found, maildrop attempts to deliver themessage to a Trash folder located under the default folder. By enclosing thisstep within an exceptionblock, maildropis instructed to take the defaultaction instead of aborting delivery in the event that this step fails. This allowsyou to safely prevent mail sorting for an individual account by simply remov- ing its Trash folder. You can find more information about the features and syntax of the /etc/maildroprcfile by running man maildropfilterand man maildropex. 7.Create Maildirmail directories for every user already on the system. Thisstep needs to be performed for every user that is already on the system andneeds to be run as the user because executing it as root results in maildropbeing unable to write to the new directories: $ maildirmake.maildrop $HOME/Maildir$ maildirmake.maildrop -f Trash $HOME/Maildir8.Create mail directories under /etc/skel. The contents of /etc/skelwill becopied to the home directories of any new accounts: # maildirmake.maildrop /etc/skel/Maildir# maildirmake.maildrop -f Trash /etc/skel/MaildirNote33_
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.