From: mouss (no email)
Date: Thu Mar 01 2007 - 17:10:40 EST
Justin McAleer wrote:
> I'm setting up a server that all of our customers will use for
> outbound mail. For domains that we host, it will send the messages to
> our internal servers, and otherwise out to wherever the MX record
> points. The problem I'm dealing with is I want
> postmaster/abuse/root@<local domains> to all be redirected to a
> handler address. So, I have a pcre map included in the virtual alias
> maps like so:
>
> /^postmaster@/
>
> The problem is that virtual alias expansion is done to all recipients,
> not just those hosted by us, so we would end up intercepting messages
> to , for example. What is the best way to only redirect
> mail to our domains? I'd like to avoid listing postmaster/abuse/root
> for the hungreds of domains we host, so I thought I'd ask for any
> other suggestions for a more static solution.
>
as Noel said, use a script. alternatively use mysql or so, when you can
write the query to do what you want.
> While I'm asking stuff, I have clamsmtpd running on this server as a
> content filter, reinjecting back into Postfix. Could I only send the
> non-hosted mail through clamsmtpd, and just pass on hosted mail to the
> internal servers (they do AV scanning)?
>
you need multiple instances: in the instance before the filter, use
transport_maps instead of content_filter to send mail to the filter for
the hosted domains, and to the second instance for other mail.
multiple instances are needed because transports are global within an
instance (multiple instances mean running postfix multiple times, not
adding multiple lines to a single master.cf...).
Note that using FILTER isn't reliable because only one content_filter is
used, even if there are multiple recipients.
you can even use 3 instances here, where one instance gets mail from
clamsmtpd and only handles your hosted domains. In this instance, you
can use your aliases without a script.
|
|
|