Jump to content

Recommended Posts

Posted

I noticed that cPanel lists sendmail at /usr/sbin/sendmail and wanted to know if the server wide install of squirrelmail uses sendmail or SMTP? I have it working on SMTP but read that sendmail was the recommended way of doing it?

 

I am also not sure what type of IMAP server we use here. Is it (courier, cyrus, exchange, uw, macosx or other?)

 

Can you take a look at these settings and see if they look correct for a stand alone squirrelmail setup here? BTW I am using squirrelmail 1.4.3.a

 

$useSendmail = false;

$smtpServerAddress = 'localhost';

$smtpPort = 25;

$sendmail_path = '/usr/sbin/sendmail';

$imapServerAddress = 'localhost';

$imapPort = 143;

$imap_server_type = 'courier';

$use_imap_tls = true;

$use_smtp_tls = true;

$smtp_auth_mech = 'login';

$imap_auth_mech = 'login';

$optional_delimiter = 'detect';

$pop_before_smtp = true;

 

Thanks,

Dennis Levens

Posted
$useSendmail = false; 

$smtpServerAddress = 'localhost';

$smtpPort = 25;

$sendmail_path = '/usr/sbin/sendmail';

$imapServerAddress = 'localhost';

$imapPort = 143;

$imap_server_type = 'courier';

$use_imap_tls = true;

$use_smtp_tls = true;

$smtp_auth_mech = 'login';

$imap_auth_mech = 'login';

$optional_delimiter = 'detect';

$pop_before_smtp = true;

 

Here is how my config is different than yours

$smtp_auth_mech = none;

$pop_before_smtp = false;

Posted

I'm doing the same thing right now. I'm trying to configure Squirrelmail on my company's account and it keeps barfing on me on the IMAP address. In your example, you have IMAP as 'localhost' -- is that correct or should it be 'mail.companyname.com'?

 

Here are all my settings:

 

$useSendmail = true;

$smtpServerAddress = 'mail.companyname.com';

$smtpPort = 25;

$sendmail_path = '/usr/sbin/sendmail';

$imapServerAddress = 'mail.companyname.com';

$imapPort = 143;

$imap_server_type = 'courier';

$use_imap_tls = true;

$use_smtp_tls = true;

$smtp_auth_mech = 'login';

$imap_auth_mech = 'login';

$optional_delimiter = 'detect';

$pop_before_smtp = false;

$default_folder_prefix = '/mail/';

$show_prefix_option = false;

$default_move_to_trash = true;

$default_move_to_sent = true;

$default_save_as_draft = true;

$trash_folder = '/mail/INBOX.Trash';

$sent_folder = '/mail/INBOX.Sent';

$draft_folder = '/mail/INBOX.Drafts';

$auto_expunge = true;

$delete_folder = false;

$use_special_folder_color = true;

$auto_create_special = true;

$list_special_folders_first = false;

$default_sub_of_inbox = false;

$show_contain_subfolders_option = false;

$default_unseen_notify = 2;

$default_unseen_type = 1;

$noselect_fix_enable = false;

$default_charset = 'iso-8859-1';

$data_dir = '/foldername/data/';

$attachment_dir = '/foldername/squirrelattachments/';

$dir_hash_level = 0;

$default_left_size = '150';

$force_username_lowercase = true;

$default_use_priority = true;

$hide_sm_attributions = true;

$default_use_mdn = true;

$edit_identity = false;

$edit_name = true;

$allow_thread_sort = false;

$allow_server_sort = false;

$allow_charset_search = true;

$uid_support = true;

$session_name = 'SQMSESSID';

 

Then comes themes, etc. which I don't think are relevent, so I'll spare you the listing.

 

Obvious questions:

 

1. Are the paths for $trash_folder $draft_folder $sent_folder correct? It said to list the full path name, so I did. But should it just be "INBOX.Trash" and not "/mail/INBOX.Trash"?

 

2. Are the paths for $data_dir and $attachment_dir correct, assuming that "foldername" is stored in the root directory?

 

3. Do I have the IMAP addresses correct?

 

Anything else look odd?

Posted

localhost is correct for imapServerAddress

 

make sure you have:

$imap_server_type = 'other';

 

make sure you have $domain set correctly.

$domain = '****';

 

trash folder (and others) should be this:

$trash_folder = 'INBOX.Trash';

$sent_folder = 'INBOX.Sent';

$draft_folder = 'INBOX.Drafts';

 

 

If you do not want the data and attachment folders inside the squirmail folder like below:

$attachment_dir = "$data_dir";

 

