setting up mail server, debian, postfix

Im running debian linux and have gotten apache, php, perl, mysql, and everything else to work, but can't get email to work.  Ive been trying the last three days and am near giving up on using sendmail at all.  What is the easiest MTP I can use and to set up.  I have installed and uninstalled sendmail and postfix on and off again in the last 3 days and couldn't get any of them working at all, which probably means that I dont have a very good understand of the mail server concepts.  Also, it could possible mean that I have screwed up some other settings.

I have static IP SBC DSL and am using www.easydns.com to point my domain name: www.mydomain.com, to my real WAP ip address.  On my router, I have opened up ports 80 for apache, 22 for ssh, 21 for ftp, and 25 for email.

I want to get email to work so I can email to admin@mydomain.com, help@domain.com and so on.  On my debian, system, right now I only have two account: root and tung.  So I guess I would need to set up email accounts admin and help first.
I want to use postfix, because I heard that its compatiable with sendmail, that'll be good because I have perl scripts that use sendmail.

Also, easydns.com has MX settings what are those all about?
These are:
smtp.easydns.com.
smtp2.easydns.com.


I have re-installed postfix with apt-get, and when I try to reload postfix, I get this error:
postfix: fatal: /etc/postfix/postfix-script: No such file or directory.
I check the directory, and there's no postfix-script there.
So, now I start, stop and restart postfix by typing in:
/etc/init.d/postfix start
/etc/init.d/postfix stop
/etc/init.d/postfix restart

Also, I tried this: "telnet localhost smtp", and get this error:
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
I tried "telnet localhost", without the stmp, and get the same error:

Files on my system, that I know I configure, but dont fully understand:
##############
# /etc/hosts
##############
127.0.0.1      localhost
192.168.2.100   debian  hoghost mailhost

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

##############
# /etc/resolv.conf
##############
search mydomain.com
nameserver 192.168.2.1

##############
# /etc/postfix/main.cf
##############
# See /usr/share/postfix/main.cf.dist for a commented, more complete version

smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

myhostname = debian
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $mydomain $myhostname localhost.$mydomain
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
tonguerooAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

wesly_chenCommented:
Hi,

   There is step-by-step guide to set up Linux Debian Postfix
   http://www.idealog.us/2004/10/helpful_guide_t.html
or the Mailman with Postfix
http://homex.subnet.at/~max/mail/mailman.php

Regards,

Wesly
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
tonguerooAuthor Commented:
Still cant postfix working.

Im thinking  about now trying Exim.  I heard that was pretty easy to set up.  What do you guys think?
0
wesly_chenCommented:
Hi,

   Exim is good. Easy to config and built-in spam filter. You can download from
http://www.exim.org/

Wesly
   
0
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

raymanwCommented:
Hi,

Head over to http://techrepublic.com.com/ & check out the article "Set up a basic e-mail server with Postfix as the MTA"

Ray
0
tonguerooAuthor Commented:
Okay, Im trying Exim, and it looks like I can reveive mail locally.  I want to email the to the rest of the world though.  I cant email to the rest of the world.

I know that my dsl smtp is : smtp.sbcglobalnet.yahoo.com

This all boils down to getting my perl script to work so that user's can submit a form on my website and get auto respond email.

0
tonguerooAuthor Commented:
Im still havent trouble sending mail to remote addresses.


This is what I type:
debian:/# exim4 -v -odf tung@tunguru.com
testing testing... 123...
.

This is what I get:
.
LOG: MAIN
  <= root@debian U=root P=local S=251
R: nonlocal for tung@tunguru.com
LOG: MAIN
  ** tung@tunguru.com R=nonlocal: Mailing to remote domains not supported
LOG: MAIN
  <= <> R=1CRFtM-00020F-Vd U=Debian-exim P=local S=1028
R: system_aliases for root@debian
R: system_aliases for tung@debian
R: userforward for tung@debian
R: procmail for tung@debian
R: maildrop for tung@debian
R: local_user for tung@debian
T: appendfile for tung@debian
LOG: MAIN
  => tung <root@debian> R=local_user T=mail_spool
LOG: MAIN
  Completed
LOG: MAIN
  Completed

So, I know the error:
"  ** tung@tunguru.com R=nonlocal: Mailing to remote domains not supported"
But dunno how to get rid of it.....

0
wesly_chenCommented:
Hi,

   You probably need to reconfig exim4 to check "smarthost" or something like that.
# dpkg-reconfigure exim4

Wesly
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Email Protocols

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.