Skip to content

Instantly share code, notes, and snippets.

@wallyhall
Created July 30, 2018 12:20
Show Gist options
  • Save wallyhall/d2a36e1d59bc7e1acdce2874bd724e2f to your computer and use it in GitHub Desktop.
Save wallyhall/d2a36e1d59bc7e1acdce2874bd724e2f to your computer and use it in GitHub Desktop.
/etc/courier/maildroprc for ClamAV and Spamassassin
xfilter "/usr/bin/clamassassin"
if (/^X-Virus-Status: Yes/:h)
{
# Create a Quarantine folder if they've not got one
`[ -d $DEFAULT/.Quarantine ] || (maildirmake -f Quarantine $DEFAULT)`
# Deliver to Quarantine folder
to $DEFAULT/.Quarantine/
}
xfilter "/usr/bin/spamc -f -u $USER -s 5000000"
if (/^X-Spam-Flag: YES/:h || /^X-Spam-Status: Yes/:h)
{
# Create a Spam folder if they've not got one
`[ -d $DEFAULT/.Junk ] || (maildirmake -f Junk $DEFAULT)`
# Deliver to Spam folder
to $DEFAULT/.Junk/
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment