Gravar-mail: Modeling and analysis of network resilience : the security perspective