One subnet can use my server for relay

One subnet can use my server for relay

Post by Mark » Sat, 22 Mar 2003 16:11:17



I have sendmail 8.12.8 running on Solaris 8 accepting mail for around
400 domains (in relay-domains file).  I filter the email for spam
and viruses, then forward the email on to the customers MTA (via
mailertable.)

All has been going quite well for the last 18 months but today one of my
customers alerted me to the fact that he could relay through my server.
Even though I only allow relaying to the domains of my customers, he was
able to send emails to his mother-in-law on worldnet.att.net, not in my
relay-domains file.


   # echo "/map mailertable worldnet.att.net" | /usr/lib/sendmail -bt
   ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
   Enter <ruleset> <address>
   > map_lookup: mailertable (worldnet.att.net) no match (0)
   >

   #

As you can see from the log entries, he did it from two different
workstations - same class C block.

   Mar 20 14:52:46 hbg-serveredx sendmail[20502]: [ID 801593 mail.info]

   nrcpts=1,

   proto=SMTP, daemon=MTA-v4, relay=mutts.ardemgaz.com [12.109.201.17]

   Mar 20 14:53:03 hbg-serveredx sendmail[20600]: [ID 801593 mail.info]

   xdelay=00:00:16, mailer=esmtp, pri=120106,
   relay=gateway2.worldnet.att.net. [12.102.240.23], dsn=2.0.0, stat=Sent
   (ok ; id=200303201952471140023h3fe)

   Mar 20 14:59:55 hbg-serveredx sendmail[25222]: [ID 801593 mail.info]

   nrcpts=1,

   proto=SMTP, daemon=MTA-v4, relay=ads.ardemgaz.com [12.109.201.9]

   Mar 20 15:00:13 hbg-serveredx sendmail[25426]: [ID 801593 mail.info]

   xdelay=00:00:16, mailer=esmtp, pri=120106,
   relay=gateway2.worldnet.att.net. [12.102.240.23], dsn=2.0.0, stat=Sent
   (ok ; id=2003032019595701300d1dh2e)

I get hundreds of relay attempts every day (yesterday ~700 relay attempts
vs 244000 emails successfully sent through the server) but this is the
first evidence I've seen of relaying allowed.  Here is my sendmail.mc

   divert(0)dnl
   VERSIONID(`$Id: generic-solaris.mc,v 8.13 2001/06/27 21:46:30 gshapiro
   Exp $')
   OSTYPE(solaris8)dnl
   DOMAIN(generic)dnl
   define(`confTO_IDENT',`0s')dnl
   define(`confMILTER_LOG_LEVEL', 8)dnl
   define(`SMTP_MAILER_FLAGS',`C')dnl
   FEATURE(`nocanonify')dnl
   FEATURE(`access_db', `dbm -T<TMPF> /etc/mail/access')dnl
   FEATURE(`virtusertable', `dbm /etc/mail/virtusertable')dnl
   FEATURE(`mailertable', `dbm /etc/mail/mailertable')dnl
   FEATURE(`genericstable', `dbm /etc/mail/genericstable')dnl
   FEATURE(`smrsh',`/usr/lib/smrsh')dnl
   FEATURE(`redirect')dnl
   FEATURE(`use_cw_file')dnl
   FEATURE(`blacklist_recipients')dnl

R:5m;E:11m')dnl (word wrapped here - on one line in my file)
   MAILER(local)dnl
   MAILER(smtp)dnl

Sorry for the long post.  Any ideas?  TIA.

--
Mark Frank - CCNP, CCDP
Networking Engineer - Network Services LLC
mfrank at networkservices dot net
"The fix is only temporary...unless it works." - Red Green

 
 
 

One subnet can use my server for relay

Post by Per Hedela » Sat, 22 Mar 2003 17:22:32




>I have sendmail 8.12.8 running on Solaris 8 accepting mail for around
>400 domains (in relay-domains file).  I filter the email for spam
>and viruses, then forward the email on to the customers MTA (via
>mailertable.)

>All has been going quite well for the last 18 months but today one of my
>customers alerted me to the fact that he could relay through my server.
>Even though I only allow relaying to the domains of my customers, he was
>able to send emails to his mother-in-law on worldnet.att.net, not in my
>relay-domains file.

Putting domain names in realy-domains allows relaying to *and* from
those domains (i.e. from hosts that have an IP address that correctly
reverse-resolves to a name in one of those domains), as documented in
cf/README. If you want more fine-grained control, use access db:

To:domain.com  RELAY

- again see cf/README.

--Per Hedeland


 
 
 

1. Relaying and Fault tolerant issue: Using more than one internal SMTP server

Hi to all,

I have a domain 'abc.com' and all the incoming Internet mail arrives to our
Internet attached 'gateway.abc.com' machine. Later, all the mail is sent to
the internal smtp server sitting in the inside network using the relay
capabilities of sendmail.

Now, I'm trying to setup a fault tolerant mail system, so instead of having
a single host in the Relay rule I'd like to have an internal pseudo-domain
which in turns has two mx records (smtp-1.abc.com and smtp-2.abc.com)

I tried to tell sendmail to use that pseudo-domain to force it looking for
MX records withtout success.

Any ideas/suggestions would be greatly appreciated.

TIA,

Josep Roman

PS: BTW, I'm running Solaris 2.5.1 and Sendmail 8.9.1

2. Backup of PIX config

3. can I use different sendmails in one subnet?

4. Detecting Browsers in FP98

5. Relaying with users from different subnets

6. Stomped by GP application inconsistency on multihomed DC!

7. RELAY for Subnet

8. Pascal str2num example

9. 550 relaying denied: How to give SMTP authorization to a subnet?

10. relaying by subnets

11. What config would cause subnets of my network to use esmtp mailer, others use relay mailer?

12. relay/subnet/ip address

13. using sendmail as a relay host for one domain