OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
A couple of newbie (but hopefully not numptie) questions

From: Mark Goodge (markgood-stuff.co.uk)
Date: Wed Mar 26 2008 - 06:35:47 CDT


Hi,

I'm relatively new to Postfix (I'm more familiar with Exim and (spit)
Sendmail), so it's possible that the answers to both of these questions
are staring me in the face if only I'd read the documentation correctly
(or possibly the answers are "it can't be done with Postfix"), but
either way I'd appreciate the necessary pointers :-)

Anyway, my questions are:

1. How can I configure Postfix to forward, rewrite or redirect (whatever
the correct terminology is) mail so that only the domain part changes.
That is, I want to configure it so that $local_partexample.com is
rewritten to $local_partexample.co.uk and then handed off to whatever
mail server is responsible for example.co.uk (assuming that my server is
primary MX for example.com, but some other mail server is primary MX for
example.co.uk). For those familiar with Exim, what I'm looking for is
the Postfix equivalent of this configuration:

   redirect_example:
     driver = redirect
     domains = example.com
     data = ${quote:$local_part}example.co.uk
     no_more

Does that make sense? If that's possible with Postfix, what should I be
looking for to configure it?

2. How can I configure Postfix to discard mail from the null sender to a
specific recipient? That is, I want <> to be able to send mail to every
valid user on my system except johnexample.com, while johnexample.com
can receive mail from any valid external sender except <>.

To give some background to this question, the aim is to deal with
"backscatter" spam where a specific user has been on the wrong end of a
joe-job and their address is getting massive quantities of inbound
bounce messages. I don't want to discard all mail from the null sender
to all recipients, as that's generally a Bad Thing, but in this case the
quantity of backscatter is so great that not only is it overwhelming the
user's mailbox but also it's affecting performance for all other users
of the server. So the discard needs to be pre-queue; it's not sufficient
to let the bounces pass through the queue and then be discarded later.

Again, does this question make sense, and is what I'm asking possible
with Postfix? Alternatively, can anyone suggest alternative strategies
of dealing with this particular problem (I'm sure other people have
encountered the same thing in the past)?

(Just for clarity, I should add that these two questions are entirely
independent and apply to two different systems that I help to maintain).

Thanks in advance for any help

Mark
--
http://www.good-stuff.co.uk - some stuff, some of it good