ldconfig -v 2>/dev/null | grep -v ^$’\t’
Monthly Archives: November 2013
test php mail() function
$to = "someone@linux4you.tk"; $subject = "Test"; $message = "Test"; $from = "someonelse@linux4you.tk"; $headers = "From:" . $from; mail($to,$subject,$message,$headers); echo "Mail was sent."; ?>
maildrop
maildrop is the mail filter/mail delivery agent that’s used by the Courier Mail Server. You do not need to download maildrop from here if you already have the Courier mail server installed. This is a standalone build of the maildrop mail filter that can be used with other mail servers.
maildrop is a replacement for your local mail delivery agent. maildrop reads a mail message from standard input, then delivers the message to your mailbox. maildrop knows how to deliver mail to mbox-style mailboxes, and maildirs. “maildir” is a mailbox format used by the Courier mail server and Qmail.
maildrop optionally reads instructions from a file, which describe how to filter incoming mail. These instructions can direct maildrop to deliver the message to an alternate mailbox, or forward it somewhere else. Unlike procmail, maildrop uses a structured filtering language.
maildrop is written in C++, and is significantly larger than procmail. However, it uses resources much more efficiently. Unlike procmail, maildrop will not read a 10 megabyte mail message into memory. Large messages are saved in a temporary file, and are filtered from the temporary file. If the standard input to maildrop is a file, and not a pipe, a temporary file will not be necessary.
maildrop checks the mail delivery instruction syntax from the filter file, before attempting to deliver a message. Unlike procmail, if the filter file contains syntax errors, maildrop terminates without delivering the message. The user can fix the typo without causing any mail to be lost.
ClamAV-clamd av-scanner FAILED: Too many retries to talk to /var/run/clamav/clamd
vim /etc/clamd.conf
#LocalSocket /var/run/clamav/clamd.sock
TCPSocket 3310
User amavis
postfix SMTP Auth Error “no SASL authentication mechanisms”
yum install cyrus-sasl-plain
SMTP Auth:
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain = $myhostname
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions =
permit_sasl_authenticated,
permit_mynetworks,
reject_unauth_destination
send test message from command line
echo “Test message” | mailx -s “test” [email protected]
set sudo password unlimited time
visudo
Add:
Defaults timestamp_timeout=-1
linux – add sudo password
sudo -v
it also extends the sudo timeout for another 5 minutes, if timeout have limit
linux – clear sudo cache password
sudo -k
HP’s line of Smart Array RAID controllers
cciss_vol_status is a linux/FreeBSD utility to quickly show the status
of logical drives on HP’s line of Smart Array RAID controllers. It should
work with both the hpsa and cciss drivers, as well as with the HP proprietary
hpvsa software RAID driver.
linux – monitor hard disk with SMART usage Centos
yum install smartmontools
smartctl -a /dev/sda
kernel rhgb and noquiet meaning
Use graphical boot (Red Hat Graphical Boot). Omit if you want text-only boot.
Be more verbose. Omit for less verbose booting
grub partitions
Grub designation | Meaning | Usual designation |
(hd0) | First hard disk | /dev/sda (or /dev/vda) |
(hd1) | Second hard disk | /dev/sdb (or /dev/vdb) |
(hd0,0) | First hard disk, first partition | /dev/sda1 (or /dev/vda1) |
(hd1,0) | Second hard drive, first partition | /dev/sdb1 (or /dev/vdb1) |
(hd1,1) | Second hard drive, second partition | /dev/sdb2 (or /dev/vdb2) |
remove the BIOS FakeRAID metadata
Installing Centos you can see some error like: Disk contains BIOS metadata, but is not part of any recognized BIOS RAID sets. Ignoring disk sdb
dmraid -r -E /dev/sda
if this not helps so:
mdadm –zero-superblock /dev/sda
Hard way:
dd if=/dev/zero of=/dev/sda bs=512 seek=$(( $(blockdev –getsz /dev/sda) – 1024 )) count=1024
linux – skip fsck after reboot
shutdown –rf now
or add fastboot option to kernel line
fstab you can skip fsck permantly