Back
Type Name Operations
__pycache__ Open
account_review Open
autosuspend Open
check_software_mods Open
cms_tools Open
domainchecker Open
etc Open
extras Open
failsuspend Open
guds_modules Open
mailers Open
mitigatord Open
mysql Open
nlp_scripts Open
oldrads Open
ops Open
perl Open
python Open
suspended Open
temporary Open
README
account-review
alp.py
autossl_runner.sh
autosusprunner.sh
backup_scan.sh
blockip
check_apache
check_autossl
check_bandwidth
check_boxtrapper
check_cpu
check_crons
check_darkmailer.py
check_dcpumon
check_dns
check_domcount.sh
check_exim
check_hacks
check_imap
check_io
check_lve
check_mailchannels_dns
check_max_children
check_mem
check_misc
check_mysql
check_pacct
check_pop3
check_raid
check_server
check_size
check_software
check_spamd
check_traffic
check_user
check_zoneh
clean_exim.py
clean_moveuser
cms_counter.py
cms_creds
cms_dumpdb
cms_pw
cmspass.py
cpanel-api
cpumon
ctrl_alt_del
dcpumon.pl
disk_cleanup.py
dns-sync
docroot.py
du-tree
envinfo.py
exclude_rbl.py
exclude_sender
extract-vhost
find_warez
findbadscripts
fixwpcron.py
forensic.py
fraudhunter.py
generate_cpmove_tix
hostsfilemods
imap_io
killall911
lastcommcache.sh
legal_lock_down.sh
lil-cpanel
limit_bots
listacct
mail_sources.py
mailscan
mass_arp_fixer.py
mass_mysql_recover.py
megaclisas-status
modify-account
modsec_disable.py
move_generator.py
msp.pl
mysql_dstat
nlp
packandgo
pastebin
postmortem
procscrape
quarantine
quick_post
radsfunctions.sh
reap_fpm_orphans.sh
recent-cp
reclaim_suspensions
remote_dump
rescp.sh
reset_cpanel
reset_email
rotate_ip_addresses.py
rrdtooldisable.sh
rrdtoolenable.sh
sadatarunner.sh
send_customer_str
send_pp_email
server-load
setmaxemails
show-conns
software_report.py
sqltop
strmailer
suspend_domain
suspend_user
temp_apache_fix
unsuspend_user
unsusprunner.sh
update_spf
upgrade-check
vhost_data.py

File Transfer

Upload files to current directory

File Editor: check_imap

#!/bin/bash LINESDEF="120000"; LINES=$LINESDEF if [ $# -eq 3 ] && [ "$2" == "--lines" ]; then LINES=$3; #echo $LINES; fi #echo $LINES function printUsage () { echo "This script will check /var/log/maillog and active running processes for imap related activity." echo =Check Mailbox Usage Info= echo;echo "$0 --topio" echo "Will show a list of emails with bytes sent and received" echo;echo "$0 --userconns" echo "Show a sorted list of active imap processes per user";echo; echo;echo "$0 --mailbox" echo "Show a sorted list of active imap processes, sorted per mailbox";echo; echo;echo "$0 --mboxsize" echo "Show the size of the mailbox for all connected accounts."; echo "(could drive the load and take some time - use with care)";echo; echo =Check Basic Login Info= echo;echo "$0 --login_email" echo "Prints the email addresses with the most logins.";echo; echo;echo "$0 --login_ip" echo "Prints the IP addresses with the most logins.";echo; echo;echo "$0 --login_failed" echo "Prints highest number of failed logins by IP, address, and the both Address and IP.";echo; echo;echo "$0 --option --lines NUMLINES" echo "This will execute the option, checking NUMLINES back throgh the log file (default is ${LINESDEF})" echo;echo "$0 --checkerror"; echo "Checks to see if you are hitting the maximum number allowed connections"; echo "(Use this if you get complaints of pop timing out or being slow to connect!)"; echo;echo "$0 --help" echo "You're looking at it!" } case $1 in --topio) tail -${LINES-45000} /var/log/maillog |awk ' /LOGOUT/ && /imapd/ && /user=/{ gsub(/rcvd=/,"",$11); gsub(/sent=/,"",$12); rcvd[$7]=rcvd[$7]+$11 sent[$7]=sent[$7]+$12 } /LOGOUT/ && /pop3d/ && /user=/{ gsub(/sent=/,"",$13); gsub(/rcvd=/,"",$12); sent[$7]=sent[$7]+$13 rcvd[$7]=rcvd[$7]+$12 } END{ for (key in sent) { printf "%-80s %-10s %-10s\n",key,sent[key],rcvd[key]; } }' ;; --userconns) ps auwx | grep imapd | awk '{if ($1 ~ /[a-z]+[0-9]+/){print $1}; }' | sort | uniq -c | sort -nk1 ;; --mailbox) ps auwx | grep imapd | awk '{if ($1 ~ /[a-z]+[0-9]+/){print $12}; }' | sort |uniq -c | sort -nk1 ;; --mboxsize) echo "this may take awhile - hit control-C to exit at any time" for account in $(ps axuw | grep "/usr/lib/courier-imap/bin/imapd /home/" | grep -v root | awk '{ print $12 }'|sort | uniq); do du -h --max-depth=0 $account/cur; done ;; --login_ip) tail -${LINES-45000} /var/log/maillog | grep imapd | awk '{print $8}' | sed -e '/^$/d' | sort | uniq -c | sort -nk1 ;; --login_email) tail -${LINES-45000} /var/log/maillog | grep imapd | awk '/LOGIN/{print $7}' | sort | uniq -c | sort -nk1 | tail -2 ;; --login_failed) echo "=Sorted by IP=" tail -${LINES-45000} /var/log/maillog | grep imapd |awk '/LOGIN FAILED/{print $9 }' | sort | uniq -c | sort -nk1 | tail -15 echo "=Sorted by Address=" tail -${LINES-45000} /var/log/maillog | grep imapd | awk '/LOGIN FAILED/{print $8 }' | sort | uniq -c | sort -nk1 | tail -15 echo "=Sorted by Address and IP=" tail -${LINES-45000} /var/log/maillog | grep imapd | awk '/LOGIN FAILED/{print $8, $9}' | sort | uniq -c | sort -nk1 | tail -15 ;; --checkerror) tail -${LINES-45000} /var/log/maillog |grep "maximum active connections"; ;; --help) printUsage; exit 0 ;; *) printUsage; exit 1 ;; esac