LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 04-12-2003, 01:23 AM   #1
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Rep: Reputation: 30
How can I receive email addressed to myusername@myowndomain.com


I have a cable modem connection. I was wondering if it is possible to configure my linux box as a type of email server. I want to be able to reply to emails using my domain name. And receive emails addressed to myusername@mywondomainname address. I dont have a domain name yet but am reading about dyndns.org. I My cable modem uses dynamic ip. I remember in the past that I was able to send email to others using pine using my own username@localhost.localdomain but of course I cannot receive mail because my localdomain is not registered with any dns servers. (I think that is the reason) . I just want to be able to not rely on isp email addresses. As soon as you change isp. Your email address is gone. Thanks for any help you can give
 
Old 04-12-2003, 02:42 AM   #2
marsonist
Member
 
Registered: Sep 2002
Location: Stuttgart, Germany
Distribution: SuSE 9.1 Pro
Posts: 171

Rep: Reputation: 30
So long as your internet provider doesn't block port 25 (many do to prevent people from setting up there own spam servers) All you should need is a Dynamic DNS service, registered domain, (as you already know) and a mail program such as postfix or sendmail configured.

The Dynamic DNS service that you use will probably have an area for setting up your MX (mail exchange) records. This should be set to whatever you mail server would be called (If you had a domain with multiple sub domains ex: ftp.mydomain.com, mail.mydomain.com... ) If you don't have any subdomains, and your mail server is just running on mydomain.com, just use that.

I can't give you great advice on postfix or sendmail, as I end up playing around with them and using trial and error.

Some advice, make sure that the domain name of your computer matches the domain name that you've registered. Some spam filters will see the difference in domains, and block it. Also be sure to block mail relaying, or spammers are going to have a field day with your server and their mail.

It's great having your own mail server, but be aware that your mail may not get sent to every server. I've been having problems sending mail to AOL, somehow there server is denying connections to mine. (again, probably some sort of spam filtering) Trial and error and scanning your mail logs will help you to find out how/why they filter you, and perhaps lead you to a solution.

Good luck!

Any questions, just ask


Steve
 
Old 04-12-2003, 09:16 AM   #3
marsonist
Member
 
Registered: Sep 2002
Location: Stuttgart, Germany
Distribution: SuSE 9.1 Pro
Posts: 171

Rep: Reputation: 30
oh, and before I forget, zoneedit.com will give you dynamic dns services for any registered domain for free. (Not to mention do free e-mail forwarding, and other pretty fancy things) I have used it for about a year and never had any problems :-)
 
Old 04-12-2003, 02:30 PM   #4
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I am really a newbie at this. How do I determine if port 25 is blocked and does it matter that my main pc is behind a netgear router (it is a dhcp client to the router)? Thanks
 
Old 04-14-2003, 04:25 AM   #5
marsonist
Member
 
Registered: Sep 2002
Location: Stuttgart, Germany
Distribution: SuSE 9.1 Pro
Posts: 171

Rep: Reputation: 30
To see if your port 25 is blocked it's easiest to try and send test messages to another mail account something like hotmail or yahoo would work fine. Secondly this tool will help to see if you are able to recieve mail, even if you aren't fully configured yet. (you must still be at least partially configured)

As for the router, this article (which is written for no-ip.com, but should also apply to zoneedit.com) should help you out a bit.

As for actually configuring mail servers, I've always "cheated" and used Webmin. I have personally found sendmail easier to setup than postfix, but I guess that could just be a personal taste.

Let me know if you get it up and running :-)

Steve
 
Old 04-14-2003, 05:11 AM   #6
Shak
Member
 
Registered: May 2002
Location: Huddersfield
Distribution: Redhat (7.2, 7.3, 8.0), Debian, Slackware, Gentoo, FreeBSD
Posts: 169

Rep: Reputation: 30
Personally, I've always used either Qmail or Exim for my mailservers, Exim is far more powerful but Qmail is so much easier to setup, you might want to look at the following links:

http://www.lifewithqmail.org/ - A great guide on setting up Qmail
http://www.din.or.jp/~ushijima/qmail-conf/pop3.html - Running Qmail with POP3

