I had a problem after a reboot of an AWS EC2 instance, because the server changed the hostname after reboot. Because we send millions of e-mails each hour, a lot of e-mail with sender like ‘person@ip-10-20-30-40.localdomain’ was “bounced”.
The first thing I had to do was change the hostname to correct the problem cause (solution found here). I’m using Red Hat 7 on AWS EC2 (RHEL7):
Then I need to correct the hostname of bounced messages. Unfourtunally, change the messadges using SED doesn’t work. If you try to do this, the messasges will be moved to the “corrupt” folder. So, the sollution is do a “remap” of all senders (solution found here):
Some instructions to deal with “bounced” messages on Postfix (found here and here):
Remember to read the log, on /var/log/maillog. So, a great tip is “tail -f /var/log/maillog” when you need to understand the errors and try the actions above.
Nice tool to customize Grub2 setting, such as sequence, add or remove options, etc: Grub Customizer.
Just use the split command:
split --bytes=1G large_file_name short_dir/short_file_prefix_
This will create a lot of files with 1 G in short_dir. The files will named short_file_prefix_aa, short_file_prefix_ab, short_file_prefix_ac …
Found in Techie Corner.
Find files and save a text file named “script.sh”:
find . | xargs grep -l "text string here" | awk '{print "rm "$1}' > script.sh
Then chmod +x the file and run. Solution found in Stack Overflow.