bouncing emails for non existent sub domains

This is a discussion on bouncing emails for non existent sub domains within the SendMail forums in Other Technologies category; Hi Crew, Recently i configured my sendmail server to use the mailertable to send all non local email out through an external spam filter appliance. The mailertable looks like this: --- host1.internal.example.com smtp:[host1.internal.example.com] host2.internal.example.com smtp:[host2.internal.example.com] .. smtp[IP_OF_SPAM_FILTER] --- This works great for the main use cases. However i seem to have hit a few edge scenarios. some users at my site accidentally send emails with nonexistent subdomains of my domain, eg. bogus.example.com. These email are being accepted by sendmail and forwarded on to the spam appliance, which sees them as local to my domain and send them back to the ...

Go Back   Application Development Forum > Other Technologies > SendMail

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 09-08-2008, 03:14 AM
Ram
Guest
 
Default bouncing emails for non existent sub domains

Hi Crew,

Recently i configured my sendmail server to use the mailertable to
send all non local email out through an external spam filter
appliance.

The mailertable looks like this:

---
host1.internal.example.com smtp:[host1.internal.example.com]
host2.internal.example.com smtp:[host2.internal.example.com]
.. smtp[IP_OF_SPAM_FILTER]
---

This works great for the main use cases. However i seem to have hit a
few edge scenarios.

some users at my site accidentally send emails with nonexistent
subdomains of my domain, eg. bogus.example.com.

These email are being accepted by sendmail and forwarded on to the
spam appliance, which sees them as local to my domain and send them
back to the sendmail host. this goes on till i get a "Too many hops"
error and the message is discarded (i think)

Can anyone suggest a solution to this. I really just want to bounce
these incorrectly addresses emails back to the user who sent them. It
would be great if this could happen in the initial smtp session if
possible.

Reply With Quote
  #2  
Old 09-08-2008, 10:57 AM
Grant Taylor
Guest
 
Default Re: bouncing emails for non existent sub domains

On 09/08/08 02:14, Ram wrote:
> Can anyone suggest a solution to this. I really just want to bounce
> these incorrectly addresses emails back to the user who sent them. It
> would be great if this could happen in the initial smtp session if
> possible.


It sounds like you have your sendmail install configured to accept
unresolvable domains. I say this because sendmail by default should be
rejecting the initial message because of the invalid recipient domain.



Grant. . . .

Reply With Quote
  #3  
Old 09-08-2008, 02:23 PM
Andrzej Adam Filip
Guest
 
Default Re: bouncing emails for non existent sub domains

Grant Taylor <gtaylor@riverviewtech.net> wrote:

> On 09/08/08 02:14, Ram wrote:
>> Can anyone suggest a solution to this. I really just want to bounce
>> these incorrectly addresses emails back to the user who sent
>> them. It would be great if this could happen in the initial smtp
>> session if possible.

>
> It sounds like you have your sendmail install configured to accept
> unresolvable domains. I say this because sendmail by default should
> be rejecting the initial message because of the invalid recipient
> domain.


Are you sure it covers envelope *recipient* address?

--
[pl>en Andrew] Andrzej Adam Filip : anfi@onet.eu : anfi@xl.wp.pl
God help the troubadour who tries to be a star. The more that you try
to find success, the more that you will fail.
-- Phil Ochs, on the Second System Effect
Reply With Quote
  #4  
Old 09-08-2008, 02:33 PM
Grant Taylor
Guest
 
Default Re: bouncing emails for non existent sub domains

On 09/08/08 13:23, Andrzej Adam Filip wrote:
> Are you sure it covers envelope *recipient* address?


Um, fairly sure. Any time I've tried (it's been years) to send an email
with a stock sendmail config (read: no accept unresolvable domains) I
get a rejection when I try to send to an invalid domain.



Grant. . . .

Reply With Quote
  #5  
Old 09-08-2008, 02:57 PM
Andrzej Adam Filip
Guest
 
Default Re: bouncing emails for non existent sub domains

Grant Taylor <gtaylor@riverviewtech.net> wrote:

> On 09/08/08 13:23, Andrzej Adam Filip wrote:
>> Are you sure it covers envelope *recipient* address?

>
> Um, fairly sure. Any time I've tried (it's been years) to send an
> email with a stock sendmail config (read: no accept unresolvable
> domains) I get a rejection when I try to send to an invalid domain.


I have tested on two servers without "accept unresolvable" that sendmail
happily accepted messages to x@x.invalid submitted from 127.0.0.1.

--
[pl>en Andrew] Andrzej Adam Filip : anfi@onet.eu : anfi@xl.wp.pl
If you live to the age of a hundred you have it made because very few
people die past the age of a hundred.
-- George Burns
Reply With Quote
  #6  
Old 09-08-2008, 03:19 PM
Grant Taylor
Guest
 
Default Re: bouncing emails for non existent sub domains

On 09/08/08 13:57, Andrzej Adam Filip wrote:
> I have tested on two servers without "accept unresolvable" that
> sendmail happily accepted messages to x@x.invalid submitted from
> 127.0.0.1.


Ok, I think the fact that the message is coming from 127.0.0.1 is
playing a part. Can you try from another source IP, namely one that is
not allowed to relay in the same fashion as 127.0.0.1?



Grant. . . .

Reply With Quote
  #7  
Old 09-08-2008, 05:48 PM
Per Hedeland
Guest
 
Default Re: bouncing emails for non existent sub domains

In article
<444201be-b429-4409-8928-7bbea914a6fd@i20g2000prf.googlegroups.com> Ram
<ramsmith@gmail.com> writes:
>
>some users at my site accidentally send emails with nonexistent
>subdomains of my domain, eg. bogus.example.com.
>
>These email are being accepted by sendmail and forwarded on to the
>spam appliance, which sees them as local to my domain and send them
>back to the sendmail host. this goes on till i get a "Too many hops"
>error and the message is discarded (i think)


Your sendmail and the spam appliance obviously needs to agree about who
does what. It seems the spam appliance thinks that your sendmail should
handle user@*.example.com, while your sendmail has only been told to
deal with a small subset of that, namely host1.internal.example.com and
host2.internal.example.com, and to send the rest to the spam appliance.
One of them needs to change.

You could for example add a line

..example.com error:5.1.2:550 Host unknown

to your mailertable, which will cause sendmail to reject any
subdomains/hosts that aren't explicitly listed.

>Can anyone suggest a solution to this. I really just want to bounce
>these incorrectly addresses emails back to the user who sent them. It
>would be great if this could happen in the initial smtp session if
>possible.


The above will do that.

--Per Hedeland
per@hedeland.org
Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 10:01 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.