Hey, if this post helps, please click the affero button

Shak
 
Old 04-15-2003, 12:05 AM   #7
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I am trying to understand the logistics of this all. Basically, my goal is to be able to send messages from my localhost.localdomain (I will have to reconfigure with a different hostname.domainname) to internet addresses (or intranet) and receive mail addressed to my localhost.localdomain. The way I understand it , the steps involved are as follows:
MUA - Kmail or Evolution sends the message to the MTA. Kmail or evolution will be pointed to the local SMTP server for outgoing mail. (he local SMTP server which I am trying to create.)
MTA (qmail or sendmail-my SMTP server) sends the message to the internet address or a intranet address using the SMTP protocol. It basically looks for port 25 on a remote SMTP mail server (hotmail, yahoo,earthlink,etc ) or it decides to mail to a local user. The MTA also listens on port 25 locally and negotiates with other MTA's from other internet SMTP servers that are trying to send mail to my localhost.localdomain. The messages my SMTP server accepts as valid are delivered to a local mailboxes.
MDA (Procmail) not really a necessity but it can provide some message filtering and routing options. I think qmail does this too.
MUA I read the email in Kmail or Evolution.My incoming mail server is still my local SMTP. Evolution or Kmail will then display the contents of the mail directory that procmail or qmail wrote the messages in.

