Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Virtual Mailhosting How to reject mail?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
SilverOne
Apprentice
Apprentice


Joined: 10 Nov 2003
Posts: 161

PostPosted: Sun Oct 30, 2005 11:20 pm    Post subject: [SOLVED] Virtual Mailhosting How to reject mail? Reply with quote

Hi,

A slightly different-than-usual question regarding the Virtual Mailhosting System with Postfix Guide
I've followed the guide, and I've got a working mail system (and it works beautifully).

The question is: I'm getting a lot of spam to a specific (no longer used) e-mail address. It gets deliverd to the "catchall" @domain address. How do I fit the neatest solution in my mailsystem to block incoming e-mails to that address, without needing to remove the @domain entry in my tables?

Ideally I want the spammers to remove the address from their lists so I want them to get an error like "no such user".
Also I use a lot of addresses that do not forward to a specific mailbox, so I want to keep the catchall.

How can I do this? I have a couple of virtual hosts for others, and at some time in the future I want them to be able to add addresses to a 'block list' themselves, so preferably I'd set it up once, to be administered via MySQL.

Any help greatly appreciated, I've tried searching but no luck so far.


Last edited by SilverOne on Mon Oct 31, 2005 11:13 am; edited 1 time in total
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Oct 31, 2005 10:51 am    Post subject: Reply with quote

In postfix conf file:-

check_recipient_access hash:/etc/postfix/spam_recipients

in /etc/postfix/spam_recipients

unwanted@example.com REJECT

That'll stop it. You can list any individual unwated addresses in the spam_recipients file.

Remember to run postmap against the spam_recipients file.

Don't kid yourself that they'll ever be removed from spammers' lists - the ratware is not that bright.
Back to top
View user's profile Send private message
SilverOne
Apprentice
Apprentice


Joined: 10 Nov 2003
Posts: 161

PostPosted: Mon Oct 31, 2005 11:12 am    Post subject: Reply with quote

Thanks a lot, that's what I needed.

I'll just transform it into a MySQL table (with examples from the guide) and I'm set.

One last question though: if a single e-mail is targetted at multiple addresses (TO/CC/BCC), will one address (that is blacklisted) reject the mail to all addresses (located on the same server)?
This is just theoretical in case one of my users ask me this....
Back to top
View user's profile Send private message
magic919
Advocate
Advocate


Joined: 17 Jun 2005
Posts: 2182
Location: Berkshire, UK

PostPosted: Mon Oct 31, 2005 11:34 am    Post subject: Reply with quote

Glad it helped.

It will only reject the email for the specified recipient and not the 'other' recipients.
Back to top
View user's profile Send private message
SilverOne
Apprentice
Apprentice


Joined: 10 Nov 2003
Posts: 161

PostPosted: Mon Oct 31, 2005 11:43 am    Post subject: Reply with quote

Roger!

And thanks again.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum