Newbie: Network setup required for sendmail
Hi,
I want to learn settng up a mail server to send and recieve mails to/from any address on any m/c. But first I want to be sure that I have correct network setup for this purpose. I have my computer connected to wireless router which is in turn connected to internet. Can anyone tell me if I can configure my computer as a mail server. What I understand is since this is on LAN it may not be possible to send a mail to any user on this computer from a m/c outside the LAN. Please suggest me. I also want to know what are these options mean in /etc/mail/sendmail.mc file? define(SMART_HOST,mail.yourdomain.com) MASQUERADE_AS(yourdomain.net) FEATURE(allmasquerade) FEATURE(masquerade_envelope) What is the difference between define(SMART_HOST) and MASQUERADE_AS options? I would greatly appreciate any help. hThank you. Regards, Deepika |
I would leave sendmail config files alone for now. They should work ok to start with. You will need to get your router to forward port 25 to the internal IP of your server. Then get your mx record changed for your domain to point to your routers IP address.
Once that is done. Try sending an e-mail to your server as a client on your network. and try sending mails back in. If these fail then make sure that: 1) You don't have any firewall rules blocking port 25 2) That sendmail isn't just listening on the loopback: netstat -nlp |
Quote:
If you define MASQUERADE_AS, your system will use the masquerade name you define; for example, if you are masquerading as "clockwork.org" and your username is "alex", any mail you send will appear to have come from "alex@clockwork.org". If you enable envelope masqerading, the envelopes of your mail messages will have the masquerade name clockwork.org, not just the message itself. Remember, humans (with the occasional exception such as myself) do not ever see email envelopes, they are only used by the server. Mail clients like Outlook, Pine, Eudora et al cannot show you a mail envelope - they are not mail servers and do not receive this information. Sendmail does though. I'm afraid I've forgotten what enabling allmasquerade does. Look here for more information, |
Thank you all for your help.
david_ross, I don't understand what you mean by Quote:
Medievalist, you say Quote:
Thanks a lot. |
why you don't leave sendmail alone and try to get postfix.
postfix is a secure MTA and easy to configure. |
Quote:
If you want to use a domain name to send/recieve mail then yes, you would have to purchase one. You can alternatively use the IP address: root@[128.23.257.345] by using IP's you take DNS out of the loop and therefore a domain name is not required. (note i used an invalid ip on puropse) |
Quote:
You can also just guess - try mail.isp.net (substitute your ISP's domain name for isp.net) and smtp.isp.net and relay.isp.net and pop.isp.net and whatever else you can think of. If your ISP does not block outgoing connections for port 25 (that's the port used by all Email engines, including postfix, qmail, and sendmail) you don't need SMART_HOST anyway - you can deliver directly from your own sendmail. But with the proliferation of worms like SoBig and Yaha, most ISPs are blocking that sort of traffic now and require you to use a relay host. I was delivering my mail directly for three years or so, but comcast recently blocked me out and I had to implement SMART_HOST. You really should study up on DNS a bit, IMHO - it's not really very difficult conceptually and it's pretty critical to understanding the kind of tasks you want to do. The O'Reilly book "DNS and BIND in a nutshell" is good, although it's dry as dinosaur bone. |
Incidentally, if you post your sendmail.mc file I can critique it for you. I disagree with the previous poster; configuring postfix is not significantly easier than sendmail, especially for a newbie.
Sendmail has a bad rep because it used to be mind-numbingly difficult to configure (I have written sendmail.cf files, so I know what I'm talking about) and it is so ancient is has had more bugs discovered (and patched) in it than any other mailserver. Postfix is less mature, far less configurable, arguably less powerful, and somewhat less compatible with other mail software (such as MailScanner, SpamAssassin, etc. etc. etc) but it is more secure than sendmail by design and arguably simpler to configure. |
Thanks once again.
I guess I'll first learn a bit about DNS configuration and then try Sendmail configuration. |
Good Luck
|
Sendmail configuration with DNS server!!!
Hi all,
I am back to sendmail configuration after setting up my own DNS server. I have registered my domain 'deepawan.com' and it seems to be working fine. DNS server is running on my linux m/c behind the router and now I want to run my mail server on the same m/c. I have added an MX entry for my domain in zone file 'deepawan.com.zone' as below. 24.46.176.178 is external IP address of my router. Quote:
And also modified my sendmail.cf to accept mail from any interface as shown in below file. Quote:
Message from yahoo.com. Unable to deliver message to the following address(es). <deepika@deepawan.com>: 24.46.176.178 does not like recipient. Remote host said: 550 5.7.1 <deepika@deepawan.com>... Relaying denied Giving up on 24.46.176.178. I can't figure out what is the problem. Can anyone help me with something? I will appreciate any help. Thanks & Regards, Deepika |
You should probably get rid of the
FEATURE(`accept_unresolvable_domains')dnl because it really does make a difference in the amount of spam you will receive. That's not what your current problem is, though. Shouldn't this line MASQUERADE_AS(deepa.com) look like this MASQUERADE_AS(deepawan.com) ? Did you run sendmail.mc through the m4 process and restart sendmail afterwards? #m4 /etc/mail/sendmail.mc > /etc/sendmail.cf #service sendmail restart Does your cw file (/etc/mail/local-host-names) contain deepawan.com mail.deepawan.com [24.46.176.178] localhost localhost.localdomain If you make sure those last two are in there, you can remove the line Cwlocalhost.localdomain from your sendmail.mc (it won't hurt anything if you don't remove it, though). |
should it be /etc/sendmail.cf or /etc/mail/sendmail.cf ??
|
Since you've got
OSTYPE(`linux') your sendmail configuration is in /etc/sendmail.cf as of this writing. I expect it will change to /etc/mail at some point in the future, probably at a moment calculated to cause the greatest possible havoc for me personally. |
Hi Medievalist, Thanks a lot.
I have succeeded in receiving outside mail on my mail server. The problem was that I didn't have 'deepawan.com' in my /etc/mail/local-host-names. After adding that it works fine. I also discovered that both /etc/sendmail.cf and /etc/mail/sendmail.cf work. Looks like first sendmail looks for /etc/sendmail.cf and uses it if this exists and if /etc/sendmail.cf doesn't exists then uses /etc/mail/sendmail.cf. May be you can confirm this. Thanks for other suggestions in /etc/sendmail.mc file too. Now if I want to configure my mail server for receiving mails for other virtual domains say deepika.com. do I have to register this domain too? Or is there other way to do it. Thanks once again. Regards, Deepika |
All times are GMT -5. The time now is 10:38 PM. |