Qmail abracadabras

Sent emails from: sender@example.com

cat ./var/log/qmail/smtpd/current |grep -i "rcpt: from <sender@example.com" |awk '{print $1" "$6 " "$7 " "$8 " " $9 " " $10}' |tai64nlocal > ../workresult/sender\@example.com-emails.txt

Sent emails from: 10.11.12.13

cat /var/log/qmail/smtpd/current|grep "CHKUSER relaying rcpt:" |tai64nlocal |more |awk '{print $9;}'|awk '{match($0,/[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+/); ip = substr($0,RSTART,RLENGTH); print ip}'|grep -v "10.11.12.13"

Ubuntu 12.04 Stuck at “Stopping Userspace bootsplash”

Virtual machine downloaded from windows azure

bootsplash0

1. Edit /etc/default/grub

#GRUB_CMDLINE_LINUX_DEFAULT="console=tty1 console=ttyS0 earlyprintk=ttyS0 rootdelay=300"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_GFXMODE=640x480

2. Remove bloatware

aptitude remove --auto-remove cloud-init
aptitude remove --auto-remove plymouth-theme-ubuntu-text

If you are unable to enter rescue mode – use SystemRescueCd
bootsplash1

 

EMC VNX SMI installation

C:\Program Files\EMC\SYMCLI\bin>

C:\Program Files\EMC\SYMCLI\bin>cd “C:\Program Files\EMC\ECIM\ECOM\bin”

C:\Program Files\EMC\ECIM\ECOM\bin>TestSmiProvider.exe

Connection Type (ssl,no_ssl,native) [no_ssl]:

Host [localhost]:

Port [5988]:

Username [admin]:

Password [#1Password]:

Log output to console [y|n (default y)]:

Log output to file [y|n (default y)]:

Logfile path [Testsmiprovider.log]:

Connecting to localhost:5988

Using user account ‘admin’ with password ‘#1Password’

########################################################################

##                                                                    ##

##                  EMC SMI Provider Tester                           ##

##   This program is intended for use by EMC Support personnel only.  ##

##   At any time and without warning this program may be revised      ##

##   without regard to backwards compatibility or be                  ##

##   removed entirely from the kit.                                   ##

########################################################################

slp    – slp urls                     slpv    – slp attributes

cn     – Connect                      dc      – Disconnect

disco  – EMC Discover                 rc      – RepeatCount

addsys – EMC AddSystem                remsys  – EMC RemoveSystem

refsys – EMC RefreshSystem

ec     – EnumerateClasses             ecn     – EnumerateClassNames

ei     – EnumerateInstances           ein     – EnumerateInstanceNames

ens    – EnumerateNamespaces          miner   – Mine classes

a      – Associators                  an      – AssociatorNames

r      – References                   rn      – ReferenceNames

gi     – GetInstance                  gc      – GetClass

ci     – CreateInstance               di      – DeleteInstance

mi     – ModifyInstance               eq      – ExecQuery

gp     – GetProperty                  sp      – SetProperty

tms    – TotalManagedSpace            tp      – Test pools

ecap   – Extent Capacity              pd      – Profile Discovery

im     – InvokeMethod                 active  – ActiveControls

ind    – Indications menu             tv      – Test views

st     – Set timeout value            lc      – Log control

sl     – Start listener               dv      – Display version info

ns     – NameSpace                    vtl     – VTL menu

chp    – consolidated host provider menu

q      – Quit                         h       – Help

########################################################################

Built with EMC SMI-S Provider: V4.6.2

Namespace: root/emc

repeat count: 1

(localhost:5988) ? addsys

Add System {y|n} [n]: y

ArrayType (1=Clar, 2=Symm) [1]:

One or more IP address or Hostname or Array ID

Elements for Addresses

IP address or hostname or array id 0 (blank to quit): 10.xx.xx.ab

IP address or hostname or array id 1 (blank to quit): 10.xx.xx.cd

IP address or hostname or array id 2 (blank to quit):

Address types corresponding to addresses specified above.

(1=URL, 2=IP/Nodename, 3=Array ID)

Address Type (0) [default=2]:

Address Type (1) [default=2]:

User [null]: admin

Password [null]: xxxxxxxxx

++++ EMCAddSystem ++++

OUTPUT : 0

Legend:0=Success, 1=Not Supported, 2=Unknown, 3=Timeout, 4=Failed

5=Invalid Parameter

4096=Job Queued, 4097=Size Not Supported

Note: Not all above values apply to all methods – see MOF for the method.

System : //10.xx.ab.ef/root/emc:Clar_StorageSystem.CreationClassName=”Clar_Stora

geSystem”,Name=”CLARiiON+CKM00133801649″

In 12.599952 Seconds

Please press enter key to continue…

OpenVPN on OpenWRT router

Note underscore! Seems that OpenWrt does not like hyphen

config openvpn ‘lan’
option script_security ‘2’
option enable ‘1’
option remote ‘212.x.y.z’
option port ‘1194’
option proto ‘udp’
option dev ‘tap0’
#
option persist_key ‘1’
option persist_tun ‘1’
option keepalive “10 120”
#
option comp-lzo “yes”
#
option secret “/etc/config/static.key”
#
option user ‘nobody’
option group ‘nogroup’
option status ‘/tmp/openvpn-status.log’
option verb ‘3’
#

Or

uci set openvpn.vpn_mf=openvpn
uci set openvpn.vpn_mf.enabled=1
uci set openvpn.vpn_mf.local=192.168.0.254
uci set openvpn.vpn_mf.proto=udp
uci set openvpn.vpn_mf.port=1194
uci set openvpn.vpn_mf.dev=tap0
uci set openvpn.vpn_mf.script_security=2
uci set openvpn.vpn_mf.secret=/etc/config/static2.key
uci set openvpn.vpn_mf.persist_key=1
uci set openvpn.vpn_mf.persist_tun=1
uci set openvpn.vpn_mf.keepalive="10 120"
uci set openvpn.vpn_mf.comp_lzo=yes
uci set openvpn.vpn_mf.log=/tmp/openvpn.log
uci set openvpn.vpn_mf.verb=3
uci set openvpn.vpn_mf.user=nobody
uci set openvpn.vpn_mf.group=nogroup