I am interested to get email notifications from my server to my Gmail account - the same notifications that the server gets in the
/var/mail/root - either by forwarding the messages, or or directly emailing the notifications there (which one is better for security?) The Gmail account is set to have two-step-authentication for security reasons.
How can I do this on a Debian Jessie?
Following @tarleb recommendations, I found Gmail's application specific login:
- Went to: https://security.google.com/settings/security/apppasswords
- Created a
- Got the password:
Now, how to use this with Debian? is exim4 still a good package to use? Is it safer/better to forward the emails to Gmail? Or better skip the internal root mail altogether?
Update I did follow the tutorial on VUTLR, but I am getting the following error:
2015-12-07 11:05:18 Exim configuration error in line 22 of /var/lib/exim4/config.autogenerated.tmp:
malformed macro definition
Invalid new configfile /var/lib/exim4/config.autogenerated.tmp, not installing /var/lib/exim4/config.autogenerated.tmp to /var/lib/exim4/config.autogenerated