?
Solved

SLES 9 running postfix, apache, mysql, php, how can I add webmail

Posted on 2004-11-09
23
Medium Priority
?
356 Views
Last Modified: 2010-05-18
Whats the easiest way to get webmail of some sort?
0
Comment
Question by:wirthr
  • 14
  • 6
21 Comments
 
LVL 3

Expert Comment

by:steve918
ID: 12537715
You might download and install squirrelmail, it's what I've alway's used and it's simple to install and easy to configure.
0
 
LVL 38

Accepted Solution

by:
wesly_chen earned 2000 total points
ID: 12538223
For Webmail, you can use Squirrel:
http://www.squirrelmail.org/download.php
--------------------
1. Uncompress and extract squirrel mail into a directory that is accessible by the apache web server:
# cd /var/www/html    <=== (your Apache webpage root, it may varys)
# mkdir squirrel
# cd squirrel
# bzcat squirrelmail*bz2 | tar xvf -

2.Create directories to be used for attachments and user data:
# mkdir -p /export/squirrel/data
# mkdir -p /export/squirrel/attachments
# cd /export/squirrel
# chgrp -R apache attachments data
# chmod 730 attachments

3. Edit the config/config.php file, and set the $data_dir and $attachment_dir to the same as the squirrel directory:
...
$data_dir                 = '/export/squirrel/data/';
$attachment_dir           = '/export/squirrel/attachments/';

4. Enable file_uploads in the php.ini file:
...
file_uploads = On
 
5. Create a file named /var/www/html/squirrel/.htaccess with the following contents:
AddType application/php4script .php
Action application/php4script /cgi-bin/php

6. From a browser, access squirrelmail with a URL similar to: http://yourservername/squirrelmail
------------------------------

For more details about
http://www.linuxmigration.com/quickref/admin/email.html

Regards,

Wesly
0
 
LVL 6

Author Comment

by:wirthr
ID: 12538888
Error opening ../data/default_pref
Could not create initial preference file!
../data/ should be writable by user wwwrun
Please contact your system administrator and report this


when I went to webmail/index.php
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
LVL 6

Author Comment

by:wirthr
ID: 12538918
I chmod data to 733, now I get

ERROR:  
ERROR : Could not complete request.
Query: SELECT "INBOX"
Reason Given: Mailbox does not exist
 
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539049
ERROR:  
ERROR : Could not complete request.
Query: CREATE "INBOX.Sent"
Reason Given: Permission denied
 
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12539062
You need to "su root". I mean do it ad "root".

Wesly
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539126
no, I got that when I tried to login on the webpage
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539138
It creates bryan.pref in the maildata directory, but something isnt letting it create inbox.sent, wherever that is supposed to happen.
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539153
mail:/srv/www/htdocs/webmail # dir
total 117
drwxr-xr-x  18   1005 users   728 Nov  9 07:10 .
drwxr-xr-x   9 root   root   1616 Nov  9 06:48 ..
-rw-r--r--   1 root   root     80 Nov  9 06:59 .htaccess
-rw-r--r--   1   1005 users  5906 May 19 08:57 AUTHORS
-rw-r--r--   1   1005 users 15131 Dec 16  1999 COPYING
-rw-r--r--   1   1005 users 45347 Jun  2 22:42 ChangeLog
-rw-r--r--   1   1005 users  6827 Apr 26  2004 INSTALL
-rw-r--r--   1   1005 users  2625 Apr  3  2003 README
-rw-r--r--   1   1005 users  3319 Jun  2 22:42 ReleaseNotes
-rw-r--r--   1   1005 users  4708 Jun 12  2003 UPGRADE
drwx-wx---   2 root   www      80 Nov  9 07:04 attachments
drwxr-xr-x   5   1005 users   216 Jun  2 23:06 class
drwxrwxr-x   2   1005 users   208 Nov  9 06:53 config
-rwxr-xr-x   1   1005 users    92 Dec 26  2001 configure
drwxr-xr-x   3   1005 users    72 Jun  2 23:06 contrib
drwxr-xr-x   2   1005 users   176 Nov  9 06:55 data
drwxr-xr-x   3   1005 users   544 Jun  2 23:06 doc
drwxr-xr-x   3   1005 users  1176 Jun  2 23:06 functions
drwxr-xr-x  29   1005 users   728 Jun  2 23:06 help
drwxr-xr-x   2   1005 users  1304 Jun  2 23:06 images
drwxr-xr-x   3   1005 users   168 Jun  2 23:06 include
-rw-r--r--   1   1005 users   338 Feb 24  2004 index.php
drwxr-xr-x  44   1005 users  1120 Jun  2 23:06 locale
drwxr-xr-x   2 wwwrun root     80 Nov  9 07:11 maildata
drwxr-xr-x  18   1005 users   608 Jun  2 23:06 plugins
drwxr-xr-x   2   1005 users   272 Jun  2 23:06 po
drwxr-xr-x   2   1005 users  1344 Jun  2 23:06 src
drwxr-xr-x   3   1005 users  1496 Jun  2 23:06 themes
mail:/srv/www/htdocs/webmail #
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12539602
The ownership of /srv/www/htdocs/webmail should be the same as the one own /srv/www/htdocs.

