Posts

Showing posts from December, 2018

Running debug SMTP server with python

Python has builtin module for creating smtp server since version 2.x, sometime for me it's very useful when i just want to run lightweight smtp instance without need to run the actual one such as postfix (in zimbra distribution). the purpose of it may vary but i often used for debugging mail sending between smtp server.

It's very easy to use it, no code need just execute following command.

$ python -m smtpd -d -n -c DebuggingServer 0.0.0.0:10025
Explanation:
-m : run inline command from specific module.-d : print out all smtp message in wire.-n : the daemon will run as nobody. -c : smtpd class that will be used, if you not specified it then it will use PureProxy (transfer received smtp message to another smtp instance)0.0.0.0:25 specified in which IP and port where it will listen.
Further more you can see more detail by from it's help message
$ python -m smtpd --help

Disable sending telemetry data in DotNet

Recently i am working with an open source application which built using DotNet (C#), but while i watching some data flow outside using command netstat the DotNet is make connection outside, then when i figure it out it's belong to azure's in singapore.

Then i do some search in google then what i'm found is DotNet is sending telemetry data then for disable it by set an environment variable

export DOTNET_CLI_TELEMETRY_OPTOUT=1

For set permanently you may add it in /etc/profile, After that it disable sending telemetry data.