1 (edited by awol123 2019-03-21 03:40:15)

Topic: New install on Debian

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 0.9.9
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Debian 9.8.0 (Stretch)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MariaDB
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I've just installed iRedMail on a fresh install of Stretch and I can't seem to access any of the web services. Thinking im going mad, I tried a second time - again on a fresh install and still I get the same. http://domain/mail returns a 404, https://domain/mail returns a refused connection.
Firewall is allowing http and https.
lsof -i shows nothing listening on *:443 (output below).
I know nothing about Nginx, but expected this to all work out the box - have I missed something?

Also the install script will not progress if SOGo is selected, I didn't grab the exact error but it appeared to be unable to find the packages for it. I've proceeded without it for now just to have a play and see what this setup can do.

Any help appreciated - can't see the same issue posted on the forum so this must be something stupid i've missed.

COMMAND     PID     USER   FD   TYPE DEVICE SIZE/OFF NODE NAME
sshd        582     root    3u  IPv4  12956      0t0  TCP *:ssh (LISTEN)
sshd        582     root    4u  IPv6  12958      0t0  TCP *:ssh (LISTEN)
sshd        586     root    3u  IPv4  13019      0t0  TCP *REMOVED*:ssh->*REMOVED*:63721 (ESTABLISHED)
master    17877     root   13u  IPv4  32727      0t0  TCP *:smtp (LISTEN)
master    17877     root   14u  IPv6  32728      0t0  TCP *:smtp (LISTEN)
nginx     26999     root    6u  IPv4  43343      0t0  TCP *:http (LISTEN)
nginx     26999     root    7u  IPv6  43344      0t0  TCP *:http (LISTEN)
nginx     27000 www-data    6u  IPv4  43343      0t0  TCP *:http (LISTEN)
nginx     27000 www-data    7u  IPv6  43344      0t0  TCP *:http (LISTEN)
nginx     27001 www-data    6u  IPv4  43343      0t0  TCP *:http (LISTEN)
nginx     27001 www-data    7u  IPv6  43344      0t0  TCP *:http (LISTEN)
/usr/sbin 27949   amavis    5u  IPv4  46934      0t0  TCP localhost:10024 (LISTEN)
/usr/sbin 27949   amavis    6u  IPv6  46935      0t0  TCP localhost:10024 (LISTEN)
/usr/sbin 27952   amavis    5u  IPv4  46934      0t0  TCP localhost:10024 (LISTEN)
/usr/sbin 27952   amavis    6u  IPv6  46935      0t0  TCP localhost:10024 (LISTEN)
/usr/sbin 27953   amavis    5u  IPv4  46934      0t0  TCP localhost:10024 (LISTEN)
/usr/sbin 27953   amavis    6u  IPv6  46935      0t0  TCP localhost:10024 (LISTEN)
dovecot   28310     root   15u  IPv4  48867      0t0  TCP *:sieve (LISTEN)
dovecot   28310     root   16u  IPv6  48868      0t0  TCP *:sieve (LISTEN)
dovecot   28310     root   27u  IPv4  48894      0t0  TCP *:pop3 (LISTEN)
dovecot   28310     root   28u  IPv6  48895      0t0  TCP *:pop3 (LISTEN)
dovecot   28310     root   40u  IPv4  48934      0t0  TCP *:imap2 (LISTEN)
dovecot   28310     root   41u  IPv6  48935      0t0  TCP *:imap2 (LISTEN)
mysqld    29344    mysql   17u  IPv4  51646      0t0  TCP localhost:mysql (LISTEN)

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: New install on Debian

awol123 wrote:

I've just installed iRedMail on a fresh install of Stretch and I can't seem to access any of the web services. Thinking im going mad, I tried a second time - again on a fresh install and still I get the same. http://domain/mail returns a 404, https://domain/mail returns a refused connection.

When you access the URLs, any relevant error in Nginx log files (/var/log/nginx/)?

3

Re: New install on Debian

ZhangHuangbin wrote:
awol123 wrote:

I've just installed iRedMail on a fresh install of Stretch and I can't seem to access any of the web services. Thinking im going mad, I tried a second time - again on a fresh install and still I get the same. http://domain/mail returns a 404, https://domain/mail returns a refused connection.

When you access the URLs, any relevant error in Nginx log files (/var/log/nginx/)?

Hi,
The error log is empty, the access log shows the http attempt:
231 - - [20/Mar/2019:19:24:24 +0000] "GET /mail/ HTTP/1.1" 404 143 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"

but nothing for https.

As I say, nginx isnt even listening on port 443

#service nginx restart shows the following in the syslog, no errors:
Mar 21 10:30:31 REMOVED systemd[1]: Stopping A high performance web server and a reverse proxy server...
Mar 21 10:30:31 REMOVED systemd[1]: Stopped A high performance web server and a reverse proxy server.
Mar 21 10:30:31 REMOVED systemd[1]: Starting A high performance web server and a reverse proxy server...
Mar 21 10:30:31 REMOVED systemd[1]: Started A high performance web server and a reverse proxy server.

Ok this is odd, after restarting it (and changing nothing) lsof shows nginx listening on :443. However when I try to connect, I get a "502 Bad Gateway" error in my browser. This is for/mail and /iredadmin.

nginx error log shows:
2019/03/21 10:33:51 [error] 1332#1332: *5 connect() failed (111: Connection refused) while connecting to upstream, client: REMOVED, server: _, request: "GET /iredadmin/ HTTP/1.1", upstream: "uwsgi://127.0.0.1:7791", host: "REMOVED"

nginx access log shows:
REMOVED - - [21/Mar/2019:10:32:18 +0000] "GET /mail/ HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"
REMOVED - - [21/Mar/2019:10:33:48 +0000] "GET /iredadmin HTTP/1.1" 502 166 "-" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0"

4

Re: New install on Debian

I've just tried a machine on the same subnet to make sure the firewall isn't doing anything to cause this - I get the same in the Nginx error_log:

2019/03/21 22:19:57 [error] 1447#1447: *14 connect() failed (111: Connection refused) while connecting to upstream, client: 10.10.10.222, server: _, request: "GET /mail/ HTTP/1.1", upstream: "fastcgi://127.0.0.1:9999", host: "10.10.10.20"

5 (edited by awol123 2019-03-22 08:16:42)

Re: New install on Debian

After installing this 3 times on 3 fresh installs i've only just noticed the warning at the end of the install script that clearly says ** REBOOT YOUR SYSTEM BEFORE MAIL WILL START WORKING **

My head is held in shame.

Of course after a reboot, the web admin pages all work fine.

Am I right in thinking it is not possible to set aliases for users in the non pro version?
So each user can only have one email address?

6 (edited by fr 2019-03-22 16:54:02)

Re: New install on Debian

first refresh your head big_smile   smile

https://docs.iredmail.org/sql.create.mail.alias.html

if you have a ldap

https://docs.iredmail.org/ldap.add.mail.alias.html

7

Re: New install on Debian


Many thanks FR, aliases in sql now all work perfectly.

Just to add, for anyone who comes across this thread relating to the SoGO package not found error in my first post, you can only install SoGO on an 64bit system. I was initially using 32bit and there is no 32bit SoGO package available on Debian 9.