LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-30-2004, 06:11 PM   #1
annekaelber
Member
 
Registered: Sep 2003
Posts: 49

Rep: Reputation: 15
Question Bounce selected users in virtual domain with Postfix?


Hello,

In my continuing quest to manage my server better, I'm tackling some mail issues. Here's the quick overview of my situation:

I have a domain hosted at an ISP. I have two virtual domains being served (is this the correct term?) from the main site. I am the sole receiver of emails to the virtual sites, though I have various addresses there. I have an account on the main site (let's call it domain.com), which was so overloaded with spam, it's now in the trash (I think).

In /etc/aliases, I have this line:

<old-account>: |"exit 67"

which is bouncing all emails to the account <old-account>@domain.com. So far, so good.

Now, the _new_ domains are being hosted virtually like so (from /etc/postfix/virtual):

@virtual1.com <newaccount-on-main-site>
@virtual1.net <newaccount-on-main-site>

So far, so good. Here's the catch. I have two email address on the new server which are already corrupted (spammers) and I want them to bounce also. All emails to @virtual1.com and @virtual1.net go to one account on the domain.com site. How/where can I override for _select_ "users" in the virtual domains, like this:

corrupted1@virtual1.com <should bounce>
corrupted2@virtual1.com <should bounce>

If, in /etc/aliases, I try to say:

<corrupted1>: |"exit 67"

it's interpreted as <corrupted1>@domain.com, not as @virtual1.com

I've read all the Postfix configurations, examples and FAQs I can find and so far, nothing covers this question.

Anne.
 
Old 10-18-2007, 10:21 AM   #2
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
Hey,

Easiest thing to do is to not have the user that is being spammed. That way Postfix will outright reject it.

Did you ever find how to execute a command on a virtual mailbox?


David
 
Old 10-18-2007, 02:06 PM   #3
annekaelber
Member
 
Registered: Sep 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dlublink View Post
Hey,

Easiest thing to do is to not have the user that is being spammed. That way Postfix will outright reject it.
In the case of a virtual domain, I have not found a way to have the emails that *should* go to my account separated from those that don't map to a user on the system. Let me get into a little more detail.

If my domain is example.com (and .net), and my user account is really-me@host.net (remember my example.com and .net are virtual domains served by host.net), then I can create any email address with the following format:

<website-I-created-account-on>@example.com

Why? This lets me remove that single address should this company sell it and cause a spam overload. Also, I can more easily sort my mail into folders because I know who it's addressed to.

So the issue, to deal with the spammers who are sending fake email addresses using my domain name (and therefore getting bounces, etc, sent back to my host for my email filters to struggle with), is how to tell Postfix as early as possible "these addresses are total fakes"!

I've got a bunch of entries in /etc/postfix/recipient-access that look like this:

<non-existent-address>@example.com REJECT

Some of them still get through. I'm hoping that the email addresses I've had to throw away because of spam can be "cleaned" by a quarantine period in here....I haven't proven that yet.

Quote:
Originally Posted by dlublink View Post
Did you ever find how to execute a command on a virtual mailbox?
David
My mailbox on host.com handles all the email for my virtual domain example.com. I guess when I do anything with that mailbox, I am working with a virtual mailbox.

I'm still looking for a spam-foiling rule that will get the <alphabet-soup>@example.com addresses to bounce.

Since I wrote the first post, we've had to change (just this week) the server in our home which was retrieving mail, serving the internet and acting as a firewall. In the process, I moved to having my home computer retrieve the mail from my host.com site using the command fetchmail (use fetchmailconf to configure---very easy!).

I haven't had a chance yet to see if that will facilitate my spam-trapping. I think first I should check for upgrades to SpamAssassin and see how much that helps. I do have an extensive list of procmail filters which keeps most of the spam on the server for me to delete manually, instead of burning bandwidth to bring it down to my home computer.

My apologies for rambling so much. I've learned (from the searching-for-an-answer side of the scene) that having someone over-explain helps me to find answers!

Anne.
 
Old 10-18-2007, 02:11 PM   #4
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
hey,

I found out how to do it.

http://www.linuxquestions.org/questi...5/#post2928524

Create a service in master.cf and use transport to redirect addresses and domains to that service

David
 
Old 10-18-2007, 02:16 PM   #5
dlublink
Member
 
Registered: Oct 2004
Location: Canada
Distribution: Ubuntu
Posts: 330

Rep: Reputation: 30
For your bouncing, your entry in the transport file would be:

the.user@yourvirtualdomain.tld bounceme

where bounceme is your script to stop it. But I noticed that master.cf already has one called bounce, so you might be able to use that.

the.user@yourvirtualdomain.tld bounce


David
 
Old 10-18-2007, 02:58 PM   #6
annekaelber
Member
 
Registered: Sep 2003
Posts: 49

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by dlublink View Post
For your bouncing, your entry in the transport file would be:

the.user@yourvirtualdomain.tld bounceme

where bounceme is your script to stop it. But I noticed that master.cf already has one called bounce, so you might be able to use that.

the.user@yourvirtualdomain.tld bounce

David
David,

While this would work (as far as I know), I'd like to provide as little help to the spammers as possible. As I understand it (and since I'm not a professional in the field, I could be wrong!), REJECT just drops the incoming email with no further action. Bounce will send the message back to the sender---which is usually faked anyways and means some other poor innocent soul's domain is getting buried under the bounces coming in. Plus, bounce also requires my host.com server to do more work---and during a flurry of spammer activity, can actually bury a server pretty deeply.

I'm definitely always looking for ways to improve my set-up---especially as time goes on and I become the go-to person in my household/domain for email issues---so I appreciate any further insight into the situations of virtually hosted domains.

Anne.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtual domain & postfix jrafalek Linux - Software 1 02-05-2005 09:08 AM
postfix and virtual domain problems... MadOtis Linux - Software 1 04-28-2004 08:23 AM
Maildir, virtual postfix users sopiaz57 Linux - General 0 03-01-2004 10:19 PM
Postfix virtual domain eyt Linux - Newbie 0 02-23-2004 06:07 PM
postfix: putting users in vtables without domain kubicon Linux - Networking 0 02-17-2004 12:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration