Problem as backup MX server; selective emails though

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 [at] 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 [at] 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
Alan Williamson [ Mi, 09 Januar 2008 12:16 ] [ ID #1904149 ]

Re: Problem as backup MX server; selective emails though

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 [at] domain.tld OK
To:rcpt2 [at] domain.tld OK
To:rcptX [at] domain.tld OK
To:domain.tld REJECT

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



Grant. . . .
gtaylor [ Mi, 09 Januar 2008 19:06 ] [ ID #1904160 ]

Re: Problem as backup MX server; selective emails though

* 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 [at] domain.tld OK
> To:rcpt2 [at] domain.tld OK
> To:rcptX [at] domain.tld OK
> To:domain.tld REJECT
>

Does this type of setup negate RBL checks if the message is for
rcpt1 [at] 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.
NPG [ Mi, 09 Januar 2008 21:59 ] [ ID #1904162 ]

Re: Problem as backup MX server; selective emails though

In article
<mailman.10.1199901903.1575.comp.mail.sendmail [at] maillists.riverviewtech.net>
Grant Taylor <gtaylor [at] riverviewtech.net> 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 [at] domain.tld OK
>To:rcpt2 [at] domain.tld OK
>To:rcptX [at] 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 [at] hedeland.org
per [ Do, 10 Januar 2008 00:51 ] [ ID #1904164 ]

Re: Problem as backup MX server; selective emails though

In article
<c62f1310-1656-4e75-9a78-5f4baf03687b [at] h11g2000prf.googlegroups.com> Alan
Williamson <alan [at] blog-city.com> writes:
>
>So, to only accept the emails on that domain that i want i thought i
>could do:
>
>___ /etc/mail/access ______________________
>
>alan [at] 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 [at] hedeland.org
per [ Do, 10 Januar 2008 00:59 ] [ ID #1904165 ]
Miscellaneous » comp.mail.sendmail » Problem as backup MX server; selective emails though

Vorheriges Thema: tune memory usage and sending speed
Nächstes Thema: sendmail from address setting