If you get the following error, Default Documents needs to be configured, or Directory Browsing needs to be enabled for the directory.
Thursday, March 6, 2008
Why do I get the error "Directory Listing Denied" when attempting to view my webpage?
Why is my browser showing "Page not found" when loading my ASP pages?
If your browser is showing "Page Not Found" when trying to load your .asp pages, you may need to ensure that .asp extenstions are enabled.
Why do I keep getting asked to install the Windows Update ActiveX Control?
What are some tools that I can use to troubleshoot mail delivery issues with Exim on my linux / BSD / unix server?
Exigrep
Exigrep is very useful when you need to search for specific strings in the exim logfile. The reason for this is that it will look for the search string you specify, match that to a message-ID, and then display all the lines pertaining to that message.
Usage: exigrep /path/to/exim/logfile
Examples:
root@cpdemo [~]# exigrep 1BbLM3-0007fA-0v /var/log/exim_mainlog2004-06-18 10:32:35 1BbLM3-0007fA-0v <= root@cpdemo.example.com U=root P=local S=1037
2004-06-18 10:32:37 1BbLM3-0007fA-0v => /dev/null R=system_aliases T=**bypassed**2004-06-18 10:32:37 1BbLM3-0007fA-0v Completed
Exiwhat
The 'exiwhat' command displays what each running exim process is doing at that given moment. This can be helpful in tracking down the cause for hanging exim processes or monitoring exim processes while they perform certain functions during testing.
Example
:root@cpdemo [~]# exiwhat
2118 daemon: -q1h, listening for SMTP on port 25 (IPv4)
2130 daemon: no queue runs, listening for SMTPS on port 465 (IPv4)
31640 handling incoming connection from [67.19.0.37]
Exim -bh
This section describes another usage of the exim mail server binary with special arguments that allow you to simulate a mail delivery from an external IP as the sender from the local server with the exim installation. This can be very useful when you need to recreate the mail delivery issue and you don't have access to the sender's machine to do so(ex. mail relaying, blacklists, etc.).
Usage: exim -bh
This will create a fake SMTP session which appears to be from . Not only that, but it also displays what exim is doing behind the scenes, and also what it would normally log. Now, bear in mind that this will not actually inject a message into the queue, nor will it actually log anything. This does however require knowledge of SMTP commands, but they are fairly easy. I have highlighted them in bold below for easier reading.
Example:
root@cpdemo [/var/spool/exim/input]# exim -bh 216.87.129.155
**** SMTP testing session as if from host 216.87.129.155
**** but without any ident (RFC 1413) callback.
**** This is not for real!
>>> host in host_lookup? no (option unset)
>>> host in host_reject_connection? no (option unset)
>>> host in sender_unqualified_hosts? no (option unset)
>>> host in recipient_unqualified_hosts? no (option unset)
>>> host in helo_verify_hosts? no (option unset)
>>> host in helo_try_verify_hosts? no (option unset)
>>> host in helo_accept_junk_hosts? yes (matched "*")
220-cpdemo.domain.com ESMTP Exim 4.34 #1 Fri, 18 Jun 2004 16:05:31 -0500
220-We do not authorize the use of this system to transport unsolicited,
220 and/or bulk e-mail.helo bbozo-2.example.com>>> bbozo-2.example.com in helo_lookup_domains? no (end of list)250 cpdemo.domain.com Hello bbozo-2.example.com [216.87.129.155]mail from: ken@bbozo-2.example.com
250 OK
How do I enable reverse DNS lookup in Exim?
My ISP blocks access to port 25. How do I run exim on a different port?
Log into WHM, and click on "Service Manager" under the Service Configuration grouping. Put a checkmark next to "exim on another port" (the default is port 26). After that, click "Save", and you should be able to connect to the mailserver.
Why am I not able to receive email on mydomain.com when I am able to send emails?
If you are able to send email out, but unable to receive mail for a particular domain, there are several things to check.
What do I do if /var partition is constantly running out of space?
How do I create an SPF record for my domain?
How can I test to make sure that my mailserver is not an open relay?
If you are testing a Linux/BSD/UNIX server, you can ssh into the box and issue the following command:telnet relay-test.mail-abuse.org
If you are on a Windows server, you will have to register at http://www.abuse.net/ in order to run these tests/
How do I view what exim is doing?
Exim comes with a utility called 'exiwhat' which will display what each instance of exim is currently involved with. The output will look similar to this:
root@server [~]# exiwhat
2118 daemon: -q1h, listening for SMTP on port 25 (IPv4)
2130 daemon: no queue runs, listening for SMTPS on port 465 (IPv4)
31640 handling incoming connection from [1.2.3.4]
Also, to monitor the exim log in realtime, you may use the tail command thusly:
tail -f /var/log/exim_mainlg
How do I track down the source of a script or user abusing a mail script to spam from a server as "nobody"?
Create a new /usr/sbin/sendmail file with your favorite editor containing the following:
#!/usr/local/bin/perl
# use strict; use Env;
my $date = `date`;
chomp $date;
open (INFO, ">>/var/log/formmail.log") die "Failed to open file ::$!"; .
my $uid = $>;
my @info = getpwuid($uid);
if($REMOTE_ADDR) {
print INFO "$date - $REMOTE_ADDR ran $SCRIPT_NAME at $SERVER_NAME n";
}
else {
print INFO "$date - $PWD - @infon";
}
my $mailprog = '/usr/sbin/sendmail.real';
foreach (@ARGV) { $arg="$arg" . " $_";
}
open (MAIL,"$mailprog $arg") die "cannot open $mailprog: $!n";
while ( )
{
print MAIL; }
close (INFO);
close (MAIL);
Then run these commands:
chmod +x /usr/sbin/sendmail
touch /var/log/formmail.log
chmod 666 /var/log/formmail.log
This will now log the directory the script ran from (if its from php) and the user information. The log file is globally writable so this script should not be used for long periods of time and only while you can monitor the log file. Save the new sendmail script to another file name when you are done and rename the original sendmail binary.
mv /usr/sbin/sendmail /usr/sbin/sendmail.spam.check
mv /usr/sbin/sendmail.real /usr/sbin/sendmail
Use this script at your own risk.
Write Failed:Disk Quota Exceede while changing password for email account.
Hello,
Error
Webmail authentication Error, unable to login to webmail,write failed disk quota exceeded error
Fix
A recent bug has been found in the cpanel maildir update, the disk quota used by the mail accounts shows false usage on whole server eg. usage of bill@microsoft.com shows disk quota used 1253M where the quota set is 10M which isnt possible but the recent bug has made it possible heard that this will be fixed in next update, found a temporary solution to fix it.
Command :
/scripts/generate_maildirsize --force --allaccounts
OR
For single account remove the file "maildirsize" under the email account user directory.This command would fix the issue.
Remove the "maildirsize" file in /home/user/mail/emailaccount/ and try. This will fix the issue.
How do I enhance spamassassins detection of spam?
Out of the box, SpamAssaassin is not especially great at detecting what is spam, and what is ham (legitimate email). In order to drastically increase the detection levels, you must first collect email and sort it into spam and ham, with the bigger the collection the better. After this is done, in ssh you can run the sa-learn command to train spamassassin. The format of this command would be:
sa-learn --showdots --(ham or spam) --mbox -u username --sync /path/to/filename
Note: if you have a Maildir setup, then do not use the --mbox flag
After this, you can monitor your spamassassin log to see if the detection rates have gone up.
How can I test that Spamassassin is properly recognizing spam?
How can I stop our Spamassassin from marking all internal emails as spam (sent from a domain on the server to another domain on the server)?
How can I install a Perl Module ?
On a server with CPanel, you can log into the WHM and install it there. If that for some reason doesn't work for you, you can log into the shell as root and install it via the command line. Once logged in, from any directory, type: echo "HTML::Template" /usr/local/cpanel/whostmgr/bin/perlmod -i (in this case, the module we want to install is HTML::Template).
On a RedHat server, you can install it with up2date if you know the name of the RPM. If you don't know it you can run 'up2date --showall grep -i perl'. Then select the RPM you want and install it via up2date.
If the module you want still isn't present you can install it manually via CPAN. Note that these modules are completely unsupported. If you wish to procede with the installation you can run 'perl -MCPAN -e shell' and interactively install the module. For example if you wanted to install Time::HiRes you would type 'install Time::HiRes' on the CPAN prompt.
What do I do if my server is returning emails with the error: unrouteable mail domain for any valid mail-routable domain?
From shell, type: (yahoo.com as example) exim -bt info@yahoo.com
Ifthis returns unrouteable mail domain "yahoo.com", then the problem iswith the local config of the server itself. Check to make sure that thehostname has an A record, is resolvable globally, and that MX recordsdo indeed exist. (A record and MX record entries should ALWAYS existfor the hostname of the server.)
If this returns you a list of the domain's mail servers, do a:
cat /var/log/exim_mainlog grep "failed to expand condition"
If you see this error persistantly in exim_mainlog: "failedto expand condition" "${perl{checkspam}}" for lookuphost router: Gid XXis not permitted to relay mail at /etc/exim.pl line 365.
Make sure that you have WHM > Change System Mail Preferences > nobody's mail set to a valid email address. Also,uncheck "Track the origin of messages sent though the mail server byadding the X-Source headers (exim 4.34+ required)" in WHM.
If you see this error in exim_mainlog: "failedto expand condition "${perl{checkspam}}" for literal router: Domaincableforum.co.uk has exceeded the max emails per hour. Messagediscarded."
The domain has exceeded their max emails per hour set within WHM > tweak settings > Max emails per hour.
Ifthe domain is hosted on the server, check and make sure that the domainresolves, has a correct MX record, and exists in /etc/localdomains.
How do I install Fantastico on my cPanel server?
cd /usr/local/cpanel/whostmgr/docroot/cgi
wget -N http://files.betaservant.com/files/free/fantastico_whm_admin.tgz
tar -xzpf fantastico_whm_admin.tgz
rm -rf fantastico_whm_admin.tgz
Now go to WHM, login as root and follow the link: Fantastico De Luxe WHM Admin (scroll down the left menu to find it). Upon loading, Fantastico De Luxe WHM Admin will auto-update. After the install you will need to click on the Settings link, and follow the on-screen directions.
How do I enable the GD PHP Module in Cpanel?
Selecte 'Update Apache' under the 'Software' section of WHM on the left side near the bottom.
Next put a check beside 'GD' on the right side of WHM and selected 'Start Build'.
Once it's finished rebuilding Apache, you're done!
Why does cpanel alert me about SSL certificate warnings when trying to login securely?
What do I do if my quotas show 0 in WHM?
/sbin/quotaoff -av
Where can I view service status in WHM?
This page will display the status of any service that is being monitored plus load,disk space, and memory.
How to update the WHM/CPANEL security certificate which shows expired?
Main >> SSL/TLS >> Reset cPanel/WHM Certificate
This will regenerate and install a self-signed certificate for cpanel/whm/webmail ssl access.