Category Archives: Linux

filtering spam with procmail | http://www.benya.com/

This is a collection of procmail recipes which I use to pre-filter the incoming mail before letting SpamBayes take a crack at it. This combination seems to provide a fairly decent level of protection. Naturally, your mileage may vary.

procmail is a mail processor installed on most Linux systems and used to by the mail server to deliver mail to your mailbox. If your mail server is hosted on linux you may use procmail to remove spam and sort messages before they are placed into your mailbox. If, like me, you prefer to use pine in a shell window to check your e-mail, this type of filtering may be your only defense against spam.

In order to understand these recipes, at least some knowledge of procmail and regular expressions syntax is required. The basics can be learned from procmail man pages and from links on procmail home page. Here is a great procmail documentation project and a library of recipes

Spam filters and other useful procmail recipes

Source: filtering spam with procmail | http://www.benya.com/

sound – Can I downmix stereo audio to mono? – Ask Ubuntu | https://askubuntu.com/

  1. Find the name of your audio sink by running
    pacmd list-sinks | grep name:
    
  2. Then run this command (taking care to remove the angled brackets):
    pacmd load-module module-remap-sink sink_name=mono master=name_of_audio sink_given_by_previous_command channels=2 channel_map=mono,mono
    

    or add

    load-module module-remap-sink sink_name=mono master=name_of_audio sink_given_by_previous_command channels=2 channel_map=mono,mono
    

    to /etc/pulse/default.pa to have it run at startup.

  3. Then in Sound Preferences choose “Mono” as the output, but remember to reduce volumes by half, since two channels are getting mixed into one, or else you’ll have distortion. To test, run:
    speaker-test -c 2 -t sine
    

Same thing in a single command:

pacmd load-module module-remap-sink sink_name=mono master=$(pacmd list-sinks | grep -m 1 -oP 'name:\s<\K.*(?=>)') channels=2 channel_map=mono,mono
  1. To remove the mono channel, just use:
    pacmd unload-module module-remap-sink
    

Source: sound – Can I downmix stereo audio to mono? – Ask Ubuntu | https://askubuntu.com/