Split screen with GNU Screen
In a last post I wrote some use-cases of screen command. Now, I am going to add one missing thing - split screen (vertically). See following screenshot. Commands: Ctrl+a followed by | # (pipe) Split window Ctrl+a followed by Tab # Switch between split parts Once you switched into created split window, you can either create a new window (Ctrl+a followed by c) or reopen already existing window with Ctrl+a followed by n.
Examples of screen command usage
GNU Screen is a program which allows you run virtual consoles. The advantage is that screen’s console sessions are not broken when network connection (to machine where the console runs) breaks. But it has many other features, which make it really useful. Basics Let’s start with screen command. It opens a new shell session within screen. screen Detach screen (close but keep running on background), command screen -d Or shortcut (e.
Block outgoing SMTP traffic for non-postfix users
I still administer a LAMP webhosting server and I had issue with outgoing spam. The problem was, that Postfix logs gave no information about sent spams. It was not send through local MTA, but PHP connected to remote MTA's directly. This could be disabled with something in PHP or better (since there is also CGI) on system level - with iptables. Postfix has it's own system user, what means that SMTP traffic can by only initiated by postfix user.
SCP remote-to-remote copying
Using scp (secure copy, over ssh) for remote-to-remove copying has a bit unexpected behaviour for me. The expectation was, that copied data are transfered through machine where scp command runs. But this is not the default behaviour of scp. Default copy scenario between two remote hosts makes a direct connection from source server to the destination server. That sounds quite reasonable, except cases when servers cannot see each other. $ scp src\_server:/some\_dir/* dest\_server:/some\_another_dir Solution is to use -3 parameter, which forces copy data over local machine.
Local mail delivery in Rails
You propably hear about delivery_method in ActionMailer. Common value is either :smtp or :sendmail. SMTP is good customizable. It uses localhost mail server by default, but it can be configured to use external server with some authorization (gmail mail servers, etc.). Disadvantage could be higher error-raise propability and low performance. Sendmail delivery method looks less usable, but it can be very good combined with well configured local mail server. Local mail delivery is: