Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How Do I Relay Everybody?

Status
Not open for further replies.

riverdog100

Programmer
Jan 18, 2007
1
US
I've been configuring Sendmail for a couple of days and I got it to send mail from outlook. Here is my setup...

I have an Apache webserver running on RedHat Linux. We have 200 customers that we want to provide free web and e-mail services to. Our customers need to be able to send and receive email from anyone, and our server will relay the messages.

I set up one domain (lantis.com) with an MX record (mail.lantis.com) at Network Solutions. I setup user rick in Linux, and in Sendmail, created a virtuser rick@lantis.com > rick. I added lantis.com and mail.lantis.com to the relay file.

I then set up appropriate auth configurations in sendmail.

Then, I setup the rick@lantis.com email account in Outlook, with rick as use and the app. password. I tried sending email from rick@lantis.com to rick@vestanotes.com It kept giving me a 550 relay error.

I looked for a solution on the web, and found that if I added vestanotes.com > RELAY to the relay file in sendmail, the email went through. Great! but wait a minute...

I would have to add every domain in the universe to the relay file in order to get my customers' email to send and receive mail from other domains.

So what am I doing wrong? How do I setup sendmail to relay all domains except those I choose to REJECT?

Thanks in advance.

 
Your /etc/mail/access file should look like this.
Code:
localhost        OK
lantis.com       OK
Also, did you perform makemap after editing the access file?
Code:
makemap hash /etc/mail/access < /etc/mail/access

M. Brooks
 
You don't want to "relay everybody" because that would make your mail server an open relay. Spammer could spoof the return address and send spam through your server. There are bots out there that do nothing but look for servers like this. You would find your server blacklisted and nobody accepting mail from it. I would suggest that you use some type of smtp authentication in addition to the normal pop3 authenticaion. I have given detailed instructions on how to do this in a recent thread so you shouldn't have to look too deep to find it. Sorry I can't think of the exact one right now but it is well worth the trouble and it only takes a few minutes to setup. When you have smtpauth setup, you don't need anything in your access database but localhost, localhost.localdomain and 127.0.0.1. This will cause everything passing through your server to be authenticated. You should also have all domains that you provide mail for in a file called /etc/mail/local-host-names.


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top