Lets face it. Sending mail to some domains such as yahoo and hotmail can become a pain in the ass. Installing DomainKeys can help with the delivery of mail.
Installation on a single domain;
/usr/local/cpanel/bin/domain_keys_installer user
Where user is the user’s cPanel username
If running this command gives you an error, then your more then likely not running the latest version of cPanel or you have not converted to maildir.
Installing on all domains;
for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/domain_keys_installer $i ;done
Bash script to parse all cPanel users and run the command.
Now, what about when you add new account;
Modify cPanel’s PostWWW script “/scripts/postwwwacct”
add;
my %OPTS = @ARGV;
my $user = $OPTS{’user’};
/usr/local/cpanel/bin/domain_keys_installer $user
Done.
More Info on DomainKeys; http://domainkeys.sourceforge.net/
Chattr according to Wikipedia;
“chattr is a Linux command that allows a user to set certain attributes on a file. Mostly chattr is used to make files immutable so that password files and certain system files cannot be erased during software upgrades.”
To set a file as immutable;
chattr +i file_name
To remove;
chattr -i file_name
http://en.wikipedia.org/wiki/Chattr
cPanel has a whole folder that contains various scripts you may run. Have you wonder what each one of them did?
- easyapache — Upgrades and reinstalls the Apache web server.
- phpextensionmgr — Manages PHP extensions.
- *up — Updates a service. We currently provide the following update scripts for the services noted:
- bandminup — Bandmin application.
- courierup — Courier mail server.
- cpaddonsup — cPanel’s addon scripts.
- dovecotup — Dovecot mail server.
- eximup — Exim mail exchanger.
- ftpup — FTP servers (ProFTP and Pure-FTP).
- imapup — IMAP mail server.
- mysqlup — MySQL service.
- nsdup — BIND nameserver.
- phpup — Current version of PHP.
- suphpup — SuPHP tool for handling PHP requests.
- restartsrv_* — Restarts a service. We currently provide restart scripts for the following; simply replace the asterisk (*) in
restartsrv_*with the term in bold:- apache — Apache web server.
- bind — BIND nameserver software.
- chkservd — cPanel’s AllDocumentation/AutomationIntegration.TailWatch log processing service.
- clamd — ClamAV anti-virus software.
- courier — Courier mail server.
- cpdavd — cPanel’s WebDAV server.
- cppop — cPanel’s POP server.
- dovecot — Dovecot mail server.
- entropychat — Entropy chat client.
- exim — Exim mail exchanger.
- eximstats — Exim mail statistics tracker.
- ftpserver — FTP server.
- httpd — Apache web server.
- imap — IMAP server.
- inetd — Super-server daemon for managing Internet services.
- interchange — Interchange e-commerce software.
- ipaliases — IP aliasing software.
- melange — Melange chat client.
- mysql — MySQL database server.
- named — BIND nameserver software.
- nsd — Open-source NSD nameserver daemon.
- postgres — PostgresSQL database service.
- postgresql — PostgreSQL database service.
- proftpd — ProFTP server daemon.
- pureftpd — Pure-FTP server daemon.
- rsyslogd — Open-source log forwarder daemon.
- spamd — Spam-deferral daemon.
- sshd — Secure shell daemon.
- syslogd — Log forwarder daemon.
- tailwatchd — cPanel’s AllDocumentation/AutomationIntegration.TailWatch log processing service.
- tomcat — Apache Tomcat service.
- xinetd — Open-source super-server daemon.
- addpop — Adds a POP account.
- delpop — Removes a POP account.
- wwwacct — Adds a cPanel account.
- restorepkg — Restores an account backup or cpmove package.
- cpbackup — Backs up all accounts.
- pkgacct — Generates cpmove files, which contain all data for an account. This script is very useful for transferring an account.
- upcp — Updates cPanel and WHM.
- setupmailserver — Allows you to switch mail servers.
- setupftpserver — Allows you to switch FTP servers.
- setupnameserver — Allows switching between DNS servers.
- checkperlmodules — Contains a list of standard CPAN modules to install on cPanel servers. This script is used in conjunction with
realperlinstaller, below. - realperlinstaller — A wrapper script that automates the installation of Perl CPAN modules.
- suspendacct — Suspends an account.
- unsuspendacct — Unsuspends an account.
- runweblogs — Updates statistics for a user.
- runstatsonce — Updates statistics for all users.
- makecppphp — Reinstalls cPanel’s internal PHP.
- portsup — Updates ports (on FreeBSD® systems only).
Screen allows you to run multiple full-screen pseudo-terminals from one real terminal, and lets you manipulate and save your screen input and output, copy and paste between windows.
First off, install screen;
yum install screen
Now, type;
screen
This will allow you to start a new screen. You can also use the -S option to name your screen like so;
screen -S 1
So your in a new screen now, awesome. Run your dang commands now.
To detach your screen while still leaving it running, you may push ctrl+a and then d.
To attach back to the screen;
screen -r
That’s about it. Screen For Dummies.
Other Commands;
Ctrl+a and then C; create a new screen
Ctrl+a and then N; switches between screens
Installing cPanel is as easy as…
1) cd /home
2) wget http://layer1.cpanel.net/latest
3) sh latest
and then wait while massive text scrolls your screen!
Have you ever wanted to VNC into your server and be able to access a GUI remotely? Well here’s a simple to follow tutorial that I have personally used several times!
Courtesy of WebHostingTalk.com;
http://www.webhostingtalk.com/showthread.php?t=589702
Simple script I made the other day that will generate the exact code you need to password protect a directory. Path is set for a plesk user’s httpdocs folder but can be modified as needed.
This is caused by having root login to accounts disabled.
1) Log into WHM
2) Go into Tweak Settings
3) Uncheck “Disable login with root or reseller password into the users”
4) Save
./ch_admin_passwd is Plesk’s utility to set the admin password.
“Gets password from the environment variable PSA_PASSWORD
Password should be from 5 to 16 symbols and should not contain login name, whitespace, quotes or national characters”
[root@ServerMonkey bin]# export PSA_PASSWORD=’newpass’
[root@ServerMonkey bin]# echo $PSA_PASSWORD
newpass
[root@ServerMonkey bin]# ./ch_admin_passwd
[root@ServerMonkey bin]# export PSA_PASSWORD=
[root@ServerMonkey bin]# cat /etc/psa/.psa.shadow
newpass
[root@ServerMonkey bin]#
No Comments