You cannot use '/foldername/squirrelattachments/'. This would be if foldername is on the root dir of the server (which it is not - it is in your account dir)

 

Use this instead:

/home/cpanel_user_id/foldername/squirrelattachments

 

substitute your cpanel user id, and no need for the trailing slash on the path. Also, make sure to give the squirrelattachments folder appropriate permissions.

 

Do the same for $data_dir as well.

 

It would be a lot easier to use the default of $attachment_dir = "$data_dir";

and $data_dir = SM_PATH . 'data/';

 

and use htaccess if you are worried about security.

 

I think you are really making this a lot more difficult than it needs to be. The default values are almost all fine. Just edit $domain and make sure you have $imap_server_type = 'other';

Posted
I am also not sure what type of IMAP server we use here. Is it (courier, cyrus, exchange, uw, macosx or other?)

TCH servers use cPanel's modified version of the uwimap daemon. You can set $imap_server_type = 'uw'; to have a compatible setup.

 

Also, using sendmail for sending would in most cases would be the best method.

Posted

Well, in my own defense, I wasn't trying to make this more difficult than it needs to be. I was trying to follow the instructions in the config file. Also, I think there is some usefulness in getting this info posted, for reference for others who attempt the same thing. Thank you for your help!

 

I'm still getting an error, which might just be that I need to wait a few minutes for Squirrelmail to reset itself. In any case, here's my current config file:

 

$domain = 'companyname.com';

$useSendmail = true;

$smtpServerAddress = 'localhost';

$smtpPort = 25;

$sendmail_path = '/usr/sbin/sendmail';

$imapServerAddress = 'localhost';

$imapPort = 143;

$imap_server_type = 'uw';

$use_imap_tls = true;

$use_smtp_tls = true;

$smtp_auth_mech = 'login';

$imap_auth_mech = 'login';

$optional_delimiter = 'detect';

$pop_before_smtp = false;

$default_folder_prefix = '/home/accountname/mail';

$show_prefix_option = false;

$default_move_to_trash = true;

$default_move_to_sent = true;

$default_save_as_draft = true;

$trash_folder = 'INBOX.Trash';

$sent_folder = 'INBOX.Sent';

$draft_folder = 'INBOX.Drafts';

$auto_expunge = true;

$delete_folder = false;

$use_special_folder_color = true;

$auto_create_special = true;

$list_special_folders_first = false;

$default_sub_of_inbox = false;

$show_contain_subfolders_option = false;

$default_unseen_notify = 2;

$default_unseen_type = 1;

$noselect_fix_enable = false;

$default_charset = 'iso-8859-1';

$data_dir = '/home/accountname/foldername/data';

$attachment_dir = '/home/accountname/foldername/squirrelattachments';

$dir_hash_level = 0;

$default_left_size = '150';

$force_username_lowercase = true;

$default_use_priority = true;

$hide_sm_attributions = true;

$default_use_mdn = true;

$edit_identity = false;

$edit_name = true;

$allow_thread_sort = false;

$allow_server_sort = false;

$allow_charset_search = true;

$uid_support = true;

$session_name = 'SQMSESSID';

 

Permissions on "/home/accountname/foldername/squirrelattachments" has been set to 730. I also plan to set up a cron job to delete contents of that folder periodically. (Like items that are more than 2 weeks old.)

 

Is $default_folder_prefix correct now? Or should I have left it as "mail/"?

Posted

This is the error I'm getting:

 

Warning: fsockopen(): SSL operation failed with code 1. OpenSSL Error messages: error:1408F10B:SSL routines:func(143):reason(267) in /home/accountname/public_html/squirrelmail/functions/imap_general.php on line 445

 

Warning: fsockopen(): php_stream_sock_ssl_activate_with_method: SSL handshake/connection failed in /home/accountname/public_html/squirrelmail/functions/imap_general.php on line 445

 

Warning: fsockopen(): failed to activate SSL mode 2 in /home/accountname/public_html/squirrelmail/functions/imap_general.php on line 445

Posted

It is so odd that I do not get emails telling me people have replied to this thread??? I always put a check in enable notification of replies but sometimes I get them and sometimes not. Is this because you only get an email if you were the last person to post and someone adds a reply? I hope it is setup so that any replies to the entire thread and you are notified.

 

Anyway, on to my reply:

 

First off, I swear I get a different answer everytime I ask the question about what IMAP we use at TCH. Sujit from the help desk said we are using Courier IMAP, another post said we were using other, and a few have said uw. So far I have no figured out a way to verify this 100% so will go with MikeJ and say UW is the setting we need.

 

