[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 3621
  • Last Modified:

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 = +
0
tongueroo
Asked:
tongueroo
  • 3
  • 3
4 Solutions
 
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
 
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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now