Google recently implemented additional SPAM filtering mechanisms whereby they will check whether a message conforms to the IETF RFC 2822 specification (the spec defines the ‘email message standard’). The IETF specification can be viewed here ->
When writing your Perl scripts you might get something back like the following when trying to send a mail to a GMAIL address:
The following message to <someemailaddress @gmail.com> was undeliverable. The reason for the problem: 5.3.0 - Other mail system problem 550-'5.7.1 [126.96.36.199 11] Our system has detected that this message is\n5.7.1 not RFC 2822 compliant. To reduce the amount of spam sent to Gmail,\n5.7.1 this message has been blocked. Please review\n5.7.1 RFC 2822 specifications for more information. bc3si6864125wjc.158 - gsmtp' </someemailaddress>
The fix is relatively simple (if it is in fact your problem): specify as many fields as possible when building your message object. Fields like from and subject were considered ‘optional’ in the past (older, pre RFC 2822, spec) but that is no longer true. Even a mail client like Thunderbird or Outlook fills in values (albeit sometimes blank) to make your email go through properly and not be cast out via SPAM filtering
If you need to create a list of IP addresses in VIM (for a /24 mask), you can use the following keystrokes. You could obviously use excel or something else, but this is useful when working on a text based environment, like a console, and you need some lists to play with, perhaps for a script.
I tried using SOAP::Lite with Perl recently and kept getting the following error on my server when trying to execute my Perl script:
email@example.com:~/dev/scripts$ ./soap.pl Can't locate Class/Inspector.pm in @INC (@INC contains: /etc/perl /usr/local/lib/perl/5.10.1 /usr/local/share/perl/ hare/perl/5.10.1/SOAP/Lite.pm line 435. BEGIN failed--compilation aborted at /usr/local/share/perl/5.10.1/SOAP/Lite.pm line 435. Compilation failed in require at ./soap.pl line 3. BEGIN failed--compilation aborted at ./soap.pl line 3.
The solution was quite simple, although finding it on the internet was not as simple.
Just do the following to install the required class:
sudo apt-get install libclass-inspector-perl
Voila, it’s working as expected.
If you are using RHEL or CentOS, you could do the following (I did not test this but found it at this link :
yum install 'perl(Class::Inspector)'
Hope this helps someone out there!
Bash is the default scripting language in most Linux systems. Its usage ranges from an interactive command interpreter to a scripting language for writing complex programs. Debugging facilities are a standard feature of compilers and interpreters, and bash is no different in this regard. In this article, I will explain various techniques and tips for debugging Bash scripts.