Koozali.org: home of the SME Server

Obsolete Releases => SME Server 7.x => Topic started by: Strangelite on May 19, 2009, 06:26:08 PM

Title: forward email for a particular user to /dev/null
Post by: Strangelite on May 19, 2009, 06:26:08 PM
how can I drop all the email for a particular user to /dev/null - as I have a couple that are just spam bait
Title: Re: forward email for a particular user to /dev/null
Post by: janet on May 20, 2009, 12:05:39 AM
Strangelite

mkdir -p /etc/e-smith/templates-custom/var/qmail/control/virtualdomains
pico -w /etc/e-smith/templates-custom/var/qmail/control/virtualdomains/90aliases

In this 90aliases file enter
user@domain.com:undeliverable

Save the file & then do:
signal-event email-update

The idea was derived from this old Howto
http://distro.ibiblio.org/pub/linux/distributions/smeserver/contribs/rmitchell/smeserver/howto/virtual%20domain%20email%20aliases%20HOWTO%20for%20sme%20server.htm

It works on sme7.4 despite the howto saying not applicable to sme7.x
Title: Re: forward email for a particular user to /dev/null
Post by: wellsi on May 20, 2009, 12:16:50 AM
Another method is to blacklist them in spamassassin as follows:

db spamassassin setprop wbl.global_to reasonableness@yourdomain.com Black


To activate the settings

expand-template /etc/mail/spamassassin/local.cf
svc -t /service/spamd
Title: Re: forward email for a particular user to /dev/null
Post by: Strangelite on May 20, 2009, 08:17:04 AM
Excellent - I'll have a play and see which one I'll use
Title: Re: forward email for a particular user to /dev/null
Post by: MSmith on May 20, 2009, 03:51:59 PM
Why not just delete the user?
Title: Re: forward email for a particular user to /dev/null
Post by: Strangelite on May 21, 2009, 01:30:26 PM
I'm using the spamassassin method,

and as I deliver all email into a bad email account so I can check for miss-assigned names [we have a few], I just want to cut the spam down - I don't want to bounce messages if I can avoid it
Title: Re: forward email for a particular user to /dev/null
Post by: cactus on May 22, 2009, 09:33:19 AM
I don't want to bounce messages if I can avoid it
You should IMHO as this is normal expected behavior, how would the other party otherwise know they are using a invalid e-mailaddress?