Problem as backup MX server; selective emails though

Problem as backup MX server; selective emails though

am 09.01.2008 12:16:12 von Alan Williamson

Good day all, i have faith that someone here can assist what i am sure
is probably something wrong at my end.

here is the problem.

I have successfully setup a sendmail box to act as a backup server for
my main mail server. It correctly takes the email and pushes it to
the main server when it comes back up.

HOWEVER, i want to make a subtle change here.

The domain in question gets a huge amount of spam to addresses that do
not exist or have gone. So I have compiled a list of the 10 emails I
want it to relay for, and the others it can reject. This saves a huge
amount of bandwidth and resources as it doesn't need to upload email
that will only get rejected.

To relay everything on my @mydomain.com then i do this, and it works
beautifully. (i have done all the necessary MX and other settings for
this to happen).
_________________________

mydomain.com RELAY
_________________________

So, to only accept the emails on that domain that i want i thought i
could do:

___ /etc/mail/access ______________________

alan@mydomain.com RELAY
blog-city.com REJECT
_________________________

But I get the error message: 550 Access denied

So how can i achieve what i want?

Any help, pointers would be much appreciated.

thank you

Re: Problem as backup MX server; selective emails though

am 09.01.2008 19:06:42 von gtaylor

On 01/09/08 05:16, Alan Williamson wrote:
> The domain in question gets a huge amount of spam to addresses that do
> not exist or have gone. So I have compiled a list of the 10 emails I
> want it to relay for, and the others it can reject. This saves a huge
> amount of bandwidth and resources as it doesn't need to upload email
> that will only get rejected.

*nod*

What you are wanting to do can be done simply enough.

I too have many domains in my /etc/mail/relay-domains file. I have
added entries like the ones below to my Access DB to ""educate Sendmail
on what recipients are good (if a recipient is not good it is then bad).

To:rcpt1@domain.tld OK
To:rcpt2@domain.tld OK
To:rcptX@domain.tld OK
To:domain.tld REJECT

This allows relaying only for recipients that are known to be good and
rejects the rest.



Grant. . . .

Re: Problem as backup MX server; selective emails though

am 09.01.2008 21:59:41 von NPG

* Grant Taylor wrote:
> On 01/09/08 05:16, Alan Williamson wrote:
>> The domain in question gets a huge amount of spam to addresses that do
>> not exist or have gone. So I have compiled a list of the 10 emails I
>> want it to relay for, and the others it can reject. This saves a huge
>> amount of bandwidth and resources as it doesn't need to upload email
>> that will only get rejected.
>
> *nod*
>
> What you are wanting to do can be done simply enough.
>
> I too have many domains in my /etc/mail/relay-domains file. I have
> added entries like the ones below to my Access DB to ""educate Sendmail
> on what recipients are good (if a recipient is not good it is then bad).
>
> To:rcpt1@domain.tld OK
> To:rcpt2@domain.tld OK
> To:rcptX@domain.tld OK
> To:domain.tld REJECT
>

Does this type of setup negate RBL checks if the message is for
rcpt1@domain.tld ?

My setup is like this, and I noticed that RBL checks don't appear to be
done for OK recipients.

See the thread: Is the problem access.db or dnsbl checks?
For all the gory details.

Re: Problem as backup MX server; selective emails though

am 10.01.2008 00:51:56 von per

In article

Grant Taylor writes:
>On 01/09/08 05:16, Alan Williamson wrote:
>> The domain in question gets a huge amount of spam to addresses that do
>> not exist or have gone. So I have compiled a list of the 10 emails I
>> want it to relay for, and the others it can reject. This saves a huge
>> amount of bandwidth and resources as it doesn't need to upload email
>> that will only get rejected.
>
>*nod*
>
>What you are wanting to do can be done simply enough.
>
>I too have many domains in my /etc/mail/relay-domains file. I have
>added entries like the ones below to my Access DB to ""educate Sendmail
>on what recipients are good (if a recipient is not good it is then bad).
>
>To:rcpt1@domain.tld OK
>To:rcpt2@domain.tld OK
>To:rcptX@domain.tld OK
>To:domain.tld REJECT
>
>This allows relaying only for recipients that are known to be good and
>rejects the rest.

Note that a) having the domain in relay-domains allows relaying not just
to but also from the domain, and b) this requires
FEATURE(`blacklist_recipients') (that's the one that checks the 'To:'
entries in this case, 'OK' does not allow relaying per se).

--Per Hedeland
per@hedeland.org

Re: Problem as backup MX server; selective emails though

am 10.01.2008 00:59:36 von per

In article
Alan
Williamson writes:
>
>So, to only accept the emails on that domain that i want i thought i
>could do:
>
>___ /etc/mail/access ______________________
>
>alan@mydomain.com RELAY
>blog-city.com REJECT
>_________________________
>
>But I get the error message: 550 Access denied
>
>So how can i achieve what i want?
>
>Any help, pointers would be much appreciated.

Here's a pointer:
http://groups.google.com/group/comp.mail.sendmail/msg/b2c4a2 8956ce821f

Note, you don't need the REJECT entry if access db is the only way you
allow relaying for the domain - just leaving the bare domain name out
means that relaying is only allowed to the recipients you have given.

--Per Hedeland
per@hedeland.org