after many trials and errors I believe I have it worked out. Here are the settings you should use: Note the BOLD are changed items

 

$domain = 'companyname.com';

$useSendmail = true;

$smtpServerAddress = 'localhost';

$smtpPort = 25;

$sendmail_path = '/usr/sbin/sendmail';

$imapServerAddress = 'localhost';

$imapPort = 143;

$imap_server_type = 'uw';

$use_imap_tls = false;

$use_smtp_tls = false;

$smtp_auth_mech = 'none';

$imap_auth_mech = 'login';

$optional_delimiter = 'detect';

$pop_before_smtp = false;

$default_folder_prefix = '';

$show_prefix_option = false;

$default_move_to_trash = true;

$default_move_to_sent = true;

$default_save_as_draft = true;

$trash_folder = 'INBOX.Trash';

$sent_folder = 'INBOX.Sent';

$draft_folder = 'INBOX.Drafts';

$auto_expunge = true;

$delete_folder = false;

$use_special_folder_color = true;

$auto_create_special = true;

$list_special_folders_first = false;

$default_sub_of_inbox = false;

$show_contain_subfolders_option = false;

$default_unseen_notify = 2;

$default_unseen_type = 1;

$noselect_fix_enable = false;

$default_charset = 'iso-8859-1';

$data_dir = '/home/accountname/foldername/data';

$attachment_dir = '/home/accountname/foldername/squirrelattachments';

$dir_hash_level = 0;

$default_left_size = '150';

$force_username_lowercase = true;

$default_use_priority = true;

$hide_sm_attributions = true;

$default_use_mdn = true;

$edit_identity = false;

$edit_name = true;

$allow_thread_sort = false;

$allow_server_sort = false;

$allow_charset_search = true;

$uid_support = true;

$session_name = 'SQMSESSID';

 

Your data and attachments are in the best place for security. IF for some reason you wanted them in the default locations of /data where you installed squirrelmail you would use this as the path

 

$data_dir = SM_PATH . 'data/';

 

making note that all SM_PATH means is start where squirrelmail is installed and go from there. Otherwise you use the absolute path starting from the root using as you did /home/tchuserid/.mysqmail/data

 

As far as I can tell TLS will not work for authentication for either IMAP or SMTP which is the main reason you are having issues. And from what I can gather SMTP authentication is none and IMAP is login. I am not sure why this is because when setting up your users on outlook express you have to use authentication for smtp to work. Maybe this is because on squirrelmail it is already here on the server and thus does not need authentication on the install side of things.

 

In either case I am still playing with the cmod, chown and chgrp settings to get things to work with the most security.

 

having your data and attachments below the public_html directory will make a huge difference for security.

 

For now I am folloing this for my security

 

squirrelmail folder is default no changes made

 

data

chown -R nobody data

 

attachments

chown -R nobody attachments

chgrp -R nobody attachments

 

for chmod

/home/tchuserid/.mysqmail (777)

/home/tchuserid/.mysqmail/data (770)

/home/tchuserid/.mysqmail/attachments (730)

 

The only problem with this setup is you cannot directly modify or even view the files in the data directory. They can only be deleted. If you want to edit them you have to do it through squirrelmail.

 

I am still trying to see if there is a way to give nobody the rights it needs to run but still give my tchuserid the ability to edit the files. Someone this is working without how tch setup our server wide cpanel install of squirrelmail from cpanel. Because my .sqmaildata is actually owned by my tchuserid and I am listed as group and owner. But when I set my stand alone install like this it wont work. I have to give the world 777 permissions to everything to get by.

 

Anyway, hope this helps you get moving.

Dennis

Posted
It is so odd that I do not get emails telling me people have replied to this thread???

 

I could be wrong but I think emails are only sent when you are not logged in to the forums and closing the window does not log you out. You must select logout at the top.

Posted

Okay, I fixed that error but now I've got another one:

 

Error opening ../data/default_pref

Could not create initial preference file!

../data/ should be writable by user nobody

Please contact your system administrator and report this error.

 

EDIT: Just saw your post, dlevens, apparently you can run chown after all? I'll give it another try.

Posted

you only get a response to a thread for the first reply after you last *viewed* the thread - then you won't get anymore until you view it again.

 

and it says that right in the email, too, so I'm not making this stuff up. :(

 

just fyi!

Posted

Argh! Two steps forward, one step back...

 

Discovered that you just need to set permissions on the data & attachment folders to 777.

 

However, now I enter Squirrelmail and get this:

 

ERROR : Could not complete request.

Query: CREATE "/home/accountname/mail/INBOX.Sent"

Reason Given: CREATE failed: Can't create /home/accountname/mail/INBOX.Sent: invalid name

 

Sigh.

Posted (edited)
First off, I swear I get a different answer everytime I ask the question about what IMAP we use at TCH. Sujit from the help desk said we are using Courier IMAP, another post said we were using other, and a few have said uw. So far I have no figured out a way to verify this 100% so will go with MikeJ and say UW is the setting we need.

http://layer1.cpanel.net/ChangeLog.cgi?&showall=Linux-x86

 

Under 9.1.0 (build 95):

9.1.0 (build 95) Linux i686  Wed Mar 17 04:44:02 2004

 

remove cpimap as we are using uw-imap

 

Should put your mind at ease. The imap daemon is one of the daemons that is managed through the cPanel distribution as it ties in with your control panel functionality. cPanel developers are not always up front in providing details of the daemons they use. Sorry for the confusion in the responses you received in the past.

 

cPanel does appear to customize it, probably to better integrate with the control panel, as can even be seen by the banner it displays:

* OK [CAPABILITY IMAP4REV1 LOGIN-REFERRALS AUTH=LOGIN] serverX.totalchoicehosting.com IMAP4rev1 2003.339-cpanel at Thu, 8 Jul 2004 17:00:28 -0400 (EDT)

 

But it's still uw-imap under the hood.

 

P.S. The server installed squirrelmail configurations also use "uw" as the setting for imap.

Edited by TCH-MikeJ
Posted

I use the following for my set up:

 

$trash_folder = 'Trash';

$sent_folder = 'Sent';

$draft_folder = 'Drafts';

 

or default should be:

 

$trash_folder = 'INBOX.Trash';

$sent_folder = 'INBOX.Sent';

$draft_folder = 'INBOX.Drafts';

 

Keep in mind the location where it is trying to make the inbox.sent folder is the same location used by the default webmail from cpanel.

 

/home/tchuserid/mail

 

which account are you using? are you using the main tchuserid to login? Try making a new mailbox and loging in with that to see if it is a folder permission issue for mail directory or if it is a file issue. It could be that the inbox.sent is already made but your install of sqmail does not have rights.

 

Dennis

Posted

Mike,

 

Thanks for the clarification. I must admit, I sorta threw out that fish line hoping you would respond. From my experience reading these forum I have become impressed with your responses.

 

Thanks for outstanding support and keep up the great work.

 

Very much appreciated,

Dennis

Posted

I don't know why, but when I blanked out $default_folder_prefix like you had on your list, everything worked. Squirrelmail is up and running!

 

Now, is there a way to get rid of www.name.com/webmail with horde/neomail/etc? I tried a redirect but that didn't work.

Posted

nate

 

by default the folder prefix starts at mail. I think if you had your path correctly identified it would have worked. You would have needed

 

/home/tchuserid/mail/

 

If you mean by getting rid of, that you no longer want webmail to point to the default cpanel webmail of 3 choices, then I think you can do this via the helpdesk. Submit a ticket asking them to delete the forward they have setup for your domain.

 

Dennis

Posted

Actually, "/home/tchuserid/mail/" is exactly how I had it set up, and it gave me errors. Perhaps, as you said, it had to do with the fact that INBOX.Sent, etc. already existed. However, having removed the path and left it as "" I can now access Squirrelmail and my mail appears to be there. Checking my files, it doesn't look like INBOX.sent was recreated in another location, but I could be wrong.

 

You know, now that I think about it, I wonder if Cpanel Squirrelmail created those files in /home/tchuserid/mail/? Are they used by popmail at all? Or are they a webmail thing? Maybe I could delete them and then my new Squirrelmail install can re-create them?

 

Is there any security risk to having 777'd my data and attachments folders if they are sitting in my home folder?

Posted

nate,

 

all of the files in the mail folder could have been created by the cpanel webmail or your install or even the www.****/sqmail on port 80. All 3 use the same directory to store mail. Be careful because if you delete inbox then sure your next login will recreate it but you will have lost all of the email inside it.

 

As far as security below public_html I am not sure. I would assume the only people who have access there are people you give ftp access to assuming you give them root access and people at tch.

 

Dennis

Posted

I wouldn't delete "inbox", just INBOX.Sent, INBOX.Trash, INBOX.Drafts. At least that's what I'm debating. The thing is, Squirrelmail is working fine. Not sure I should mess with it anymore.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...