=^.^=

lomount is not Included in the Debian Version of xen-utils, use kpartx

karma

I haven't been able to track down any rhyme or reason for its removal but lomount is not available in the xen-utils package for Debian.

The same functionality can at least be achieved, though in a more round-about way, with kpartx:

# kpartx -l router.hdd 
loop3p1 : 0 4192964 /dev/loop3 1
# kpartx -a router.hdd
# mount /dev/mapper/loop3p1 /mnt/tmp

Documentary for Dinner: Vice News: This is What Winning Looks Like (2013)

karma

A disturbing new documentary about the ineptitude, drug abuse, sexual misconduct, and corruption of the Afghan security forces as well as the reduced role of US Marines due to the troop withdrawal.

Clearing Huge Zimbra Mail Queues

karma

An account on one of my Zimbra servers was compromised recently, leading to about one hundred or so different spammers gangbanging it. It wasn't hard to fix the leak but once you've got your spammer problem dealt with you will probably be left with huge queues. Huge queues that are probably putting your load average well above 10. Worse than the resource problem, as these queues very slowly drain you are still spamming and it will take a very long time to get off of all the RBLs you are undoubtedly now on unless we take action to clear them now.

You should be able to log into the Zimbra administration front-end, navigate to Monitor > Mail Queues and selectively clear deferred messages from bad addresses. Unfortunately, the web interface is as useless as a tit on a bull when it comes to clearing tens of thousands of messages. It's necessary to shell in and manipulate the postfix queues directly.

Lots of thanks to TheBrain.ca for publishing his solution at http://developer.thebrain.ca/2010/06/troubleshooting-mail-queue-on-postfix.html:

# /opt/zimbra/postfix/sbin/postqueue -p | awk '/[email protected]/ {print $1}' > /tmp/user.txt
# /opt/zimbra/postfix/sbin/postsuper -d - < /tmp/user.txt

This uses awk to spit out the message ID of e-mails coming from [email protected] which we then feed into postsuper -d.

You should edit the output file and do a null search and replace for asterisks. You may also find some non-message-ID entries but these can safely be ignored.

If you don't want to see the list of message IDs before dropping them a more elegant method can be found in the postsuper man page:

              mailq | tail +2 | grep -v ’^ *(’ | awk  ´BEGIN { RS = "" }
                  # $7=sender, $8=recipient1, $9=recipient2
                  { if ($8 == "[email protected]" && $9 == "")
                        print $1 }
              ´ | tr -d ’*!’ | postsuper -d -

How to Tell What Version of Zimbra you are Running

karma
# sudo -u zimbra /opt/zimbra/bin/zmcontrol -v
Release 8.0.2_GA_5569.RHEL6_64_20121210115059 CentOS6_64 FOSS edition.

Zimbra maillog Missing

karma

If you can't find /var/log/maillog edit /etc/syslog.conf or /etc/rsyslog.conf and make sure this line

mail.*                  /var/log/maillog

isn't missing.