All posts by Don Matteo

lebt in der Schweiz, ist System Engineer MCP bei A-Enterprise GmbH. Mitglied des UNBLOG Knowledge Network. Author und Blogger zu den Themen, Tutorials für Linux und Open Source.

Forward Postfix alias to dev-null

Postfix Virtual Alias do-not-reply Forwarding to /dev/null

Where “Do-Not-Reply” type e-mail addresses are in use, the mailbox should be cleaned regularly, but perhaps the mailbox should not exist. Here is a simply way for incoming e-mails to use postfix virtual alias with forwarding to null device.

The usual solution is by forwarding to /dev/null. In a local setup, this can be done in /etc/aliases.

do-not-reply: /dev/null

However, when virtual postfix domains are used, it becomes a bit more expensive. For virtual domain users, e-mail cannot be forwarded to a file. It must go to a user or an email address, for which an alias user is added in /etc/aliases.

devnull: /dev/null

After that, the new alias will be add to the aliases.db.

$ newaliases

The alias points to a Virtual Domain Alias in /etc/postfix/virtual.

do-not-reply@foo.com devnull

Note: by default, the Sendmail aliases located under /etc, for Postfix aliases is often copied under /etc/postfix, to make sure what is defined in /etc/postfix/main.cf is at alias_maps.

alias_maps = hash:/etc/aliases
or
alias_maps = hash:/etc/postfix/aliases

After that run postmap.

$ postmap /etc/postfix/virtual

and reload Postfix to activate the changes.

$ postfix reload

How do you know if the change works!

The following command can be used to verify that the alias has been set up correctly.

$ postmap -q do-not-reply@foo.com /etc/postfix/virtual

The following output should be made.

devnull

more related in this post and here

Disable VIM copy paste Insert Visual Mode

VIM Visual Mode (insert) VISUAL Disable when inserting with right-click

Vi Improved is the universal tool for many admins and developers in the Unix world in their daily tasks. The powerful editor with regular expressions, especially established in Unix operating systems, can count on so many followers.

Vim also learns the porting for Windows, which is probably more interesting for those who move in the parallel universe, Linux and Windows. For beginners, however, the entry of the uncommon editor means greater hurdles in familiarization. But also Vim professionals facing new features, because Vim is also constantly being further developed, so there is the compatibility mode and, for some time, the visual block mode, which is enabled with CTRL-V.

Disable VIM Visual Block Mode when inserting with mouse right-click
Figure: Vim Visual Block Mode (Ctrl+V) when inserting with mouse right-click.

The symptom is that the Vim blockwise visual mode Ctrl+V collides when inserting using right-click with the mouse or a trackpad.

A personal .vimrc can enable the compatibility to the classic vi, also the mouse control can by disabled. If you would insert with right-click then use the option set mouse-=a.

$ echo "set compatible" > ~/.vimrc
$ echo "set mouse-=a" >> ~/.vimrc

NOTE: that ~/.vimrc Vim automatically enables nocompatible mode as soon as a personal initialization file is available.

debian.vim sets nocompatible. Setting compatible changes numerous options, so any other options should be set AFTER setting compatible.

The — VISUAL BLOCK — mode differs from the normal VISUAL mode in which after completing the command you automatically return to the normal insert mode. When editing you go with CTRL-V in the VISUAL BLOCK mode.

To insert the previously yanked (y) or deleted (d) text in Visual Block mode, enter (p) for insert in normal mode.

The Vim Compatibility Mode

Compatible mode means vi compatibility with the old vi with :set compatible,which disables all improvements and innovations of Vi Improved. This is not recommended, but some systems (mainly for backward compatibility with old Unix systems) offer the vi command implemented with Vim in compatible mode.

Reference:
Vim Visual Mode Rerference Manual – Vim Version 7.3