4

I am trying to find a sendmail.mc config that allows open relaying without username/password to any system (I am testing some code that uses SMTP).

After Google'd, I could not find and it has been a long since I modified the sendmail config! (It's a private system for temporary use)

Anybody can help?

рüффп
  • 620
  • 1
  • 11
  • 25
Aiden Bell
  • 609
  • 1
  • 6
  • 15

2 Answers2

4

Try

FEATURE(promiscuous_relay)

According to the doco,

By default, the sendmail configuration files do not permit mail relaying (that is, accepting mail from outside your local host (class {w}) and sending it to another host than your local host). This option sets your site to allow mail relaying from any site to any site.

MadHatter
  • 79,770
  • 20
  • 184
  • 232
2

You could achieve this with 255 lines in /etc/mail/access:

Connect:1 RELAY
Connect:2 RELAY
:
Connect:255 RELAY

You would need to rebuild the access database afterwards. And of course you do not need the whole 255 IPv4 first octets, since from 224 and above multicast addresses start.

adamo
  • 6,925
  • 3
  • 30
  • 58
  • I would prefer a variant of this solution (allowing relaying from a set of hosts) to the `FEATURE(promiscuous_relay)` solution only because "a private system for temporary use" often manages to worm its way into production. The inconvenience of maintaining a relay table (and the added security of doing it smart) would be Good Things if your project server manages to get connected to the internet somehow. – voretaq7 Jan 15 '13 at 21:03