Entries from April 2009 ↓

Installing non-free plugins in Jaunty (9.04)

Make sure you have the medibuntu repository enabled.

CODE:
  1. aptitude install non-free-codecs

Now I can play mms:// streams.

Battling spam

We got a lot of complaints about legitimate mails being marked as spam and therefore not being delivered to our customers.  As a solution I wanted the mails to be delivered to the user's .SPAM folder.

These is the configuration I decided on:

/etc/amavis/conf.d/20-debian_defaults:

CODE:
  1. $final_spam_destiny       = D_PASS;

/etc/maildroprc:

CODE:
  1. # Global maildrop filter file
  2.  
  3. # Uncomment this line to make maildrop default to ~/Maildir for
  4. # delivery- this is where courier-imap (amongst others) will look.
  5. DEFAULT="$HOME/Maildir"
  6. SHELL="/bin/bash"
  7. MAILDIRMAKE=`which maildirmake`
  8. logfile "/var/log/maildrop.log"
  9.  
  10. `test -d $HOME/Maildir/.SPAM`
  11. if ( $RETURNCODE == 1 )
  12. {
  13. `$MAILDIRMAKE -f SPAM $HOME/Maildir`
  14. `echo INBOX.SPAM>> $HOME/Maildir/courierimapsubscribed`
  15. }
  16.  
  17. if ( /^X-Spam-Status: Yes/ )
  18. {
  19. to "$HOME/Maildir/.SPAM/"
  20. }

/etc/roundcube-webmail/main.inc.php:

CODE:
  1. // store spam messages in this mailbox
  2. $rcmail_config['junk_mbox'] = 'SPAM';
  3.  
  4. // display these folders separately in the mailbox list.
  5. // these folders will automatically be created if they do not exist
  6. $rcmail_config['default_imap_folders'] = array('INBOX', 'Drafts', 'Sent', 'SPAM', 'Trash');

Delete all the old Junk-folders:

CODE:
  1. rm -r /home/*/Maildir/.Junk
  2. rm -r /home/*/homes/*/Maildir/.Junk

To make it extra nice:
/etc/amavis/conf.d/50-user:

CODE:
  1. use strict;
  2.  
  3. #
  4. # Place your configuration directives here.  They will override those in
  5. # earlier files.
  6. #
  7. # See /usr/share/doc/amavisd-new/ for documentation and examples of
  8. # the directives you can use in this file
  9. #
  10.  
  11. #$log_level = 5;
  12.  
  13. $pax='pax';
  14.  
  15. read_hash(\%whitelist_sender, '/etc/amavis/whitelist');
  16. read_hash(\%blacklist_sender, '/etc/amavis/blacklist');
  17. read_hash(\%spam_lovers, '/etc/amavis/spam_lovers');
  18.  
  19. @bypass_spam_checks_maps = (
  20. \%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
  21.  
  22. #------------ Do not modify anything below this line -------------
  23. 1;  # ensure a defined return

And:

CODE:
  1. touch /etc/amavis/whitelist
  2. touch /etc/amavis/blacklist
  3. touch /etc/amavis/spam_lovers

And restart amavis:

CODE:
  1. /etc/init.d/amavis restart