Relay mail for a single domain, accept and dump anything else
I have a special case where I need to set up a mail server for testing
that will accept incoming SMTP mail for a given domain and deliver to
local recipients, but also accept for any other domains (not reject),
but send them to the bit bucket. I will use a Linux VM likely and will
use any MTA that does the task easily; Postfix and Sendmail preferred.
I suspect procmail may be used, but not sure if it can be invoked at
the necessary point. Any thoughts on how to approach this? TIA
--
- Kyle
Re: Relay mail for a single domain, accept and dump anything else
On Sep 15, 4:55*pm, [email]kylet@horsehill.net[/email] (Kyle Tucker) wrote:[color=blue]
> I have a special case where I need to set up a mail server for testing
> that will accept incoming SMTP mail for a given domain and deliver to
> local recipients, but also accept for any other domains (not reject),
> but send them to the bit bucket. I will use a Linux VM likely and will
> use any MTA that does the task easily; Postfix and Sendmail preferred.
> I suspect procmail may be used, but not sure if it can be invoked at
> the necessary point. Any thoughts on how to approach this? TIA[/color]
Some hints:
sendmail
access/access_db To: DISCARD
.... that's at least one possible approach that could cover
much of what you want to do ... might not be quite "perfect"
(may have some minor caveats), but should mostly make what
you're specifying quite possible.
Re: Relay mail for a single domain, accept and dump anything else
In article <d36bf709-2025-4798-98b7-5f654083d3ed@v16g2000prc.googlegroups.com>,
Michael Paoli <michael1cat@yahoo.com> writes:[color=blue]
> Some hints:
> sendmail
> access/access_db To: DISCARD
> ... that's at least one possible approach that could cover
> much of what you want to do ... might not be quite "perfect"
> (may have some minor caveats), but should mostly make what
> you're specifying quite possible.[/color]
I tried to manage this with queue groups, putting the allowed
domain in a special queue and all others in the regular one,
but had some issues. I also tried access_db but it didn't support
any wildcard syntax to discard all domains. But your hint got me
to work on it more and I was able to make it OK for the domain
I wanted and then add a DISCARD entry for each TLD based on a
current list from IANA. So this works for the purpose I need.
The only obvious shortcoming is if a new TLD pops into existance
and is used, but that's unlikely to affect what I'm trying to
do here. Thanks.
--
- Kyle