tongueroo
asked on
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-scrip t: 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 = +
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-scrip
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
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 = +
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
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.co m
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.
I know that my dsl smtp is : smtp.sbcglobalnet.yahoo.co
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.
ASKER
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.....
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.....
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Im thinking about now trying Exim. I heard that was pretty easy to set up. What do you guys think?