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.

By default, sendmail (I have version 8.13 on an RHEL4) allows only local mails.

I wanted to allow mails from a particular network to be relayed via the system, so I did the following based on suggestions from various places :

  1. /etc/mail/access : Added the subnet and the domain 8.37 RELAY mydomain.com RELAY (I assume this is the originating email's domain)

This alone did not work, so I added the following to sendmail.mc FEATURE(access_db)dbl

Now, the problem is that it is allowing access from other domains as well. To test it out, I removed 8.37 RELAY from the access, and changed the email from field to abhinav@notmydomain.org

However, I still receive the mail.

What is the correct way to configure this, so that only mails from a particular subnet are relayed ?

share|improve this question

migrated from superuser.com Jul 31 '09 at 11:04

This question came from our site for computer enthusiasts and power users.

add comment

2 Answers 2

up vote 1 down vote accepted

The correct syntax to allow a subnet to relay is:

Connect:192.168                 RELAY

How are you testing whether or not the server is disallowing relaying? Make sure that when you do your relay test, you're not trying to send mail to a domain hosted by the mail server. It'll accept it. Try using an external host to relay mail through your server to, say, gmail.

share|improve this answer
add comment

Try using the "Connect: RELAY" method in access, allowing relay from the subnet and rejecting the rest.

share|improve this answer
add comment

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.