Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Servers & Networking
FedoraForum Search

Forgot Password? Join Us!

Servers & Networking Discuss any Fedora server problems and Networking issues such as dhcp, IP numbers, wlan, modems, etc.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 13th July 2005, 10:39 PM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Creating a Local mail server

I am currently having some problems with setting up a mail server. I don't need a server that can recieve mail, but one that I can store all my mail on, because my ISP has POP3 and when I download my mail it gets deleted from the server, not allowing me to access it anywhere I would like. Having multiple computers it makes it a problem.

What I would like to do with this server is set it up so that it downloads all my e-mail to it and allows me to send out through it, since I can only send from one of my computers.

I've been using Mandrake for several years so I'm not completely new to the world of Linux but I am new to Fedora, so I don't know where all the configuration tools are.

If anyone can help me get started it would be much appreciated.
Reply With Quote
  #2  
Old 14th July 2005, 04:47 AM
kg4cbk Offline
Registered User
 
Join Date: Feb 2005
Posts: 675
fetchmail, imap.
Reply With Quote
  #3  
Old 14th July 2005, 05:36 AM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Ok, I understand that, I think, I need postfix, imap, fetchmail, gotmail, sendmail and many others to do that, but I'm not sure where to start in the configuration process.
Reply With Quote
  #4  
Old 14th July 2005, 03:14 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
The general outline of what you wan't is propably something like:

1. Get fetchmail to use POP3 to receive your emails from your ISP (and remove from server).
2. Sendmail accepts fetchmails resending of the retreived emails and delivers them locally to your account on your home machine.
3. Get imap (dovecot) started and configured for email reading on your local machine including remote reading from whereever you might wan't to connect and read email.
4. Configure all your email clients to connect to your machine via imap to read email.
Reply With Quote
  #5  
Old 14th July 2005, 07:22 PM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
That sounds about right. But most of the how-tos that I have found for doing that are setup for something like a small business trying to setup a mail server. So where would I look for setting that up?
Reply With Quote
  #6  
Old 14th July 2005, 09:19 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
Use keywords from my item list and google away to find a large pletora of guids and howto's. It's too much work to rewrite all of the docs needed here anyway.
The progs used are in some way for small/large companies but work perfectly well in a small setup like your trying to do. But resist the urge of doing advanced configurations and follow the main flow and you should be fine. FC has them all setup pretty well default wise. Some sendmail options need stricter control to avoid spam but that's easy to google up.
If you need pointers to specific questions feel free to ask. You've got a fun time infront of you
Reply With Quote
  #7  
Old 14th July 2005, 11:01 PM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
You said in step 2 that:

Sendmail accepts fetchmails resending of the retreived emails and delivers them locally to your account on your home machine.

What do you mean? I thought sendmail was an outbound server only and that fetchmail delivers the mail to my computer.
Reply With Quote
  #8  
Old 14th July 2005, 11:30 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
sendmail is usually setup to listen on local host for your internal programs so they can send emails. It should work out of the box. Configured to deliver email to your local users it will accept fetchmails connection and deliver your email to the local user. Sending it through sendmail also gives you power to scan for virus and do spamassassin spam rating or even delete spam email based on spam rating before local delivery. Pretty neat don't you think?
Reply With Quote
  #9  
Old 15th July 2005, 03:34 AM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Ok, now that I have fetchmail and dovecot configured and can access the mail on my other computers, how would I go about setting up for sending mail from the same server? I came accross a how to on setting up postfix, dovecot, squirrelmail, spamassassin... on Fedora Fourms however I got stuck on step 3 when configuring /etc/postfix/main.cf.

http://forums.fedoraforum.org/showth...0&page=1&pp=15

It says:
myhostname = ~YOUR IP ADDRESS OR DOMAIN NAME~
myorigin = $mydomain
inet_interfaces = $myhostname, localhost
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
home_mailbox = Maildir/

I tried to use that with some modifications but postfix wouldn't start. The modifications I tried to make were

myhostname = localhost
myorigin = localdomain
inet_interfaces = localhost, localhost
mydestination = localhost, localhost.localdomain, localhost, localdomain
home_mailbox = Maildir/

I don't have a domain name. Is that a problem?

Also with fecthmail do I need to setup some encryption method with it? If so what do I need to setup.

