# Apache/Squirrelmail problems

## cto2mac

OK having some problems with my squirrelmail, When I login to my squirrelmail I get this error on the left hand side of the page:

Fatal error: Maximum execution time of 30 seconds exceeded in /home/httpd/htdocs/squirrelmail/functions/imap_general.php on line 71

Ok that is problem #1.

When I try to send a test email to a hotmail account I get this error from squirrelmail:

Error connecting to SMTP Server.

0 : 

OK, if you can please help that would be appreciated.

Thanks

----------

## Rider

hi,

 *cto2mac wrote:*   

> 
> 
> Fatal error: Maximum execution time of 30 seconds exceeded in /home/httpd/htdocs/squirrelmail/functions/imap_general.php on line 71
> 
> When I try to send a test email to a hotmail account I get this error from squirrelmail:
> ...

 

have you installed an imap server / mta or are you using the one of your ISP?

can you connect to it (ex. via telnet or imap client) and send / receive mails?

otherwise plz post your squirrelmail config file.

----------

## cto2mac

I installed the courier_imap per the desktop guide but after installing couldn't get the telnet localhost 143 to work.  Could this be the problem??

----------

## Rider

sure   :Very Happy:   this means that courier doesn't run (by any means not on port 143).

if you do a 'ps aux | grep courier' can you see some courier stuff? if not, are there some error msg, while you try to start courier?

it would be helpfull if you could post some courier config files...

----------

## cto2mac

I installed the following: apache, php mod_php mod_ssl, mutt, courier_imap and squirrelmail. So courier_imap doesnt install imap???

Sorry if this is basic but its my first time setting up a mail/web server.

----------

## Rider

 *cto2mac wrote:*   

> I installed the following: apache, php mod_php mod_ssl, mutt, courier_imap and squirrelmail. So courier_imap doesnt install imap???

 

IMAP stands for Internet Message Access Protocol. It is a method of accessing electronic mails that are kept on a mail server. In other words, it permits a "client" email program to access remote message. So the courier_imap IS an IMAP server you don't need anything else...

 *Quote:*   

> Sorry if this is basic but its my first time setting up a mail/web server.

 

huge thing if you do that for the first time  :Wink: 

 *Quote:*   

> ...but after installing couldn't get the telnet localhost 143 to work...

 

have you edited your /etc/courier-imap/authdaemonrc? 

could you start your courier-imap?

please post some more informations, otherwise I couldn't help you  :Wink: 

----------

## cto2mac

OK, I did edit my /etc/courier-imap/authdaemonrc according to code listing 8.9 of the desktop installation guide.  After running /etc/init.d/courier-imapd start

I got 

/etc/init.d/courier-imapd start

 * WARNING:  "courier-imapd" has already been started.

Then I tried:

root # telnet 127.0.0.1 143

bash: telnet: command not found

so still no dice, btw thank you for all this help.

----------

## Rider

 *cto2mac wrote:*   

> After running /etc/init.d/courier-imapd start
> 
> I got 
> 
> /etc/init.d/courier-imapd start
> ...

 

That looks good, your deamon is already running.

 *Quote:*   

> 
> 
> bash: telnet: command not found
> 
> so still no dice, btw thank you for all this help.

 

just listen to your bash   :Smile: .  you need to install a telnet app. for example do a

```
emerge netkit-telnetd
```

 and then try it again.

----------

## cto2mac

ok I go the telnet program and it worked.  But now here is the error I am getting. I get the same timeout error when I login to squirrelmail, and then whey I try and compose a test email I get this error when I send:

Error connecting to SMTP Server.

111 : Connection refused

If there are configuration files you would like to see just tell me which ones.  Again thanks

----------

## Rider

 *cto2mac wrote:*   

> ok I go the telnet program and it worked. 

 

Could you login into your imap account?

 *Quote:*   

> 
> 
> I get the same timeout error when I login to squirrelmail, and then whey I try and compose a test email I get this error when I send:
> 
> Error connecting to SMTP Server.
> ...

 

In case your courier-imap works (login was successfully), please post your squirrelmail config file (as far as I know, this is the [suirrelmail install dir]/config/config.php file)

About the second error:

SMTP is the Simple Mail Transfer Protocol as you might guess this will be used for transfering (ex. sending) mails. In case that you could send emails you need an MTA (Mail Transfer Agent), but that's another story  :Smile: . So I recommend that you install a send-only sendmail emulator like 'ssmtp'. Perhaps the ssmtp is already installed on your system: do a 

```

bash-2.05b$ emerge search ssmtp

Searching...   

[ Results for search key : ssmtp ]

[ Applications found : 1 ]

 

*  net-mail/ssmtp

      Latest version available: 2.38.14-r1

      Latest version installed: 2.38.14-r1

      Size of downloaded files: 70 kB

      Homepage:    

      Description: Extremely simple MTA to get mail off the system to a Mailhub

```

to look if the ssmtp is already installed, if not, emerge it  :Smile: .

Then you will have to configure it:

open the file '/etc/ssmtp/ssmtp.conf' and change those two lines:

```

mailhub=smtp.of.your.isp.com # the smtp server of your isp

hostname=validhostname.com #enter your own domain if you have one

```

so that's it. let's try to send an email:

```

echo "Yiipy it works!" | /usr/sbin/sendmail -v "yourename@yourdomain.com"

```

if you can receive this test email (either via pop or imap) then the squirrlmail should work also.

good luck!

----------

## Rider

 *Rider wrote:*   

> In case that you could send emails you need an MTA (Mail Transfer Agent), but that's another story . 
> 
> 

 

Hmmm... how are you getting your emails on your box? do you want to receive mail's direct on your machine (should your box act as a mail server)? 

if this is the case, you need a 'real' mta (like sendmail, postfix or courier-smtp) but that would be realy harder to install / configure / understand. 

If this is what you want, then U have to use google and specific mailing lists on that topic (and you need a lot of time  :Smile: ). I'm sorry but I don't have the time to explain howto setup a complete mta...

----------

## cto2mac

Please forgive my ignorance on these matters.  I would prefer to go the easiest way possible.  If I can still send and receive my emails through squirrelmail, I really am not worried about the method used.  Hell even evolution would be fine.  I just want to be able to use my linux box for some real web applications.  Ability to rlogin, check email from any browser, I would like to (in a perfect world) be able to update my gentoo remotely if that is possible.  But right now I don't like hotmail and such and would like to find another solution.  Again thanks.

----------

## jukka

 *Rider wrote:*   

> 
> 
> ```
> echo "Yiipy it works!" | /usr/sbin/sendmail -v "yourename@yourdomain.com"
> ```
> ...

 

watch out, the echo command probably won't work, because the exclamation mark is the default history expansion character for some shells. use single quotes instead.

----------

## jukka

 *cto2mac wrote:*   

> Please forgive my ignorance on these matters.  I would prefer to go the easiest way possible.  If I can still send and receive my emails through squirrelmail, I really am not worried about the method used.  Hell even evolution would be fine.  I just want to be able to use my linux box for some real web applications.  Ability to rlogin, check email from any browser, I would like to (in a perfect world) be able to update my gentoo remotely if that is possible.  But right now I don't like hotmail and such and would like to find another solution.  Again thanks.

 

if you're not willing to spend some time with reading docs, learning, testing, etc you should consider if you're maybe using the wrong operating system environment. there are already enough guys who say "ok, ten minutes left, let's set up an mta" - if you tell them they're running an open relay, you receive lots of spam from it and they should please check their configuration, they say: "an open... what?"

i apologise if i'm wrong. if you clearly explain what you'd like to do and what doesn't work as expected, i'm sure someone will show you the way how to do it.

greetings, jukka

----------

## cto2mac

I definitly have no problem waiting for the work to be done.  If it involves reading a few manuals and making sure that I have a full understanding of the processes and system that I have running.  I guess I jumped into this process thinking I knew mor e that I actually know.  I still believe that I can make this work.  So I will put a halt on developing my web/mail server until I have a better understanding.  So thank you for the help, and if you have any url's or books that you recommend for setting all this up, please just pm me.

Again

Thanks

----------

## direwolff

This seems like a fairly common thing these days.  Folks want access to email from anywhere, anytime, but most ISP's don't support that capability very well.

Here's what it sound like you probably want (somewhat similar to may own setup, although I have a separate server and there are a few others that get email there, too).

1)  use "fetchmail" to get mail from whatever POP email boxes you have.  If you are intent on having a hotmail or yahoo account, I've seen some obscure things that fetch mail from there, too.  Everything goes into a single mail spool on your linux box.  Fetchmail takes a little reading to get a config file put together, but it runs consistently once it's set up.  Fetchmail will also talk to your MTA.  If you want to keep this really simple, use deliver.

2)  use imap (I recommend uw-imap, because it is simpler, lighter, and very consistent with clients).  You can use a combination of evolution squirrelmail, eudora, and possibly outlook, but I haven't tried that.  Just make sure that EVERYTHING uses IMAP.

3)  You need an MTA to send mail.  ssmtp is fine and basic.  You may want to try exim if you want something more full-featured.  A basic setup can be done fairly quickly, with a single config file.  

That's it!

... Dire

----------

## Rider

 *cto2mac wrote:*   

> Ability to rlogin, check email from any browser, I would like to (in a perfect world) be able to update my gentoo remotely if that is possible.

 

this is possible, but I wouldn't recommend you to use rlogin, use ssh (secure shell) instead. You need to install the sshd on your box...

----------

## JWU42

I too just followed the install doc and was getting the same error.  The suddenly it went away after an e-mail was in my inbox.  Prior to this I was using /var/spool/mail and not the .mailbox option.

I had been using postfix and Evolution with no problems for a few weeks and then added courier-imap and squirrelmail.  It had been working fine until I just updated php and mod_php.  Not sure if this caused my problems, but that is the only thing I have done recently.

I cannot login to squirrelmail anymore and why I try to telnet in I get a LOGON failed error.  I did stop apache, courier-imap and courier-imap-ssl earlier today (don't ask me why) but have since started them again.

Any clues?

----------

