Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to find a 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?

share|improve this question
up vote 3 down vote accepted



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.

share|improve this answer
Worked like a charm. Thanks :) – Aiden Bell Jan 15 '13 at 15:41
No worries - glad it worked. – MadHatter Jan 15 '13 at 17:46

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.

share|improve this answer
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

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.