Sending email out to remote mail servers should be easy. I dont require a dns address for this. Its the receiving of the messages that is the problem. This is why I need to setup a local mail server with qmail for example. But my local mail server needs to be accessible from the internet which is where DNS comes in. DNS will resolve the address to an IP which will be pointed to my netgear router and somehow pointed to the local IP of my mail server. I must have port 25 open and listening to it. Dyndns or a similar service should allow me to do this. I think it is a free service . Basically I register a free domain name : myhost.dyndns.org. This basically becomes my @localhost.localdomain email address part. My email address would then be myusername@myhostname@dyndns.org . If I want it to be myusername@myhostname.mydomain then I need a custom dns. Having a dynamic IP, I have to somehow determine/detect when my isp changes my IP and run an update script which will tell dyndns.org what my current ip is. I could be wrong on a lot of the above. I have made some assumptions based on just reading a few articles.
Now as far as the acronyms. SMTP is the internet mail transfer protocol used by most (all?) mail servers. POP3 is simply a server that houses the messages temporarily for users that dont have a local mail server or are not always connected to the net. Kmail or evolution with any ISP is always pointed to the ISP POP3 server for incoming mail( a local MTA is not needed which is why port 25 can be blocked and still be able to send and receive email) . It is pointed to the ISP SMTP server for outgoing mail (its server is always up and connected to the net and hence no need for a temporary repository.
Are the above logistics correct. If not let me know. Other questions that I may have are regarding security. Basically I am opening my pc server to the world. How secure is the SMTP server? What security features are built in. Can an attacker gain access to my system through SMTP or are the default configurations secure enough? What can an attacker do if he gains access through SMTP. How do I protect myself from spammers? I figure a local install of spamkiller should do the trick to filter out spam that is addressed to me As far as using my server as a relay (which I think means, that my address may be used as a psedo origin for spam targets - even though relay basically means my server just acts a conduit to pass mail to other mail servers or recipients on the internet. Worse possible case scenario is my mail server is used as a tool to broadcast spam to other computers on the net if that is even possible as I dont intend to broadcast spam myself. What about DMZ - designating a PC in the local LAN as the server (supposed to be the least secure segment but I might block everything except port 25. So many questions. Thanks again.
 
Old 04-15-2003, 02:25 AM   #8
marsonist
Member
 
Registered: Sep 2002
Location: Stuttgart, Germany
Distribution: SuSE 9.1 Pro
Posts: 171

Rep: Reputation: 30
As for the big picture I think you've got a very good understanding.The only glaring exception would be your mail addresses. If your domain became xxx.dyndns.com then mail would go to user@xxx.dyndns.com. Also, most dynamic dns services will provide you with a script that will regularly check to see if your IP changes. When it does it will send the update. Otherwise, most on the ball.

SMTP Mail servers are typically pretty secure. Make sure that you are using the latest versions, and updated to newer ones when they come out. As for mail relays, you can disable that by allowing your server to only accept mail to your domain (xxx.dyndns.com would be the only allowable domain as per my previous example.)

As for avoiding SPAM I would suggest going to freshmeat or Sourceforge and searching for spam filter, and finding the one that best suits your needs.

I think you have a better grasp of how the whole mail thing works than I did when I started using them. I would suggest giving it a try and playing around a bit. It's not that tough :-)
 
Old 04-16-2003, 12:08 AM   #9
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
Do you think I can run a mail server on a 466 machine with 8 mb of RAM. I dont think Redhat will install but perhaps there is a smaller distro that I might be able to install or perhaps an older distro . I wonder how secure an older distro is though. I have a spare 486 and if I can configure that as the mail server, I can basically just leave it up running all the time and leave it out of sight. I wont need X or a display once properly configured. I can always just ssh to it. Also I am thinking that I also need to do port forwarding on the netgear router.
 
Old 04-20-2003, 11:58 PM   #10
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I was able to install Redhat 5.2 on an AMD 486 DX 66 machine with 8 mb RAM. I did not install X to decrease system resource use. Configured a DNS server there with forward and reverse mappings for my internal lan. nslookup verifies that reverse mapping works. Dig verifies that forward mapping works. I can ssh to any machine (except the 486 which I havent configured for this yet) using the actual hostname.domainmame that I setup. Dig mydomainname returns a server error (I think because there is no actual dns mapping anywhere in the world for my home lan domain). I think that is ok I only need it for local use anyway. I have setup a dyndns account and my router automagically updates the dynds.org with my correct ip. I have verified with the zone edit tool that my smtp port 25 is indeed not blocked (yay!). By the way I am using qmail because of the exellent documentation. I have configured kmail on one of my lan machines to use smtp for sending mail. I configured receiving to a local mailbox ( I think this is the problem). Anyway, I can send mail through the smtp after I enabled hotmail.com in rcpthosts ( I think this is dangerous, I will disable this later as it allows my smtp to relay for any hotmail address if I understand it correctly - I will just use the local sendmail for outgoing. ) My problem is I cannot seem to be able to receive mail. qmailctl stat on the mail server shows messages on the queue which I sent to myself using hotmail. I think I need to point my local mailbox dir to somewhere where qmail deposits it. Do I export the mailserver mailbox via nfs? My other question is why does the message stay in the queue, isnt it supposed to be written to a local mailbox in the mail server machine? Thanks.
 
Old 04-21-2003, 12:49 AM   #11
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I disabled the name server and tried again. I dont know exactly what I did but I got mail in my my user home dir Mailbox file. I will play with this again tomorrow
 
Old 04-22-2003, 12:09 AM   #12
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I am able to send and receive mail. Using maildir format. Trying to setup a pop3 server. Can this server be the same machine? The qmail pop3d setup requires a fully qualified domain name in the run script. It doesnt seem to be working with the dns that I registered for the smtp.
 
Old 04-22-2003, 05:45 PM   #13
cmisip
Member
 
Registered: Aug 2002
Posts: 189

Original Poster
Rep: Reputation: 30
I figured it out. tcpserver could not bind to port 110 because inetd is bound to it. Modified /etc/inetd.conf and commented out pop-3. The mail server is up and running. I only use it for receiving mail and use sendmail for sending mail as a security measure. i have a side benefit of a running local nameserver so all the machines in the lan are reachable with their actual names instead of ip numbers. Anybody have suggestions on how to secure the linux box? Thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
email 'send' NO - email 'receive' YES..? captain skywave Linux - Wireless Networking 4 04-23-2005 03:35 AM
email 'send' YES - email 'receive' NO..? captain skywave Linux - Wireless Networking 1 04-22-2005 05:23 AM
email spam not addressed to me? pH* General 1 09-10-2004 11:05 AM
RE:Email Receive Problem norm Linux - General 0 01-08-2002 04:23 AM
Email Receive Problem norm Linux - Newbie 0 12-28-2001 01:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 04:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration