LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   simple mail server issue postfix/dovecot (https://www.linuxquestions.org/questions/linux-newbie-8/simple-mail-server-issue-postfix-dovecot-904820/)

Gil@LQ 09-24-2011 01:35 PM

simple mail server issue postfix/dovecot
 
Hi all,

i just installed postfix and dovecot, did simple configuration edits to .conf files, insalled squirrelmail aswell. it's opening but not sending and receiving mails. in outlook it says log on to incomming mail server pop3 failed. Please help me, i need to build a simple mail sever so that clients can use it either using squirrel mail or in outlook.

please help me how to build. i was wasting lot of time without sleep but i couldn't do. need a mail server on rhel 5 or 6, i'm using rhel 6

thanks in advance

rahulkya 09-24-2011 03:30 PM

I am forgetting some steps of configuring the squirrel mail. But I can suggest one thing.
If you can- install webmin on your machine. Then login by browser
Here username is
Quote:

root
and password will be root's password.
Its a graphical frontend for many Administrative tasks.
I will get back to you once I recall my squirrel mail configuration

ShanxT 09-24-2011 10:59 PM

Although I haven't used postfix, I could help you with basic mailserver troubleshooting.

From the terminal of the mail server, post the outputs of (while logged in as root)

Code:

netstat -tnlp | grep :25

netstat -tnlp | grep :110

netstat -tnlp | grep :143

telnet localhost 25

If the connection above takes place, please try sending an email via telnet, as shown on this site.
You could try by sending yourself an email first, and seeing the result of that, try sending to outside domains.

Also while doing this, look at the /var/log/maillog file. Post the results of that as well.

And finally, post the outputs of the postfix and dovecot config files. Even if I can't help, it'll be useful for someone else who might be able to help you.

Gil@LQ 09-26-2011 03:14 PM

rahul and shan thanks for your response, it's working throug telnet or smtp, but i need to configure it using outlook or squirrel mail for clients, so please tel me what should i do to use mail clients like outlook with linux mail server

thanks
subbu

ShanxT 09-28-2011 11:25 AM

Configuring in Outlook is really simple.. You simple enter the relevant hostname (or IP address) and ports, and it should start working. It would be no different as compared to connecting to a Windows mail server. If you can't connect via outlook, see if it connects from that client to the server via telnet. Else, post the outlook error.

For squirrelmail, try following this page. Although it's outdated, the essence is still the same. You just have to download squirrelmail, untar it in /var/www/html, rename the folder to something like 'webmail', and then run ./conf.pl. After filling in the appropriate values (server name, imap settings, etc), edit httpd.conf, and voila! Squirrelmail works!

deep27ak 09-29-2011 05:30 AM

To install squirrel mail you will need to download the tar file.
here is a link where you can find one

http://squirrelmail.org/download.php

make a directory inside /var/www/
Code:

#mkdir /var/www/mail
and unzip the file tar file inside this directory. You can use this command for that

Code:

#tar -tjvf squirrelmail.x.x.x.tar.bz2
you might also need php and php-imap to install PHP supports for Apache/IMAP.
Code:

#yum -y install php php-imap
Code:

#cd /var/www/mail
Now make one symlink for the squirrelmail.x.x.x

Code:

#ln -s squirrelmail.x.x.x/ mail
Now you can check the symlinks

Code:

#ls -l

Now just edit your apache configuration file with the virtual host entry

Code:

#vi /etc/httpd.conf
(at the end of the file)
Code:

<virtualHost 192.x.x.x:80>
  ServerAdmin mail@server.example.com
  DocumentRoot /var/www/mail/
  <Directory /var/www/mail>
  Options FollowSymlinks
  Order allow,deny
  Allow from all
</Directory>
</VirtualHost>

Here server is the name of your machine and example.com is the domain name so change as per your namchine hostname and domain name.
IP used is your machine's IP.
Restart the apache server
Code:

#service httpd restart
Now configure the squirrel mail server

Code:

#cd /var/www/mail/mail/config/

#./config.pl

Now follow the instructions to edit your squirrelmail as per your requirements.

You also might need to Create 'attach' and 'data' directories for SquirrelMail: /var/local/squirrelmail/{data,attach}
(if you go for default settings)

Change the ownership of both these files to apache
Code:

#chown -R apche:apache /var/local/squirrelmail/
Go to the browser and mention the ip of your machine
http://192.168.x.x/mail

you will get the login page

try logging with one of your self created user

*********************************************************************

If you are unable to send or receive mails

you will require to install dovecot for Imap server and smtp sendmail server

lithos 09-29-2011 06:31 AM

For Outlook to access POP mail you have to configure Dovecot,
but all that and maybe more iredmail can do it for you, so you just need to install it and provide some configuration info through the setup process.

Don't hesitate to try it, it has a very good Webmail (Roundcube) and administration (Postfixadmin)

good luck

Gil@LQ 09-29-2011 04:54 PM

Thank you for you all ShanxT,deep27ak and lithos. I tried all your steps installed configured postfix admin also. But i have small issue, i tried all in rhel5. But In rhel6 there is no squirrel mail. I want installed rhel6 on main server, can anyone of you tel me how to install it on rhel6 or any webmail client like squirrel mail.
Thanks for your time.

lithos 09-30-2011 02:26 AM

maybe you can try roundcube
or somehow iredmail installation guide
with some minor differences between versions in the guide and iredmail available version

Gil@LQ 09-30-2011 04:02 PM

hi, lithos thank you very much. you given me a great link, i'll try. but it's included with my sql, anyways i gave me a chnace to work with my sql aswell. but one small doubt isnt any web mail comes with rhel6 like squirrelmail with rhel5. ??

Thanks for your great link .

Gil@LQ 11-25-2011 12:48 PM

deep27ak, really you are great man, it worked like that. thank you very much. I'm replying after quiet a long, but it was due to some reasons. Thank you very much. But only one mistake i did is, when i type my ip http://192.168.85.111, directly squireel mail opening. but i want as you written http://192.168.85.111/mail. Please tel me where did i do mistake.

thank you.

deep27ak 11-26-2011 02:33 AM

Quote:

Originally Posted by subbarao_ganeshna (Post 4533849)
deep27ak, really you are great man, it worked like that. thank you very much. I'm replying after quiet a long, but it was due to some reasons. Thank you very much. But only one mistake i did is, when i type my ip http://192.168.85.111, directly squireel mail opening. but i want as you written http://192.168.85.111/mail. Please tel me where did i do mistake.

thank you.

What I did earlier was made an extra mail directory inside /var/www/mail and created a symlink for that additional mail directory so that when I type

Code:

192.168.0.100/mail---------->squirrelmail opens up
But you can create an alias entry at the bottom of httpd.conf like this

Code:

Alias /mail  /var/www/mail
<Directory /var/www/mail/>
        AllowOverride None
        Options None
        Order allow,deny
        Allow from all
</Directory>

and then try
Code:

192.168.0.xxx/mail

Gil@LQ 12-03-2011 06:08 AM

hi deep,

it's working fine now, but samll doubt, we can install squirrel mail in centos6 using yum command before that we need to configure EPEL repo on our server. but it's not possible on rhel6 due to RHN license, So in rhel6 one should install as you said. download squirrel mail , untar it, keep it in /var/www/mail and confure virtual host in httpd.conf. right? but if instal squirrelmail using yum install , it's working with any changes to httpd.conf how come it works and difference between it .. please

thank you.

one more is no php-imap in my rhel6 dvd repo. how could i do it?

deep27ak 12-04-2011 10:32 PM

I have not tried in RHEL6 with yum actually and am also not sure if that package is available by default in repo

but to clarify your doubts you can do this

Code:

#rpm -qa | grep squirrelmail
squirrelmail-x.x.x.x.el6.rpm

Code:

#rpm -ql | grep squirrelmail-x.x.x.x.el6.rpm
check out for the configuration files for the package and the files which are installed by this rpm

and for php-imap (it might affect performance)
this is one link which I found

http://squirrelmail.org/docs/admin/admin-10.html


All times are GMT -5. The time now is 10:23 AM.