squirrelmail Forbidden You don’t have permission to access

squirrelmail Forbidden You don’t have permission to access

squirrelmail after setup when accessed shows 403 Forbidden error,this is due to improper configuration in squirrelmail.conf file.
if you are using apache 2.4 version set Require all granted that should fix the issue.

 root  ~  curl https://localhost/webmail
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>403 Forbidden</title>
</head><body>
<h1>Forbidden</h1>
<p>You don't have permission to access /webmail
on this server.<br />
</p>
</body></html>

here is my squirrelmail.conf file

 root  / | etc | httpd | conf.d  cat squirrelmail.conf 
#
# SquirrelMail is a webmail package written in PHP.
#

Alias /webmail /usr/share/squirrelmail


<Directory "/usr/share/squirrelmail">
    Options Indexes MultiViews
    Require all granted
    AllowOverride none
    Order allow,deny
    Allow from all
</Directory>

Curl test shows we are able to access squirrelmaill mail now

 root  / | etc | httpd | conf.d  curl -I https://localhost/webmail/src/login.php
HTTP/1.1 200 OK
Date: Wed, 04 Apr 2018 20:00:18 GMT
Server: Apache/2.4.29 (Fedora) PHP/7.1.15
X-Powered-By: PHP/7.1.15
Set-Cookie: SQMSESSID=7979jtue6ncgjv1fp7506s8gkl; path=/webmail/
Expires: Sat, 1 Jan 2000 00:00:00 GMT
Cache-Control: no-cache, no-store, must-revalidate
Pragma: no-cache
Set-Cookie: SQMSESSID=7979jtue6ncgjv1fp7506s8gkl; path=/webmail/; HttpOnly
Set-Cookie: SQMSESSID=22bv947nueeehs10vvc70qkdpv; path=/webmail/
Set-Cookie: SQMSESSID=22bv947nueeehs10vvc70qkdpv; path=/webmail/; HttpOnly
X-Frame-Options: SAMEORIGIN
Content-Type: text/html; charset=iso-8859-1