Where is your mail spool? (/var/spool/mail ?)
You need to go into the config directory and configure the remaining steps with the included perl script:
--------------------------------
cd /srv/www/htdocs/webmail/config
perl conf.pl
When running conf.pl, follow the instructions.
tips:

ORGANIZATION PREFERENCES
Change name to whatever you'd like.
SERVER SETTINGS
Change Domain to your domain
Change IMAP server to your server.
Change SMTP server to your server.
GENERAL OPTIONS
Change Data Directory, (optional BUT preferred).
Change Attachment Directory
------
Wesly
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539702
/var/spool/mail is correct

I ran conf.pl, and made the appropriate changes already, I went to the squirrelmail website and read the faq's.    

Changed owner of webmail to root, which was owner of htdocs

now get

 Preference file, ../maildata/bryan.pref, could not be opened. Contact your system administrator to resolve this issue.
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539720
in httpd.conf, it has webuser is wwwrun and group is www

I change permissions on webmail directory to owner wwwrun and group www and I am back to

ERROR : Could not complete request.
Query: CREATE "INBOX.Sent"
Reason Given: Permission denied
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12539741
Is /srv/www/htdocs/maildata/bryan.pref or use
# find / -name "bryan.ref" -print
to find out where bryan.ref and change the permission 744 on it.

Wesly
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539819
I chmod the whole freakin webmail directory  to 777 and still get this in the left frame

ERROR : Could not complete request.
Query: CREATE "INBOX.Sent"
Reason Given: Permission denied

and

ERROR:  
ERROR : Could not complete request.
Query: SELECT "INBOX"
Reason Given: Mailbox does not exist
 

in the main frame, same as before
 
 
 
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539879
oh yeah, and I can telnet to server:143 and login with username/password and works fine
0
 
LVL 6

Author Comment

by:wirthr
ID: 12539987
tried to set it up in outlook, and when I do a send recieve I get



Task 'Checking for new mail in subscribed folders on www.myservername.com.' reported error (0x800CCC0E) : 'Outlook is unable to download folder (null) from the IMAP e-mail server for account www.myservername.com. Error: Unable to connect to the server. If you continue to receive this message, contact your server administrator or Internet service provider (ISP).'


so maybe its a problem with cyrus
0
 
LVL 6

Author Comment

by:wirthr
ID: 12540004
nevermind, got that to go away by using my ip instead of fqdn, but when I send a testmessage to myself, i dont recieve it.  I created Inbox through outlook, and now squirrelmail gives me this in the left hand frame

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 358

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 371

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 358

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 371

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 358

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 371

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 358

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/functions/imap_mailbox.php on line 371
Folders

Last Refresh: Tue, 9:02 am
(refresh folder list)


Warning: explode(): Empty delimiter. in /srv/www/htdocs/webmail/src/left_main.php on line 275

Warning: array_pop(): The argument should be an array in /srv/www/htdocs/webmail/src/left_main.php on line 276

Warning: implode(): Bad arguments. in /srv/www/htdocs/webmail/src/left_main.php on line 277

Warning: explode(): Empty delimiter. in /srv/www/htdocs/webmail/src/left_main.php on line 275

Warning: array_pop(): The argument should be an array in /srv/www/htdocs/webmail/src/left_main.php on line 276

Warning: implode(): Bad arguments. in /srv/www/htdocs/webmail/src/left_main.php on line 277

Warning: explode(): Empty delimiter. in /srv/www/htdocs/webmail/src/left_main.php on line 275

Warning: array_pop(): The argument should be an array in /srv/www/htdocs/webmail/src/left_main.php on line 276

Warning: implode(): Bad arguments. in /srv/www/htdocs/webmail/src/left_main.php on line 277

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/src/left_main.php on line 923
  INBOX

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/src/left_main.php on line 923
  INBOX.Drafts

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/src/left_main.php on line 923
  INBOX.Sent

Warning: substr_count(): Empty substring. in /srv/www/htdocs/webmail/src/left_main.php on line 923
  INBOX.Trash
 
0
 
LVL 6

Author Comment

by:wirthr
ID: 12545441
ok, seems like evereything on the page loads right now, no errors, but it wont display new messages.  I send myself a test, but it doesnt ever show up.  If I pop to my mail server, then I recieve it.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12545956
> wont display new messages
You mean there are some old mails showing up?

Wesly
0
 
LVL 6

Author Comment

by:wirthr
ID: 12546048
no mail at all, items will appear in the sent items if I use squirrelmail to send out a message, and if I delete something, it moves to trash, but there is nothing in the inbox.
0
 
LVL 38

Expert Comment

by:wesly_chen
ID: 12546282
That means the SMTP and IMAP setting are incorrect.

Wesly
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Suggested Courses
Course of the Month14 days, 23 hours left to enroll

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question