Last edited by New_Linux_Geek; 15th July 2005 at 03:42 AM.
Reply With Quote
  #10  
Old 15th July 2005, 12:47 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
Said to say I'm a sendmail guy myself so I can't really comment on why postfix won't start. I see no reasons why it should give you troubles with localhost. Maybe someone with postfix experience can help if you provide exact errors or whatever is needed to debug.

With fetchmail you don't need to set up encryption unless you want to and your ISP supports that.
~/.fetchmailrc that looks like:

Code:
poll pop3.server.isp.com proto pop3:
   user "x763x34" # remote ISP account name for POP3
   password "secretISPpasswd" # Remote ISP account password
   is user "localuser" password "localpwd" # Local account and password
   fetchall # Get all emails on the remote account
   nokeep # and remove them from the remote server after retreival
This requires a mail daemon (sendmail or postfix) to be listening on port 25 on localhost. Fetchmail can retreive email with SSL encryption as well with a few more config parameters.
Also you can play with adding at the end of the 'mda "/usr/bin/procmail" which would mean don't connect to sendmail/postfix but use the delivery (MDA) program procmail directly. Did not work for my friend but we did not investigate further as he got sendmail running anyway.
Reply With Quote
  #11  
Old 15th July 2005, 03:18 PM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Well, I'm having no problem with any of the inbound servers. The outbound servers I am having a problem with. I can't seem to send mail outside of my server. Here is what I have from my maillog:

Jul 15 07:49:31 localhost sendmail[6055]: j6FDnVuP006055: from=<root@localhost.localdomain>, size=688, class=0, nrcpts=1, msgid=<200507151349.j6FDnVZj006054@localhost.local domain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jul 15 07:49:31 localhost sendmail[6054]: j6FDnVZj006054: to=root, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30400, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j6FDnVuP006055 Message accepted for delivery)
Jul 15 07:49:32 localhost sendmail[6056]: j6FDnVuP006055: to=<root@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:00, mailer=local, pri=30924, dsn=2.0.0, stat=Sent
Jul 15 07:50:09 localhost imap-login: Login: ksummers [::ffff:192.168.0.250]
Jul 15 07:50:09 localhost imap-login: Login: ksummers [::ffff:192.168.0.250]
Jul 15 07:53:13 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 07:58:14 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:03:15 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:08:16 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:13:17 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:14:04 localhost sendmail[6172]: j6FEE4cI006172: Authentication-Warning: localhost.localdomain: apache set sender to ksummers@localhost using -f
Jul 15 08:14:04 localhost sendmail[6172]: j6FEE4cI006172: from=ksummers@localhost, size=532, class=0, nrcpts=1, msgid=<3767.192.168.0.250.1121436844.squirrel@192. 168.0.3>, relay=apache@localhost
Jul 15 08:14:05 localhost sendmail[6173]: j6FEE4e6006173: from=<ksummers@localhost.localdomain>, size=803, class=0, nrcpts=1, msgid=<3767.192.168.0.250.1121436844.squirrel@192. 168.0.3>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jul 15 08:14:05 localhost sendmail[6172]: j6FEE4cI006172: to=root@localhost, ctladdr=ksummers@localhost (500/500), delay=00:00:01, xdelay=00:00:01, mailer=relay, pri=30532, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j6FEE4e6006173 Message accepted for delivery)
Jul 15 08:14:05 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:14:06 localhost sendmail[6174]: j6FEE4e6006173: to=<root@localhost.localdomain>, ctladdr=<ksummers@localhost.localdomain> (500/500), delay=00:00:02, xdelay=00:00:00, mailer=local, pri=31038, dsn=2.0.0, stat=Sent
Jul 15 08:14:07 localhost imap-login: Login: ksummers [::ffff:127.0.0.1]
Jul 15 08:14:37 localhost imap-login: Login: ksummers [::ffff:192.168.0.250]
Jul 15 08:14:38 localhost imap-login: Login: ksummers [::ffff:192.168.0.250]
Jul 15 08:14:52 localhost sendmail[6210]: j6FEEq7e006210: from=root, size=20, class=0, nrcpts=1, msgid=<200507151414.j6FEEq7e006210@localhost.local domain>, relay=root@localhost
Jul 15 08:14:52 localhost sendmail[6211]: j6FEEqKf006211: from=<root@localhost.localdomain>, size=330, class=0, nrcpts=1, msgid=<200507151414.j6FEEq7e006210@localhost.local domain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Jul 15 08:14:52 localhost sendmail[6210]: j6FEEq7e006210: to=ksummers, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30020, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (j6FEEqKf006211 Message accepted for delivery)
Jul 15 08:14:53 localhost sendmail[6212]: j6FEEqKf006211: to=<ksummers@localhost.localdomain>, ctladdr=<root@localhost.localdomain> (0/0), delay=00:00:01, xdelay=00:00:01, mailer=local, pri=30572, dsn=2.0.0, stat=Sent

