# Syncing emails from user to user



## albsallu (Aug 9, 2009)

I will start from the beginning:
I have just few users (3) that are unable to login via squirrel mail to access their inbox, but they can login to thunderbird to access their email. The issue is if they are home, they are not able to access their emails via webmail. Every other users at work can access their emails.

Freebsd is my email server and I am not sure what might be stopping these users from logging into their inbox via squirrel mail

Thanks,


----------



## DutchDaemon (Aug 9, 2009)

Firstly, one doesn't "log in to Thunderbird". Thunderbird is simply a local email program used to log in to your mail server, probably using IMAP.

Squirelmail also logs in to your mail server using IMAP, but it usually does so using loopback (127.0.0.1). Check whether your IMAP server is bound to localhost, or instruct Squirrelmail not to use localhost, but your public IP address. The latter is obviously serving IMAP, or Thunderbird users wouldn't be able to connect to it.

Check:
[cmd=]sockstat -l4p 143[/cmd]

On the other hand, you may be only running POP3, which Squirrelmail can't use, but Thunderbird can.

Check:
[cmd=]sockstat -l4p 110[/cmd].


----------



## albsallu (Aug 10, 2009)

How do you go about checking sockstat -lp4? I am new with freebsd...

Thanks


----------



## DutchDaemon (Aug 10, 2009)

It's a straight command .. type it in, watch output ..


----------



## albsallu (Aug 11, 2009)

So after typing it in I saw series of output. What does it do? I saw the username imapd - - - stream (not connected). What are all those?


----------



## albsallu (Aug 11, 2009)

I have just try connecting to the web browser after typing the above command and squirrel mail is attempting to connect, but can't just connect. The connector keeps rotating and after some time, it will time out.


----------



## DutchDaemon (Aug 11, 2009)

It "does" nothing. It does show you whether anything is listening on your IMAP port (143) or your POP3 port (110). Post the output of those commands here.


----------



## DutchDaemon (Aug 11, 2009)

To make sure:

[cmd=]sockstat -l4p 143[/cmd]
[cmd=]sockstat -l4p 110[/cmd]


----------



## albsallu (Aug 11, 2009)

```
%sockstat -l4p 143
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS      
root     couriertcp 23574 3  tcp4   *:143                 *:*
%sockstat -l4p 110
USER     COMMAND    PID   FD PROTO  LOCAL ADDRESS         FOREIGN ADDRESS
```


----------



## DutchDaemon (Aug 11, 2009)

Ok, so IMAP is running and listening on all interfaces, including localhost. That's good.

Now look in your Squirrelmail configuration to see where it tries to connect to. In my case, the config lives at /usr/local/www/apache22/data/squirrelmail/config/config.php, and the settings are:


```
$imapServerAddress      = '127.0.0.1';
$imapPort               = 143;
```

To run the config editor, run the conf.pl script. Mine is accessible like this:


```
# cd /usr/local/www/apache22/data/squirrelmail/config
# perl conf.pl

SquirrelMail Configuration : Read: config.php (1.4.0)
---------------------------------------------------------
Main Menu --
1.  Organization Preferences
2.  Server Settings
3.  Folder Defaults
4.  General Options
5.  Themes
6.  Address Books
7.  Message of the Day (MOTD)
8.  Plugins
9.  Database
10. Languages

D.  Set pre-defined settings for specific IMAP servers

C   Turn color off
S   Save data
Q   Quit

Command >>
```

If you've never run this config, now is the time.


----------



## albsallu (Aug 11, 2009)

I open the config file and my host ip is showing as my imapserver. When I try to run the conf.pl command this is what happen:


```
%ls
config.php
%conf.pl
conf.pl: Command not found.
%perl conf.pl
Can't open perl script "conf.pl": No such file or directory
%
```


----------



## DutchDaemon (Aug 11, 2009)

Well, conf.pl is installed by the port, so I suggest you reinstall the port first.


----------



## albsallu (Aug 11, 2009)

I know this might sound stupid, but I will need the command to reinstall the port. I am new to freebsd.


----------



## albsallu (Aug 11, 2009)

All of a sudden my webmail is not accessible anymore. Page cannot display is showing up. I am confuse. Please help


----------



## DutchDaemon (Aug 11, 2009)

[cmd=]cd /usr/ports/mail/squirrelmail && make deinstall reinstall clean[/cmd]

FreeBSD Handbook << --- read it


----------



## albsallu (Aug 11, 2009)

error squirrelmail-1.4.19-_1 depends on file: /usr/local/include/php/main/php.h not found


----------



## albsallu (Aug 11, 2009)

httpd not running, trying to start syntax error line 242 of /usr/local/etc/apache/httpd.conf: cannot load /usr/local/libexec/apache/libphp5.so into server


----------



## DutchDaemon (Aug 11, 2009)

Install ports-mgmt/portmaster and run [cmd=]portmaster -Rf squirrelmail-1.4.19_1[/cmd]. This will (re)install Squirrelmail plus everything it needs, including PHP. I have no idea why stuff is missing from your installation all of a sudden.


----------



## albsallu (Aug 12, 2009)

This is the current error message now when updating the ports:
apache+mod_ssl-1.3.41+2.8.31 conflicts with installed package(s):
      apache-1.3.41_1

      They install files into the same place.
      Please remove them first with pkg_delete(1).
*** Error code 1

I tried the command to delete apache-1.3.41_1: pkg_deinstall apache-1.3.41_1 and the same error showed up stating that other packages depend on the above conflict port.

It says pkg_delete failed

Now my page cannot be displayed when I open squirrelmail.


----------



## DutchDaemon (Aug 12, 2009)

Specific issue handled here: http://forums.freebsd.org/showthread.php?t=6211


----------



## albsallu (Aug 12, 2009)

*Error message with change_sqlpass plugins*

Administrative error:
The plugin "change_sqlpass" has not been set up correctly


----------



## DutchDaemon (Aug 12, 2009)

Supply some context. For example: what is this about?


----------



## albsallu (Aug 12, 2009)

My squirrel mail web open fine, but when I try to login as an admin or anyone, the above error message comes up. I did install the plugins for squirrelmail as it was letting me login before.


----------



## DutchDaemon (Aug 12, 2009)

Have you done this yet?


----------



## albsallu (Aug 12, 2009)

Yes I have resolve that issue. I had to deinstall change_sasql-plugins. I am still having problem with my vacation plugin though. Below is the error message:

```
Fatal error: Call to undefined function ftp_connect() in /usr/local/www/squirrelmail/plugins/vacation_local
/vac_init.php on line 443
```


----------



## DutchDaemon (Aug 12, 2009)

First make sure Squirrelmail is set up correctly, using conf.pl (which you should now have). It also can manage Plugins. I myself don't use Squirrelmail any longer, so I hope someone else on these forums can take a look as well.


----------



## albsallu (Aug 12, 2009)

Well, if you don't use squirrelmail what do you think is better than squirrelmail and can be easily setup?


----------



## DutchDaemon (Aug 12, 2009)

Squirrelmail is just fine, and you appear to need to manage users, passwords and such, with plugins. I use RoundCube for myself only. It's not as advanced as Squirrelmail yet (still alpha/beta, no user management or plugins), but it suits me just fine when I can't use straight IMAP.

Just continue with Squirrelmail, and make sure you configure it the way it should be done. It's not rocket science.


----------

