PyBlosxom |
/Admin/commandLine/misc:
Logging to the System Log
This is actually more of a scripting thing, but what is a bash script except a collection of command lines....
To send a bit of text to /var/log/syslog:
logger Hello logging world!!
If you wish the output of a particular line in the script to be logged:
mysql -V | logger
will send the MySQL version to syslog. If you wish to also capture errors (STDERR) output, this will do it:
mysql < /path/to/a/sql/script.sql 2>&1 | logger
will send both script and error output to syslog.
posted at: 05:55 | path: /Admin/commandLine/misc | permanent link to this entry
/Admin/email/deliverability:
You Want Your E-mail Delivered: Simple Steps
You want the e-mail your mail server sends out delivered to an inbox, not to a SPAM folder. And certainly not bounced. Here are the simple things that you can do:
myhostname = hostname.domain.com
domain.com TXT "v=spf1 mx -all"says that a server should only accept e-mail for domain.com from a server with the same IP address as domain.com's MX record. This DNS record:
domain.com TXT "v=spf1 a -all"says that a server should only accept e-mail for domain.com from a server with the same IP address as domain.com's A record. This
domain.com TXT "v=spf1 mx a ip4:122.248.255.249 include:_spf.google.com -all"directs a server to accept e-mail from this domain from several sources, including Google's mail servers[3].
dig +short domain.com txtwill display domain.com's current TXT record(s).
port25.com[2] provides an excellant facility for testing your setup. Send an e-mail from your e-mail server to check-auth@verifier.port25.com or check-auth2@verifier.port25.com and they will send you an e-mail back showing your e-mail's hostname and SPF status, among other things.
[1] http://www.openspf.org/SPF_Record_Syntax
[2] http://www.port25.com/domainkeys/
[3] https://www.google.com/support/a/bin/answer.py?hl=en&answer=178723
posted at: 02:58 | path: /Admin/email/deliverability | permanent link to this entry