It seems like, the if not even more rogue "group of hackintosh" might hit a stumbling block:
http://osxdaily.com/2009/10/31/hackintosh-netbook-users-take-note-snow-leopard-10-6-2-update-kills-support-for-atom-processor/
which let me make something clear - QUIT SHOOTING YOURSELF IN THE FOOT APPLE!
I mean do we all really have to pay for your overpriced laptops with sub-par parts. What is so hard about being a bit more like linux? Why not extend a development branch to arm/mips-el/amd - kernel drives and kernel building kit would be a appreciated. Why not have broader hardware support like the BSD's/Linux? ffs make a modular Kernel with autodetect and activate driver support! your a multi million if not billion company - challenge yourself!
-Dont charge 1800$ for a 30" monitor thats CRAP! they are much cheaper online for the same or better parts.
-Dont charge 900$ for a 24" monitor - where I have found one for 250$ that is comparable if not better.
ARE YOU FUCKING KIDDING ME IM PAYING ALMOST 3x more for a stupid logo?? REALLY?! Your no better then micro-shaft with there bloatware OS! Im mean really what would hurt if you took a page from some of the Community maintained OS's out there?
- Better support
- More Architectures
- More Driver choices
- Reasonable if not competitive with retail prices
- Commission based OS application development
I once heard a Microsoft sales guy say something very,very true as much as I hated hearing it, it had a ring of truth:
"You meet many pure Linux and Windows developers, but when was the last time you ever met a pure Mac developer?"
In truth I've never met a "Mac only developer" in fact i've met very few Linux developers that will even touch MAC's and the few that do develop there software for MAC's none of them do any such "Hardware/firmware" level development.
I can see it your way though too -a high level of "working" products with "quality" but what makes you any better or different from Microsoft. I have yet to see a difference.
Tuesday, November 3, 2009
MIT Open Courseware
Apparently "open" course guidelines and such for structured classes from MIT and a few other one off online schools.
http://www.onlinecourses.org/2009/10/28/100-incredible-open-courses-for-the-ultimate-tech-geek/
So far i've actually worked through the beginners Python class. Its not bad.
http://www.onlinecourses.org/2009/10/28/100-incredible-open-courses-for-the-ultimate-tech-geek/
So far i've actually worked through the beginners Python class. Its not bad.
Tuesday, October 13, 2009
[ Linux ] maint2.sh
Kind of a Key service restart if put on a cron or scron
#!/bin/sh
# This script is meant to restart key services on a vps or server.
# Written by L.C. Version 2.0
logz=/var/log/maint_sh.log
pstree | grep ssh >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep ss*` restart
echo "MAINT.SH: SSH restarted: `date`" >>$logz
}
fi
pstree | grep mysql >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep mysql` restart
echo "MAINT.SH: MySQL restarted: `date`" >>$logz
}
fi
pstree | grep master >/dev/null; if [ $? -eq 1 ]
then
{
/etc/init.d/`ls /etc/init.d/ | grep postfix` restart
echo "MAINT.SH: POSTFIX restarted: `date`" >>$logz
}
fi
[ Linux ] Postfix Log Analyzer for dead addresses
#!/bin/bash
# This system filters the current maillog or mail.log and provides data on what email addresses are bad!
egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep "@" | awk '{print $7}' | grep -v "host" >$add_log
egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep -c "@" >>$rec_log
# This system filters the current maillog or mail.log and provides data on what email addresses are bad!
logs=`for logfile in /var/log/mail{.,}log; do if [ -f $logfile ]; then echo $logfile; fi; done` && echo $logs
add_log=/root/bounces.txt
rec_log=/root/bounce_record.log
if date | grep Sat | grep "21:1" >/dev/null;
then
{
gunzip mail.log.*.gz
echo "Starting : `date`" >> $rec_log
egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep "@" | awk '{print $7}' | grep -v "host" >$add_log
echo " Tabulating amount of records: " >> $rec_log
egrep -i '(Not\ a\ valid\ mailbox|User\ is\ unknown|Undeliverable\ address|recipient\ rejected|user\ unknown|invalid\ recipient\:|address\ rejected|Does\ not\ exist|Illegal\ alias|mailbox|Mailbox\ is\ inactive|reach\ is\ disabled|Mailbox\ disabled )' $logs | egrep -v -i '(policy|spam|grey?list|sender|dns|spf\ record|reverse|quota|acces\ denied|unavail|later|try|headach|temporar|full|too\ many|root|esozm)' | grep -c "@" >>$rec_log
echo "Finishing : `date`" >> $rec_log
echo "dun dun dun done"
}
else
{
echo "Not time to process the mail logs"
}
fi
[ Linux ] x_hk.sh
This script came via the neccesity to abolish services that would result in a reboot/cpanel/panels that inject restart commands onto vps's. As you see it could run alot everyday if something was making it run every 5 minutes like scron.
## x_hk.sh (x-hunter-kill script) ##
## x_hk.sh (x-hunter-kill script) ##
#!/bin/bash
# Killer script
# x_hk.sh - includes date.
if date | grep "1:1" >/dev/null;
then
{
echo "### Running the [HK] process on this cycle ###"
echo " "
echo "## clearing the crontab ##"
crontab -r
echo "## trying to kill: httpd ##"
pgrep httpd | xargs -r kill -9
echo "## trying to kill: apache2 ##"
pgrep apache2 | xargs -r kill -9
echo "## trying to kill: xinetd ##"
pgrep xinetd | xargs -r kill -9
echo "## trying to kill: named ##"
pgrep named | xargs -r kill -9
}
else
{
echo "### Not running the [HK] process on this cycle ###"
echo "Current Time: `date`"
echo " "
}
fi
Friday, October 2, 2009
[ Centos ] Postfix dsn status script
Centos postfix DSN translation script - tells you what your mail is doing. In case you have no clue what we are chatting about view your maillog/mail.log :
Oct 1 00:35:01 ghosting postfix/smtp[1437]: ABA987666094: to=, relay=gmail-smtp-in.l.google.com[209.85.222.73]:25, delay=9881, delays=9880/0.01/0.22/0.71, dsn=2.0.0, status=sent (250 2.0.0 OK 1254342900 5si70217753pzk.88)
This largely tells you what has been done with your mail when the "status=xxxxxx" line or the message of why your mail fails is "vague".
file: centos_postfix_dsn_translator.sh
#!/bin/bash
##########################################
# Postfix DSN Script Based off of rfc3463
# http://www.faqs.org/rfcs/rfc3463.html
# Written by L.C.
# DSN rfc's refer to rfc3461-rfc3464
##########################################
######################################################
# Persistent Transient Failure Aka Deferred 4.xxx.xxx
######################################################
# Other or Undefined Status #
echo "Deferred :: 4.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=4.0.0"`
echo " "
# Address Status #
echo "Deferred :: 4.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=4.1.0"`
echo "Deferred :: 4.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=4.1.1"`
echo "Deferred :: 4.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=4.1.2"`
echo "Deferred :: 4.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.3"`
echo "Deferred :: 4.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=4.1.4"`
echo "Deferred :: 4.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=4.1.5"`
echo "Deferred :: 4.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=4.1.6"`
echo "Deferred :: 4.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.7"`
echo "Deferred :: 4.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=4.1.8"`
echo " "
# Mailbox Status #
echo "Deferred :: 4.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=4.2.0"`
echo "Deferred :: 4.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=4.2.1"`
echo "Deferred :: 4.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=4.2.2"`
echo "Deferred :: 4.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=4.2.3"`
echo "Deferred :: 4.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=4.2.4"`
echo " "
# Mail system status #
echo "Deferred :: 4.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=4.3.0"`
echo "Deferred :: 4.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=4.3.1"`
echo "Deferred :: 4.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=4.3.2"`
echo "Deferred :: 4.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=4.3.3"`
echo "Deferred :: 4.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=4.3.4"`
echo " "
# Network and Routing Status #
echo "Deferred :: 4.4.0 :: Other or undefined network or routing status :"`cat /var/log/maillog | grep -c "dsn=4.4.0"`
echo "Deferred :: 4.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=4.4.1"`
echo "Deferred :: 4.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=4.4.2"`
echo "Deferred :: 4.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=4.4.3"`
echo "Deferred :: 4.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=4.4.4"`
echo "Deferred :: 4.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=4.4.5"`
echo "Deferred :: 4.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=4.4.6"`
echo "Deferred :: 4.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=4.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Deferred :: 4.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=4.5.0"`
echo "Deferred :: 4.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=4.5.1"`
echo "Deferred :: 4.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=4.5.2"`
echo "Deferred :: 4.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=4.5.3"`
echo "Deferred :: 4.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=4.5.4"`
echo "Deferred :: 4.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=4.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Deferred :: 4.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=4.6.0"`
echo "Deferred :: 4.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.1"`
echo "Deferred :: 4.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=4.6.2"`
echo "Deferred :: 4.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.3"`
echo "Deferred :: 4.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=4.6.4"`
echo "Deferred :: 4.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=4.6.5"`
echo " "
# Security or Policy Status #
echo "Deferred :: 4.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=4.7.0"`
echo "Deferred :: 4.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=4.7.1"`
echo "Deferred :: 4.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=4.7.2"`
echo "Deferred :: 4.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=4.7.3"`
echo "Deferred :: 4.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.4"`
echo "Deferred :: 4.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=4.7.5"`
echo "Deferred :: 4.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.6"`
echo "Deferred :: 4.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=4.7.7"`
echo " "
############################################
# Permanent Failure's Aka Bounces 5.xxx.xxx
############################################
# Other or Undefined Status #
echo "Bounced :: 5.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=5.0.0"`
echo " "
# Address Status #
echo "Bounced :: 5.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=5.1.0"`
echo "Bounced :: 5.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=5.1.1"`
echo "Bounced :: 5.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=5.1.2"`
echo "Bounced :: 5.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.3"`
echo "Bounced :: 5.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=5.1.4"`
echo "Bounced :: 5.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=5.1.5"`
echo "Bounced :: 5.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=5.1.6"`
echo "Bounced :: 5.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.7"`
echo "Bounced :: 5.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=5.1.8"`
echo " "
# Mailbox Status #
echo "Bounced :: 5.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=5.2.0"`
echo "Bounced :: 5.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=5.2.1"`
echo "Bounced :: 5.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=5.2.2"`
echo "Bounced :: 5.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=5.2.3"`
echo "Bounced :: 5.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=5.2.4"`
echo " "
# Mail system status #
echo "Bounced :: 5.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=5.3.0"`
echo "Bounced :: 5.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=5.3.1"`
echo "Bounced :: 5.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=5.3.2"`
echo "Bounced :: 5.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=5.3.3"`
echo "Bounced :: 5.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=5.3.4"`
echo " "
# Network and Routing Status #
echo "Bounced :: 5.4.0 :: Other or undefined network or routing statu :"`cat /var/log/maillog | grep -c "dsn=5.4.0"`
echo "Bounced :: 5.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=5.4.1"`
echo "Bounced :: 5.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=5.4.2"`
echo "Bounced :: 5.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=5.4.3"`
echo "Bounced :: 5.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=5.4.4"`
echo "Bounced :: 5.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=5.4.5"`
echo "Bounced :: 5.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=5.4.6"`
echo "Bounced :: 5.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=5.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Bounced :: 5.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=5.5.0"`
echo "Bounced :: 5.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=5.5.1"`
echo "Bounced :: 5.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=5.5.2"`
echo "Bounced :: 5.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=5.5.3"`
echo "Bounced :: 5.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=5.5.4"`
echo "Bounced :: 5.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=5.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Bounced :: 5.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=5.6.0"`
echo "Bounced :: 5.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.1"`
echo "Bounced :: 5.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=5.6.2"`
echo "Bounced :: 5.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.3"`
echo "Bounced :: 5.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=5.6.4"`
echo "Bounced :: 5.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=5.6.5"`
echo " "
# Security or Policy Status #
echo "Bounced :: 5.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=5.7.0"`
echo "Bounced :: 5.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=5.7.1"`
echo "Bounced :: 5.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=5.7.2"`
echo "Bounced :: 5.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=5.7.3"`
echo "Bounced :: 5.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.4"`
echo "Bounced :: 5.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=5.7.5"`
echo "Bounced :: 5.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.6"`
echo "Bounced :: 5.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=5.7.7"`
echo " "
############################################
# Custom Errors x.8.xxx & Success 2.xxx.xxx
############################################
echo "Sent Mail :: 2.0.0 :: Message Sent :"`cat /var/log/maillog | grep -c "dsn=2.0.0"`
echo " "
echo "Custom successes :: 2.8.x :: Custom sent Message :"`cat /var/log/maillog | grep "dsn=2." | grep -v "dsn=2.0.0" | grep -c "dsn=2."`
echo "Custom deferres :: 4.8.x :: Custom defferes Message :"`cat /var/log/maillog | grep -c "dsn=4.8."`
echo "Custom failures :: 5.8.x :: Custom Failure Message :"`cat /var/log/maillog | grep -c "dsn=5.8."`
############################################
# Filter for all bounced mail
############################################
cat /var/log/maillog | grep ": to=<" | grep -v "dsn=4." | grep -v "dsn=2." | awk '{print $7}' | grep -v "to=<\esozm" | grep -v "to=<\root" > bounced.log
Oct 1 00:35:01 ghosting postfix/smtp[1437]: ABA987666094: to=
This largely tells you what has been done with your mail when the "status=xxxxxx" line or the message of why your mail fails is "vague".
file: centos_postfix_dsn_translator.sh
#!/bin/bash
##########################################
# Postfix DSN Script Based off of rfc3463
# http://www.faqs.org/rfcs/rfc3463.html
# Written by L.C.
# DSN rfc's refer to rfc3461-rfc3464
##########################################
######################################################
# Persistent Transient Failure Aka Deferred 4.xxx.xxx
######################################################
# Other or Undefined Status #
echo "Deferred :: 4.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=4.0.0"`
echo " "
# Address Status #
echo "Deferred :: 4.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=4.1.0"`
echo "Deferred :: 4.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=4.1.1"`
echo "Deferred :: 4.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=4.1.2"`
echo "Deferred :: 4.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.3"`
echo "Deferred :: 4.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=4.1.4"`
echo "Deferred :: 4.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=4.1.5"`
echo "Deferred :: 4.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=4.1.6"`
echo "Deferred :: 4.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=4.1.7"`
echo "Deferred :: 4.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=4.1.8"`
echo " "
# Mailbox Status #
echo "Deferred :: 4.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=4.2.0"`
echo "Deferred :: 4.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=4.2.1"`
echo "Deferred :: 4.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=4.2.2"`
echo "Deferred :: 4.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=4.2.3"`
echo "Deferred :: 4.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=4.2.4"`
echo " "
# Mail system status #
echo "Deferred :: 4.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=4.3.0"`
echo "Deferred :: 4.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=4.3.1"`
echo "Deferred :: 4.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=4.3.2"`
echo "Deferred :: 4.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=4.3.3"`
echo "Deferred :: 4.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=4.3.4"`
echo " "
# Network and Routing Status #
echo "Deferred :: 4.4.0 :: Other or undefined network or routing status :"`cat /var/log/maillog | grep -c "dsn=4.4.0"`
echo "Deferred :: 4.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=4.4.1"`
echo "Deferred :: 4.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=4.4.2"`
echo "Deferred :: 4.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=4.4.3"`
echo "Deferred :: 4.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=4.4.4"`
echo "Deferred :: 4.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=4.4.5"`
echo "Deferred :: 4.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=4.4.6"`
echo "Deferred :: 4.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=4.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Deferred :: 4.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=4.5.0"`
echo "Deferred :: 4.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=4.5.1"`
echo "Deferred :: 4.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=4.5.2"`
echo "Deferred :: 4.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=4.5.3"`
echo "Deferred :: 4.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=4.5.4"`
echo "Deferred :: 4.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=4.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Deferred :: 4.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=4.6.0"`
echo "Deferred :: 4.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.1"`
echo "Deferred :: 4.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=4.6.2"`
echo "Deferred :: 4.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=4.6.3"`
echo "Deferred :: 4.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=4.6.4"`
echo "Deferred :: 4.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=4.6.5"`
echo " "
# Security or Policy Status #
echo "Deferred :: 4.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=4.7.0"`
echo "Deferred :: 4.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=4.7.1"`
echo "Deferred :: 4.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=4.7.2"`
echo "Deferred :: 4.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=4.7.3"`
echo "Deferred :: 4.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.4"`
echo "Deferred :: 4.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=4.7.5"`
echo "Deferred :: 4.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=4.7.6"`
echo "Deferred :: 4.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=4.7.7"`
echo " "
############################################
# Permanent Failure's Aka Bounces 5.xxx.xxx
############################################
# Other or Undefined Status #
echo "Bounced :: 5.0.0 :: Other Undefined Status :"`cat /var/log/maillog | grep -c "dsn=5.0.0"`
echo " "
# Address Status #
echo "Bounced :: 5.1.0 :: Other address status :"`cat /var/log/maillog | grep -c "dsn=5.1.0"`
echo "Bounced :: 5.1.1 :: Bad destination mailbox address :"`cat /var/log/maillog | grep -c "dsn=5.1.1"`
echo "Bounced :: 5.1.2 :: Bad destination system address :"`cat /var/log/maillog | grep -c "dsn=5.1.2"`
echo "Bounced :: 5.1.3 :: Bad destination mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.3"`
echo "Bounced :: 5.1.4 :: Destination mailbox address ambiguous :"`cat /var/log/maillog | grep -c "dsn=5.1.4"`
echo "Bounced :: 5.1.5 :: Destination mailbox address valid :"`cat /var/log/maillog | grep -c "dsn=5.1.5"`
echo "Bounced :: 5.1.6 :: Mailbox has moved :"`cat /var/log/maillog | grep -c "dsn=5.1.6"`
echo "Bounced :: 5.1.7 :: Bad sender's mailbox address syntax :"`cat /var/log/maillog | grep -c "dsn=5.1.7"`
echo "Bounced :: 5.1.8 :: Bad sender's system address :"`cat /var/log/maillog | grep -c "dsn=5.1.8"`
echo " "
# Mailbox Status #
echo "Bounced :: 5.2.0 :: Other or undefined mailbox status :"`cat /var/log/maillog | grep -c "dsn=5.2.0"`
echo "Bounced :: 5.2.1 :: Mailbox disabled, not accepting messages :"`cat /var/log/maillog | grep -c "dsn=5.2.1"`
echo "Bounced :: 5.2.2 :: Mailbox full :"`cat /var/log/maillog | grep -c "dsn=5.2.2"`
echo "Bounced :: 5.2.3 :: Message length exceeds administrative limit :"`cat /var/log/maillog | grep -c "dsn=5.2.3"`
echo "Bounced :: 5.2.4 :: Mailing list expansion problem :"`cat /var/log/maillog | grep -c "dsn=5.2.4"`
echo " "
# Mail system status #
echo "Bounced :: 5.3.0 :: Other or undefined mail system status :"`cat /var/log/maillog | grep -c "dsn=5.3.0"`
echo "Bounced :: 5.3.1 :: Mail system full :"`cat /var/log/maillog | grep -c "dsn=5.3.1"`
echo "Bounced :: 5.3.2 :: System not accepting network messages :"`cat /var/log/maillog | grep -c "dsn=5.3.2"`
echo "Bounced :: 5.3.3 :: System not capable of selected features :"`cat /var/log/maillog | grep -c "dsn=5.3.3"`
echo "Bounced :: 5.3.4 :: Message too big for system :"`cat /var/log/maillog | grep -c "dsn=5.3.4"`
echo " "
# Network and Routing Status #
echo "Bounced :: 5.4.0 :: Other or undefined network or routing statu :"`cat /var/log/maillog | grep -c "dsn=5.4.0"`
echo "Bounced :: 5.4.1 :: No answer from host :"`cat /var/log/maillog | grep -c "dsn=5.4.1"`
echo "Bounced :: 5.4.2 :: Bad connection :"`cat /var/log/maillog | grep -c "dsn=5.4.2"`
echo "Bounced :: 5.4.3 :: Routing server failure :"`cat /var/log/maillog | grep -c "dsn=5.4.3"`
echo "Bounced :: 5.4.4 :: Unable to route :"`cat /var/log/maillog | grep -c "dsn=5.4.4"`
echo "Bounced :: 5.4.5 :: Network congestion :"`cat /var/log/maillog | grep -c "dsn=5.4.5"`
echo "Bounced :: 5.4.6 :: Routing loop detected :"`cat /var/log/maillog | grep -c "dsn=5.4.6"`
echo "Bounced :: 5.4.7 :: Delivery time expired :"`cat /var/log/maillog | grep -c "dsn=5.4.7"`
echo " "
# Mail Delivery Protocol Status #
echo "Bounced :: 5.5.0 :: Other or undefined protocol status :"`cat /var/log/maillog | grep -c "dsn=5.5.0"`
echo "Bounced :: 5.5.1 :: Invalid command :"`cat /var/log/maillog | grep -c "dsn=5.5.1"`
echo "Bounced :: 5.5.2 :: Syntax error :"`cat /var/log/maillog | grep -c "dsn=5.5.2"`
echo "Bounced :: 5.5.3 :: Too many recipients :"`cat /var/log/maillog | grep -c "dsn=5.5.3"`
echo "Bounced :: 5.5.4 :: Invalid command arguments :"`cat /var/log/maillog | grep -c "dsn=5.5.4"`
echo "Bounced :: 5.5.5 :: Wrong protocol version :"`cat /var/log/maillog | grep -c "dsn=5.5.5"`
echo " "
# Message Content or Message Media Status #
echo "Bounced :: 5.6.0 :: Other or undefined media error :"`cat /var/log/maillog | grep -c "dsn=5.6.0"`
echo "Bounced :: 5.6.1 :: Media not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.1"`
echo "Bounced :: 5.6.2 :: Conversion required and prohibited :"`cat /var/log/maillog | grep -c "dsn=5.6.2"`
echo "Bounced :: 5.6.3 :: Conversion required but not supported :"`cat /var/log/maillog | grep -c "dsn=5.6.3"`
echo "Bounced :: 5.6.4 :: Conversion with loss performed :"`cat /var/log/maillog | grep -c "dsn=5.6.4"`
echo "Bounced :: 5.6.5 :: Conversion failed :"`cat /var/log/maillog | grep -c "dsn=5.6.5"`
echo " "
# Security or Policy Status #
echo "Bounced :: 5.7.0 :: Other or undefined security status :"`cat /var/log/maillog | grep -c "dsn=5.7.0"`
echo "Bounced :: 5.7.1 :: Delivery not authorized, message refused :"`cat /var/log/maillog | grep -c "dsn=5.7.1"`
echo "Bounced :: 5.7.2 :: Mailing list expansion prohibited :"`cat /var/log/maillog | grep -c "dsn=5.7.2"`
echo "Bounced :: 5.7.3 :: Security conversion required but not possible :"`cat /var/log/maillog | grep -c "dsn=5.7.3"`
echo "Bounced :: 5.7.4 :: Security features not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.4"`
echo "Bounced :: 5.7.5 :: Cryptographic failure :"`cat /var/log/maillog | grep -c "dsn=5.7.5"`
echo "Bounced :: 5.7.6 :: Cryptographic algorithm not supported :"`cat /var/log/maillog | grep -c "dsn=5.7.6"`
echo "Bounced :: 5.7.7 :: Message integrity failure :"`cat /var/log/maillog | grep -c "dsn=5.7.7"`
echo " "
############################################
# Custom Errors x.8.xxx & Success 2.xxx.xxx
############################################
echo "Sent Mail :: 2.0.0 :: Message Sent :"`cat /var/log/maillog | grep -c "dsn=2.0.0"`
echo " "
echo "Custom successes :: 2.8.x :: Custom sent Message :"`cat /var/log/maillog | grep "dsn=2." | grep -v "dsn=2.0.0" | grep -c "dsn=2."`
echo "Custom deferres :: 4.8.x :: Custom defferes Message :"`cat /var/log/maillog | grep -c "dsn=4.8."`
echo "Custom failures :: 5.8.x :: Custom Failure Message :"`cat /var/log/maillog | grep -c "dsn=5.8."`
############################################
# Filter for all bounced mail
############################################
cat /var/log/maillog | grep ": to=<" | grep -v "dsn=4." | grep -v "dsn=2." | awk '{print $7}' | grep -v "to=<\esozm" | grep -v "to=<\root" > bounced.log
Friday, July 24, 2009
FreeBSD - Ncurses menu config location
So something cool -
In FreeBSD when you install a port and encounter a ncurses ui and then hit ok, where does it go?
/var/db/posts/$portname/option
check it out some time :D
In FreeBSD when you install a port and encounter a ncurses ui and then hit ok, where does it go?
/var/db/posts/$portname/option
check it out some time :D
Thursday, July 23, 2009
FreeBSD - Installing postfix & sending your first mail
Postfix: Probably the premier replacement for sendmail, which comes with ux/linux.
$> cd /usr/ports/mail/postfix-current/
$> make install clean
At this point you will most likely be confronted by a ncurses menu. You can choose to enable options or not. We just want to go with stock options so tab to ok and hit enter. So this should just go on and do its marry thing. If you get any other boxes just stick with defaults and tab to ok, and install.
Now to test!
telnet to your local host on port 25, and then type the following:
$> telnet localhost 25
ehlo example.com
*After this you should get accouple messages that start with 250 - this is good!*
mail from: root@example.com
*another 250 message*
rcpt to: type_your_email_address_here_instead_of_this
*another 250 message*
data
*another message*
subject: This is a test message!!!
test message
.
*message about being queued*
quit
* This will exit telnet, and we will sleep the following command for a minute to check your mail log to see if its been sent *
$> sleep 60 && tail /var/log/maillog | grep sent
if it comes back with sent your gold and you've sent your first message.
**** Just a side note, this is how it works in linux - infact i had to configure linux more then bsd
Please respond if you have issues :)
$> cd /usr/ports/mail/postfix-current/
$> make install clean
At this point you will most likely be confronted by a ncurses menu. You can choose to enable options or not. We just want to go with stock options so tab to ok and hit enter. So this should just go on and do its marry thing. If you get any other boxes just stick with defaults and tab to ok, and install.
Now to test!
telnet to your local host on port 25, and then type the following:
$> telnet localhost 25
ehlo example.com
*After this you should get accouple messages that start with 250 - this is good!*
mail from: root@example.com
*another 250 message*
rcpt to: type_your_email_address_here_instead_of_this
*another 250 message*
data
*another message*
subject: This is a test message!!!
test message
.
*message about being queued*
quit
* This will exit telnet, and we will sleep the following command for a minute to check your mail log to see if its been sent *
$> sleep 60 && tail /var/log/maillog | grep sent
if it comes back with sent your gold and you've sent your first message.
**** Just a side note, this is how it works in linux - infact i had to configure linux more then bsd
Please respond if you have issues :)
FreeBSD - Adding/setting up Grub
So your from linux land or you just want to try something new... Try grub :)
Lets located grub:
#> whereis grub
/usr/ports/sysutils/grub
Move to grubs port directory and install it:
#> cd /usr/ports/sysutils/grub
#> make install clean
Make the Mbr writeable, which is needed for grub:
#> sysctl kern.geom.debugflags=16
Now for the fun part! Installing - if you have a basic install this work just fine
#> grub-install hd0
Entering the grub subsystem:
#> grub
grub> root (hd0,0,a)
grub> setup --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
grub> quit
Making a menu.lst file that will take you to a free bsd booter.
#> nano /boot/grub/menu.lst
title FreeBSD 7.2
root (hd0,0,a)
kernel /boot/loader
Reboot the box and cross your fingers ;)
#>reboot
So I hope this worked for you, it worked great on my VM machine, and a few other boxes i've installed.
Lets located grub:
#> whereis grub
/usr/ports/sysutils/grub
Move to grubs port directory and install it:
#> cd /usr/ports/sysutils/grub
#> make install clean
Make the Mbr writeable, which is needed for grub:
#> sysctl kern.geom.debugflags=16
Now for the fun part! Installing - if you have a basic install this work just fine
#> grub-install hd0
Entering the grub subsystem:
#> grub
grub> root (hd0,0,a)
grub> setup --stage2=/boot/grub/stage2 --prefix=/boot/grub (hd0)
grub> quit
Making a menu.lst file that will take you to a free bsd booter.
#> nano /boot/grub/menu.lst
title FreeBSD 7.2
root (hd0,0,a)
kernel /boot/loader
Reboot the box and cross your fingers ;)
#>reboot
So I hope this worked for you, it worked great on my VM machine, and a few other boxes i've installed.
Wednesday, July 22, 2009
FreeBSD - Adding/setting console to Bash
Mind you after the fresh install you will probably have to do this as your root user until you install su or sudo.
$ echo $SHELL
/bin/csh
$ cd /usr/ports/bash3/
$ make install clean
~ This will download extra components && files ~
$ chsh -s bash root
$ chsh -s bash $USER
$ exit
~ Relogin and verify ~
# echo $SHELL
/usr/local/bin/bash
^_^ you now have bash shell!
$ echo $SHELL
/bin/csh
$ cd /usr/ports/bash3/
$ make install clean
~ This will download extra components && files ~
$ chsh -s bash root
$ chsh -s bash $USER
$ exit
~ Relogin and verify ~
# echo $SHELL
/usr/local/bin/bash
^_^ you now have bash shell!
Subscribe to:
Posts (Atom)
