How to set up server with email

Currently my server has php mysql ftp ssh etc

I need beginner guide to completely add email to my server.

I host websites and they want their name @ their domain . com

And web access to their mail.

I know 500 points isn't enough after i get a solution I will awards 2000 points.
LVL 10
Tyler LaczkoAsked:
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.

michofreihaCommented:
this is a step by step guide that will help a lot:

http://www.linuxselfhelp.com/quick/sendmail.html
0
Tyler LaczkoAuthor Commented:
i need a complete beginner guide. list of exact commands to execute and everything.
0
fosiul01Commented:
hahahaahh 2000 points , how will u do that ??

anyway :
first of all

who is responsible for Dns management ??

the article michofreiha sent its   good.

but before configuring sendmail, you need to check few options
like /etc/hosts what have you put their

example : if your domain is www.yourdomain.com 
and if you configure your Mx record as mail.yourdomain.com  then in /etc/host you should write mail.yourdomain.com first , other wise later on other mailserver like yahoo or hotmail they will reject your mail.

at first let   you make your mail server work then will talk about webmail options

also : do you want to allow user to out outlook to access your mail server ??



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.

fosiul01Commented:
also, i always follow this link

http://www.howtoforge.com/howto_sendmail_smtp_auth_tls

i work on centos, but it should work with ubundu


you are trying to use sendmail but if you want to secure sendmail and best option is sendmail + tls
setup is easy just copy and past.
0
michofreihaCommented:
You can either follow this one:

http://flurdy.com/docs/postfix/
0
fosiul01Commented:
last one i will say to look the basic setup
http://beginlinux.com/server_training/mail-server/977-senmail-basic-setup

but remember,if you dont secure your sendmail , following day you will see every mail server is rejecting your mail and you will end up block list as this happened with me.

if you have any question related setup sendmail you can ask
0
sleepless6Commented:
you can try this tutorial as well:

http://www.howtoforge.com/perfect-server-ubuntu8.04-lts
0
Tyler LaczkoAuthor Commented:
Could not get it set up correctly. decided not to do it...
0
fosiul01Commented:
Hi, you should of let us know where you were having problem, you asked for beginner guide for setup email and thats what we provided you.

you could of ask further question here or you could of open another question where actually  you were having probelem.

dont understand why you want to delete this question.


0
fosiul01Commented:
0
Tyler LaczkoAuthor Commented:
Since some of you felt that I should not have given up I setup a new server using how to forge.

My issue is that I cannot send emails. I setup squirrel mail and can receive emails but I am getting

Connection timed out

in my mail.log every time I try to send out.
0
fosiul01Commented:
ok from server , can you sent email ??

i mean, from comand line : try to do this

cat /etc/host | mail -s "mysubject" youremail@gmail.com

see if you can sent email or not
0
Tyler LaczkoAuthor Commented:
i have tried that and from squirrelmail and the log says that it times out.
0
fosiul01Commented:
forget squirrelmail for now

fix the sendmail first.

have tryed that command as root user ??

0
Tyler LaczkoAuthor Commented:
yes i tried it as root user and regular user.
0
fosiul01Commented:
there must be something else in maillog with time out error
can you please past the full error here, it would be easy to understand

