Email notify on SSH login
-
This is easily achieved with standard postfix system packages, but Cloudron obviously uses 25 so a built-in Cloudron feature for security and observation, auditing, would be great.
-
Nullmailer could be utilized for this.
https://wiki.archlinux.org/title/Nullmailerusing the Built-in SMTP server?
-
@xarp You mean at server or container level? That's a great suggestion BTW.
-
@micmc Server level.
-
@xarp Postfix comes standard with Ubuntu so I'm not sure of how couldn't be implemented or what would prevent it, have you tried something already?
-
There seems to be a quite interesting discussion on this matter, with possible solutions right here
https://askubuntu.com/questions/179889/how-do-i-set-up-an-email-alert-when-a-ssh-login-is-successful -
@micmc said in Email notify on SSH login:
@xarp Postfix comes standard with Ubuntu so I'm not sure of how couldn't be implemented or what would prevent it, have you tried something already?
@xarp said in Email notify on SSH login:
but Cloudron obviously uses 25
-
@xarp actually, Cloudron uses the inbound port 25. This does not prevent it from sending stuff.
However, it would make much more sense to integrate this with the cloudron emails, to take advantage of the specific email configuration, for example if there is a relay configured.
-
@xarp said in Email notify on SSH login:
@micmc said in Email notify on SSH login:
@xarp Postfix comes standard with Ubuntu so I'm not sure of how couldn't be implemented or what would prevent it, have you tried something already?
@xarp said in Email notify on SSH login:
but Cloudron obviously uses 25
Don't bother answering if it is for an 'answer' like this. Obviously that doesn't say if you tried something the way I meant, and it's kind of rude.
-
@mehdi said in Email notify on SSH login:
@xarp actually, Cloudron uses the inbound port 25. This does not prevent it from sending stuff.
I tried the postfix/mailutils method which uses a simple bashrc method in the user/root home, however when Cloudron rebooted, the mail service couldn't start unfortunately.