Click to See Complete Forum and Search --> : Relaying with Sendmail


prince_kenshi
07-13-2001, 05:56 PM
Well I'm trying to get internet e-mail working on a computer I set up at my school. I finally got all the DNS stuff working. When I try to send mail from the computer itself, it works fine. But then I moved to another computer, configured Outlook to use it, and receiving messages was fine. But when I tried to send something, it said that I didn't have permission to relay. Well it took me forever to figure out how to make it relay. I had to put the subnet in a relay configuration file. (It's more complicated than that but I'll leave it at that.) Well that's fine but I want all valid users to be able to send and check their e-mail from home or anywhere. I couldn't figure out how to tell it to accept messages from anyone. I saw on a confusing document on the Sendmail homepage about some promiscuous_mode option but it didn't say where to put it. It hardly helped at all.

Basically what I want to do is allow users to send e-mail from anywhere in the world, but I don't want to lose authentication of the user. Does anyone know how to do this? And if it comes down to it, does anyone know of another smtp server that is easier to configure for this? Thanks.

PLBlaze
07-13-2001, 08:12 PM
Since you configured sendmail to relay (was it relay-domains file with hostname RELAY options?)you could make access file and put the hosts,usernames,domains that can/will have acess to sendmail server...make sure to run makemap on the file to create access.db or no worky (might want to consult sendmail.org for exact command).

Another option is to use SASL (Simple Authentication System Library) AUTH compiled with sendmail, where you can have authentication realms (even write your own plugins) independent of your system ...but if you go this route be prepared for some good reading as Cyrus-SASL is not well documented and *IS* a pain to configure.Hope this helps.

datadan
07-13-2001, 08:44 PM
Depending on client, extra configuration may be required.

Outlook Express for example needs to have "My Server Requires Authentication Checked" on the server tab.

Also check for other blocks
/etc/hosts.deny (for wrappers)
ipchains -l (for ipchains)

prince_kenshi
07-13-2001, 10:22 PM
Originally posted by Diffie:
<STRONG>Since you configured sendmail to relay (was it relay-domains file with hostname RELAY options?)you could make access file and put the hosts,usernames,domains that can/will have acess to sendmail server...make sure to run makemap on the file to create access.db or no worky (might want to consult sendmail.org for exact command).</STRONG>

I have been playing with relay-domains from the vague documentation I saw at sendmail.org. I've been able to get certain subnets to be able to mail, but I want a computer from anywhere on the internet to be able to do e-mail with the usernames I've provided. I've scoured the home site and can't find anything on the matter. The documentation doesn't make much sense to me nor my teacher. It talks about a "FEATURE(promiscuous_delay)" option but doesn't say where to put it. I really don't want people to be able to relay though unless they're authenticated. Do you have any idea how to do this? And I read that about makemap, but I am able to change the contents of relay-domains and restart sendmail and the changes have taken effect. By the way, I have told the e-mail clients to use authentication and pretty much changed every setting in it to get it to work. It only works when my domain is specifically listed.

prince_kenshi
07-14-2001, 02:14 AM
I tried to use the promiscuous_mode feature just to try something out, yet it still says I don't have permission to relay. I think I've found what I'm looking for, but when I make a change to sendmail.mc, it doesn't take effect. The site says that makemap is only for database files (like access) and not for sendmail.mc. I see nothing else on the site about that except restarting the daemon which I am doing. I went through and read the first half of their long tutorial and still don't understand it well. Is there something I'm just missing here?

PLBlaze
07-14-2001, 03:55 PM
The feature promicious_mode feature needs to be appended in your *.mc file then run thru m4 utility to generate proper sendmail.cf file (never directly edit sendmail.cf, use mc/m4 to generate it).

