Postfix: Forward all outgoing emails to one email address on Centos / Redhat

Assuming the system is Centos / Redhat system.


Step 1: 

Create virtual file lets say “all_email_forwarder”  for email forwarding inside /etc/postfix/

vi /etc/postfix/all_email_forwarder

To forward all outgoing emais, lets say ””, please do the following:


Step 2:

Edit /etc/postfix/ file and add /edit virtual_maps variable with the following:

virtual_maps = regexp:/etc/postfix/all_email_forwarder

Step 3:

restart postfix service:

service postfix restart

Merge (squash) multiple git commits into one


How to combine multiple git commits as one commit?


Step 1:


git rebase -i HEAD~n # n is the number of commits you want to merge.

-i means interactive.

Step 2: You will see interactive git screen:

pick fda59df commit 1
pick x536897 commit 2
pick c01a668 commit 3
# Rebase 49687a0..d426a8a onto 49687a0

# # Commands:
# p, pick = use commit 
# r, reword = use commit, but edit the commit message 
# e, edit = use commit, but stop for amending 
# s, squash = use commit, but meld into previous commit 
# f, fixup = like "squash", but discard this commit's log message 
# x, exec = run command (the rest of the line) using shell 

# # If you remove a line here THAT COMMIT WILL BE LOST. # However, if you remove everything, the rebase will be aborted. #


Step 3: 

To merge all commit to one we can edit above content as  following, we can also reorder commits by moving them around:

squash c01a668 commit 3
pick fda59df commit 1
squash x536897 commit 2

Don’t need to work on each commit as they will be ignored. After saving the squash settings, your editor will open once more to ask for a commit message for the squashed commit.


You can cancel rebase any time by:

git rebase --abort