Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

up vote 3 down vote accepted

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.

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

 
discard

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.