blocking a specific email address

Forum for getting help with Project Gamera, Spamassassin, Clamav, qmail-scanner and other anti-spam tools.
mist_firefly
Forum User
Forum User
Posts: 60
Joined: Mon Jul 23, 2012 5:22 am
Location: Salisbury

blocking a specific email address

Unread post by mist_firefly »

Hello,

I need to block a specific email address to send emails to a client's account on our server. We use qmail-scanner.

How could I do that? :/
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: blocking a specific email address

Unread post by faris »

There's a couple of ways.

You can do it in spamassassin
http://spamassassin.apache.org/full/3.2 ... st_options

Basically you just add:

Code: Select all

blacklist_from baduser@baddomain.tld
to local.cf and email with that address in *certain header lines* will get a +100 score.

Depending on your qmail-scanner settings, this may cause the email to be rejected at the SMTP level rather than quietly just dropped.

Note that you can be more generic and use *@baddomain.tld and various other options mentioned on that page.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
mist_firefly
Forum User
Forum User
Posts: 60
Joined: Mon Jul 23, 2012 5:22 am
Location: Salisbury

Re: blocking a specific email address

Unread post by mist_firefly »

Thank you for the quick reply.

I was wondering what does the badmailfrom list does in qmail? Is that a bad idea? The client want's this bad email to be bounced from him
Also is there an option I can only do it for them and not for the whole server?

Thanks
faris
Long Time Forum Regular
Long Time Forum Regular
Posts: 2321
Joined: Thu Dec 09, 2004 11:19 am

Re: blocking a specific email address

Unread post by faris »

It looks like you could use badmailfrom too. I've never tried it.

http://www.qmailwiki.org/Qmail-control- ... admailfrom

You can use the spamassassin technique on a per-mailbox (or per domain) basis if your spamassassin configuration is set to do so.

I'm not familiar with how this would be set up, so I'll let someone who knows how it is done chip in on this. It is something to do with having a per-mailbox configuration file, typically located in /var/qmail/mailnames/domain.tld/ or something like that, but I'm not familiar with how you tell spamassassin where the configuration files are located, etc etc.
--------------------------------
<advert>
If you want to rent a UK-based VPS that comes with friendly advice and support from a fellow ART fan, please get in touch.
</advert>
scott
Atomicorp Staff - Site Admin
Atomicorp Staff - Site Admin
Posts: 8355
Joined: Wed Dec 31, 1969 8:00 pm
Location: earth
Contact:

Re: blocking a specific email address

Unread post by scott »

If you know a specific email address is a spam source, setting it as a spamassassin blacklist is a good way to feed your bayes db automatically. I do the same thing with RBLs. Cuts down on Spamassassin maintenance massively.
mist_firefly
Forum User
Forum User
Posts: 60
Joined: Mon Jul 23, 2012 5:22 am
Location: Salisbury

Re: blocking a specific email address

Unread post by mist_firefly »

Thanks for the help.

Really it's just a client who wants an address blocked. But this is not spam so I can't really block it on the entire server.. not even sure if that's legal.
breun
Long Time Forum Regular
Long Time Forum Regular
Posts: 2813
Joined: Sat Aug 20, 2005 9:30 am
Location: The Netherlands

Re: blocking a specific email address

Unread post by breun »

mist_firefly wrote:Really it's just a client who wants an address blocked.
Are you talking about an individual client? Maybe (s)he can just create a rule to automatically delete mail from this particular address in his/her mail client if you don't want to mess with this server-wide?
Lemonbit Internet Dedicated Server Management
mist_firefly
Forum User
Forum User
Posts: 60
Joined: Mon Jul 23, 2012 5:22 am
Location: Salisbury

Re: blocking a specific email address

Unread post by mist_firefly »

Thank you all.
Yes I did say that to him ..haven't heard back.
Post Reply