time out could be to many thing, like you are trying to send email to a host but host is rejecting so it will say time out...
0
Tyler LaczkoAuthor Commented:
Nov  4 08:06:29 pcsask postfix/qmgr[7272]: 67C112C1096: from=<root@pcsask.com>, size=293, nrcpt=1 (queue active)
Nov  4 08:07:00 pcsask postfix/smtp[8975]: connect to janus.myabitat.net[139.142.45.185]:25: Connection timed out
Nov  4 08:07:00 pcsask postfix/smtp[8975]: 67C112C1096: to=<tylerl@wrightconstruction.ca>, relay=none, delay=315304, delays=315274/0.01/30/0, dsn=4.4.1, status=deferred (connect to janus.myabitat.net[139.142.45.185]:25: Connection timed out)
Nov  4 08:12:06 pcsask postfix/sendmail[9004]: fatal: usage: sendmail [options]
Nov  4 08:12:36 pcsask postfix/smtpd[9005]: connect from localhost[127.0.0.1]
Nov  4 08:12:36 pcsask postfix/smtpd[9005]: 139612C1022: client=localhost[127.0.0.1]
Nov  4 08:12:36 pcsask postfix/cleanup[9007]: 139612C1022: message-id=<c7aea21d8c74b5e1745e63d673c3da9e.squirrel@pcsask.com>
Nov  4 08:12:36 pcsask postfix/qmgr[7272]: 139612C1022: from=<liquidvenom@pcsask.com>, size=710, nrcpt=1 (queue active)
Nov  4 08:12:36 pcsask postfix/smtpd[9005]: disconnect from localhost[127.0.0.1]
Nov  4 08:12:36 pcsask imapd: Connection, ip=[::ffff:127.0.0.1]
Nov  4 08:12:36 pcsask imapd: LOGIN, user=liquidvenom, ip=[::ffff:127.0.0.1], port=[44051], protocol=IMAP
Nov  4 08:12:36 pcsask imapd: LOGOUT, user=liquidvenom, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=615, sent=203, time=0
Nov  4 08:12:36 pcsask imapd: Connection, ip=[::ffff:127.0.0.1]
Nov  4 08:12:36 pcsask imapd: LOGIN, user=liquidvenom, ip=[::ffff:127.0.0.1], port=[44053], protocol=IMAP
Nov  4 08:12:36 pcsask imapd: LOGOUT, user=liquidvenom, ip=[::ffff:127.0.0.1], headers=469, body=0, rcvd=296, sent=1892, time=0
Nov  4 08:12:39 pcsask imapd: Connection, ip=[::ffff:127.0.0.1]
Nov  4 08:12:39 pcsask imapd: LOGIN, user=liquidvenom, ip=[::ffff:127.0.0.1], port=[44054], protocol=IMAP
Nov  4 08:12:39 pcsask imapd: LOGOUT, user=liquidvenom, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=391, time=0
Nov  4 08:12:40 pcsask imapd: Connection, ip=[::ffff:127.0.0.1]
Nov  4 08:12:40 pcsask imapd: LOGIN, user=liquidvenom, ip=[::ffff:127.0.0.1], port=[44055], protocol=IMAP
Nov  4 08:12:40 pcsask imapd: LOGOUT, user=liquidvenom, ip=[::ffff:127.0.0.1], headers=0, body=0, rcvd=87, sent=391, time=0
Nov  4 08:13:06 pcsask postfix/smtp[9009]: connect to mx2.hotmail.com[65.54.245.40]:25: Connection timed out
Nov  4 08:13:36 pcsask postfix/smtp[9009]: connect to mx4.hotmail.com[65.54.245.104]:25: Connection timed out

0
fosiul01Commented:
ok check this one
http://www.linuxtopia.org/ProblemSolutions/smtp_port_25_timeout.html

this problem occur, when gmail or hotmail or yahoo will not accept email from your IP

what kind of ip you got ??is this public or dynamic ?

do you have permission to sent emaiil via this ip ( i mean by using port 25 directly ??)

you might need to use realy host and use isp mail server to send email.
0
Tyler LaczkoAuthor Commented:
I have squirrel mail setup for outgoing smtp smtp.sasktel.net:587 using auth with my username and password

I think i have postfix configured the same...
0
Tyler LaczkoAuthor Commented:
my main.cf
 cat main.cf
# See /usr/share/postfix/main.cf.dist for a commented, more complete version
 
 
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname
 
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
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
 
readme_directory = no
 
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
 
# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.
 
myhostname = pcsask.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = pcs-sk.sytes.net, worktherigs.com, pcsask.com, localhost, xboxmod.sytes.net
relayhost = smtp.sasktel.net:587
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
local_recipient_maps =
luser_relay = liquidvenom@pcsask.com
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
home_mailbox = Maildir/

Open in new window

0
Tyler LaczkoAuthor Commented:
I am getting:

host smtp.sasktel.net[142.165.72.18] said: 530
    5.7.0 No AUTH command has been given. (in reply to MAIL FROM command)
0
fosiul01Commented:
check this article  , it will help you with your problem

http://ubuntuforums.org/showthread.php?t=316711

0
Tyler LaczkoAuthor Commented:
i tried to telnet smtp.sasktel.net 587

auth login

username
password


failed to login


i contacted sasktel and they said that my account may not be active yet.
0
fosiul01Commented:
here we go that mean, you need to wait to activate your account
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
Tyler LaczkoAuthor Commented:
I can send email. It was my ISP's fault.

But how do I create new accounts for squirrelmail??? I have my main account that I can log into but my other accounts i create it just says ERROR: Connection dropped by IMAP server.

What type of account am I supposed to create?
0
fosiul01Commented:
i never worked with postfix,
so i need to check documentaion, i will come back to you after 2 to 3 hours later as my office hour finished,
0
fosiul01Commented:
about this ERROR: Connection dropped by IMAP server., can you provide me the full log of this error please
it will help to understand
0
fosiul01Commented:
but the concept, you need to give permission other accounts to send mail via postfix

i will come back to you as i said
0
Tyler LaczkoAuthor Commented:
found my error.

the reason for the error is because squirrelmail cannot login with that account because it hasnt been setup

the user i was testing with had a different home dir with wrong permissions

i created a new users with a proper home dir and it works.

i am going to write a php page to setup new email accounts.
0
fosiul01Commented:
have a look this one

http://www.squirrelmail.org/wiki/MailServerIMAPProblem

let me know if helps
i will look for article more

0
fosiul01Commented:
thats good
so your problem has been solved ???
0
Tyler LaczkoAuthor Commented:
thank you for your help
0
Tyler LaczkoAuthor Commented:
You didn't answer my question BUT i changed so many things including my question and you helped me through it all.

Thank you. Full points
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
Linux

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.