Relay mail for a single domain, accept and dump anything else - Unix

This is a discussion on Relay mail for a single domain, accept and dump anything else - Unix ; 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), ...

+ Reply to Thread
Results 1 to 3 of 3

Thread: Relay mail for a single domain, accept and dump anything else

  1. 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

  2. Re: Relay mail for a single domain, accept and dump anything else

    On Sep 15, 4:55*pm, kylet@horsehill.net (Kyle Tucker) wrote:
    > 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


    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.

  3. Re: Relay mail for a single domain, accept and dump anything else

    In article ,
    Michael Paoli writes:
    > 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.


    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

+ Reply to Thread