# Sendmail access_db



## gpatrick (Apr 3, 2011)

I've looking in the (1200 page) O'Reilly Sendmail "Bat" book, but have been unable to find an answer about rejecting connections.  

I have my own domain that I only want to receive mail from a few individuals.  So in my access_db I can put:

```
From:user@allowed.net OK
```
And I know I can reject with:

```
Connect:domain.com REJECT
```

But how do I reject from all connections?  I realize my envelope headers will be first so they don't get rejected, but is there a wildcard for everything else?

Something like:

```
Connect:*.* REJECT
```


----------



## DutchDaemon (Apr 3, 2011)

I guess this should work just fine:


```
From:user@allowed.net                 OK
From:anotheruser@anotherallowed.net   OK
To:your.domain                        REJECT
```

Make sure you test thoroughly before using.


----------