I can send and recieve so long as I use squirrelmail or directly in the terminal. But I try to connect via Outlook or kmail and it says it can't connect to outbound SMTP server. Now I'm really lost, and I don't think I have a map.
Reply With Quote
  #12  
Old 15th July 2005, 03:36 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
To get rid of the warning you can add apache to the file /etc/mail/trusted-users.
Sendmail is only listening on local host I presume. So you've got 2 options. Use the smtp server at your ISP for sending from outlook or setup sendmail to listen on more interfaces. Probably you need the servers internal IP for connecting to sendmail from outlook, and servers external IP for sending email onwards to other servers on internet. You can also enter your ISPs SMTP server as smart upstream host so all mails sent from sendmail will go to the ISP server and then the ISP server routes it away on the internet. The latter is the way to go if SMTP is blocked by your ISP and them provide a SMTP Proxy.
Add interface in sendmail.mc via lines of the type:
DAEMON_OPTIONS(`Port=smtp,Addr=192.168.0.1, Name=MTA')dnl
And to let upstream SMTP server do the relay:
define(`SMART_HOST',`smtp.your.provider')
Reply With Quote
  #13  
Old 19th July 2005, 04:57 AM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Now that I have everything else working. I am still having problems with sending mail out through another computer. I can send out so long as I use SquirrelMail but not via KMail. I think it's a server problem. Here are the log entries for me sending out from another computer.

Jul 18 21:52:29 localhost sendmail[3500]: j6J3qSA4003500: ruleset=check_rcpt, arg1=<test_kittyhawk@ix.netcom.com>, relay=[192.168.0.250], reject=550 5.7.1 <myemail@myISP>... Relaying denied. IP name lookup failed [192.168.0.250]
Jul 18 21:52:32 localhost sendmail[3500]: j6J3qSA4003500: from=<myemail@myISP>, size=0, class=0, nrcpts=0, proto=ESMTP, daemon=MTA, relay=[192.168.0.250]



And one last thing, how do I stop X from starting automatically when I start up the computer? With Mandrake all you have to do is stop the "dm" service from starting. Is there something simular for Fedora?
Reply With Quote
  #14  
Old 19th July 2005, 04:05 PM
Exinor Offline
Registered User
 
Join Date: Jul 2005
Location: Sweden
Posts: 12
Ahh yes, sendmail won't relay unless you are either smtp auth'ed or have rules in access.
Try editing /etc/mail/access and add:

connect:192.168.0 RELAY

Then 'cd /etc/mail' and 'make' to update the access.db database.
It tells sendmail that if someone wan't to send mail and they are connected from ip beginning with 192.168.0 then it's ok to relay.
Reply With Quote
  #15  
Old 19th July 2005, 04:59 PM
New_Linux_Geek Offline
Registered User
 
Join Date: Jul 2005
Posts: 10
Worked great.

I appreciate all that help you have given me, and all the valuable knowledge that I have learned. This has been a very valuable experence. Thanks.
Reply With Quote
Reply

Tags
creating, local, mail, server

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
can't send mial from local mail server? shams Servers & Networking 0 11th December 2006 01:16 AM
how to setup pop mail clietns for local mail server? shams Servers & Networking 7 19th July 2006 09:05 AM
sendmail can't send mail from local mail server? shams Servers & Networking 0 16th June 2006 04:35 PM
problem setting local mail server? shams Servers & Networking 5 14th June 2006 07:57 PM
how to setup thunderbird for local pop mail server? shams Servers & Networking 1 11th April 2006 01:01 AM


Current GMT-time: 12:03 (Tuesday, 21-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat