Posts

Showing posts from February, 2013

Exim: rewrite "From" field

Amazon's AWS SES service requires email be addressed from a particular user.
Add to begin rewrite section*  root@abc.com  FfrsReload exim Stolen from: http://serverfault.com/questions/377821/exim-send-every-emails-with-a-predefined-sender

Right-click with Mac trackpad

Try selecting something and clicking anywhere on the trackpad with TWO fingers.

AWS SES with exim4 on debian-based Linux

apt-get install exim4dpkg-reconfigure exim4-configSelect: internet site; mail is sent and received directly using SMTPIP-addresses to listen on for incoming SMTP connections:127.0.0.1 ; ::1 (it's the default anyways)Take most defaultsSplit configuration into small files?NO!lsof -nP -i :25Make sure you aren't allowing the world to connect!127.0.0.1:25 is goodAWS -> SESVerified SendersVerify one of your existing email addressesSMTP SettingsCreate My SMTP CredentialsUse downloaded credentials.csv file contents for below stepsEdit /etc/exim4/exim4.conf.templateFind ALREADY existing line "public_name = LOGIN"change to "public_name = OLD_LOGIN"Add below sections to existing sections in the fileUse info from credentials.csv in place of pointy brackets, e.g. <aws_id> service exim4 stopservice exim4 starttail -F /var/log/exim4/mainlogKeep this running in another terminal while you do the belowecho test001 | mail -r <email_you_verified_with_aws> -s &qu…

JMX ports to open in firewall for jconsole to Cassandra

Port 7199Used for about a dozen packets when JMX connection first madeA handshake of sortsProbably sets up the agreement on which high port to connect to, used belowSimilar to SIPSimilar to old FTPNot used again after initial handshakePort range 55000 to 55999To see these packets, on JVM servertcpdump -nn ! port 22 and host <jconsole client IP> (not literal, replace this)If jconsole starts showing graphs, you are connected To run jconsole directly on the server via VNC, see this article: http://sysadminandnetworking.blogspot.com/

Tricks and Tips
If you don't want to expose 1000 ports to the world for some reasonOpen all ports on firewall in front of JVM serverOn JVM server: tcpdump -nn ! port 22 and host <jconsole client IP>Start jconsole connection on client machineWatch to see which port JVM server is trying to reach jconsole client viaClose all but that port in the firewall, will be between 55000-55999Do a local experiment to a local JVM JMX-able application if unsur…

What's an MBean or JavaBean?

A fancy name for a Java class that:
is serializablemeans you can write/read the contents directly to disk as ishas a 0-argument constructorhas getter and setter methodsHave you ever tweaked a mbean value via jconsole before, btw? Understand, there was major hype for Java back in circa 2000 that didn't quite pan out as expected.

Increase bash history size on Mac

Add below lines to end of ~/.bash_profileSource result or log out and back insource ~/.bash_profileTestecho $HISTFILESIZEecho $HISTSIZE export HISTFILESIZE=2500

export HISTSIZE=""

rsync: include only these

rsync -avP --include=*/ [set of includes] --exclude=* for examplersync -n -avP --include=*/ --include=*.dat  --include=*.idx --exclude=* /informatica/ /backup/informatica/

From: http://masstransmit.com/garage_blog/rsync-quirks/

Linux equivalent of updatedb on Mac

sudo /usr/libexec/locate.updatedb

Disable CAPS LOCK key on MacBook Pro

System Preferences -> Keyboard -> Modifier KeysMAKE SURE YOU PICK THE RIGHT KEYBOARD"Select Keyboard"Caps Lock Key -> No Action Might as well do all the other keyboards while you're at it, eh?

Fix jEdit fonts for MacBook Pro with Retina display

From: https://bugs.eclipse.org/bugs/show_bug.cgi?id=382972#c4
Assumptions: jEdit was installed into /Applications directory.


Close any running jEditEdit /Applications/jEdit.app/Contents/Info.plistAt end of file, add the top two lines below above the bottom two lines, and saveDrag jEdit to desktopStart jEdit and see if fonts fixedIf fixed, drag jEdit back to /Applications, and retest.
<key>NSHighResolutionCapable</key>
<true/>
</dict>
</plist>

Open snmp requests to world

Open snmp requests to worldsnmpd.confrocommunity public 0.0.0.0/0#agentAddress  udp:127.0.0.1:161comment this line out if it exists so snmpd listens to the worldMake sure snmpd is listening on all interfaceslsof -nP -isnmpd  ......stuff in here........  UDP *:161Test from another serversnmpwalk -cpublic -v1 <IP address serving snmp request>