At this point i'd suggest you get the sendmail's source and configure/install sendmail from scratch with said feature(s).As i mentioned before relay-domains should allow host in the file to relay (you can use ip addys too eg. 192.168.0.0 RELAY will allow relaying from any host on the subnet same goes for real ip #'s).Do you have access file too? if not create it with syntax like this:
--&gt; cat /etc/mail/access
loclahost RELAY

then run it thru makemap to genrate access.db

You might also want to create local-hostnames file with hosts that are local to sendmail (put each hostname on a single line).

Finally you might want to visit this site and learn about SASL http://asg2.web.cmu.edu/sasl

Have you tried google.com? or better yet groups.google.com comp.mail.sendmail in specific, i remeber there were discussions about similar topic/problem.Hope this helps yet again.

[ 14 July 2001: Message edited by: Diffie ]

prince_kenshi
07-14-2001, 09:43 PM
Can you tell me offhand how to create the .cf file exactly? I searched the site for that specific information reading through about 30 documents but couldn't find anything about it. It basically says that it's an M4 file and moves on. It does mention how to compile the access file (though you really have to read carefully to find it). By the way, I don't intend to use promiscuous_mode if I can get this working. I read that there's a mode that allows messages to be relayed by default if they're to or from a user on the local server. I think it would work if I could just make it work. [sighs]

PLBlaze
07-14-2001, 11:37 PM
As mentioned before get the sendmail source and read the docs and sample mc files...some distros provide generic mc file found in the same dir where sendmail.cf lives,read man m4 for details how to generate the cf file(m4 sendmail.m4 &gt; sendmail.cf would create it).

If you intend to use source and upgrade to latest 8.11.4 (which btw you should if not done already) the you go to sendmail-8.11.4/sendmail/cf/cf and look for generic-linux.mc,modify it with features you'd like then run Build in the same dir...and install sendmail,copy newly generated sendmail.cf to /etc/mail and start sendmail daemon, finally test it.Hope this helps.

prince_kenshi
07-15-2001, 02:43 AM
Ok, I managed to get it recompiled. It still doesn't seem to be acting right. The manual says that relay_entire_domain should allow all e-mail to or from users on the domain. I'm trying to use my computer at home to send e-mail from the computer at school (with my username on that machine) to my Yahoo account but it still says that I'm not allowed to relay. I'm e-mailing from my freakin account on the machine; I should be able to relay! This is just irritating me. I also tried setting it to promiscuous_relay but then it gives me an error that that's not present. Thanks for the help so far.

PLBlaze
07-15-2001, 10:49 AM
Hmmm...i'm runing out of ideas.Have you tried to put the hostname of your school box in relay-domains or access file? or even the ip.

Another thing is that there could be an issue with DNS, do you have internal dns running and mx records defined or you resolve thru your ISP?

Have you read the README in sendmail source cf dir?It should tell you what each feature does and how to define it in mc file to later build cf one.

Perhaps try posting to comp.mail.sendmail, lots of folk are helpful there and should point to in right directon... :D

prince_kenshi
07-15-2001, 01:12 PM
I have the subnet IP for the entire school in relay-domains. And I don't have a problem relaying from another computer in the school. But I can't do it from home. I could put my subnet in there too but that wouldn't help other people at their house.

DNS has been a problem lately. It's running on both the machine itself and another machine in the school. It was originally running on the granitecanyon.com free servers. I've changed the settings in my domain hosts to point at the two servers at my school last Thursday, but it points to the machine with Sendmail and one of the Granite Canyon servers still. It should have completely updated by now. The mx records are on the Sendmail computer though so it should still work.

I have read the tutorial on the official web site. It does give a brief explanation of each feature. For relay_entire_domain, it said something like "relays all mail by default to or from any user on the local domain." I'm trying to send the mail from the local domain but using a client at my house. I don't understand why it wouldn't work like this.

I probably will send a message on the mailing list if I can't get this figured out here. I just figured it was something easy that I didn't understand because I know very little about smtp relaying. This is the first time I've ever worked with an e-mail server.