NS8 Mail: authenticated users can send mail with arbitrary From-address

Hi all,

I have just tested what happens if I configure an arbitrary From-Address in a mail client and try to send the mail as authenticated user via NS8 Mail. Surprisingly, it works, which allows a user to fake E-Mails from another user on the same NS8 instance, just by changing the From address in the Mail client (e.g., this is possible in SOGo webmail by creating another identity).
It is even possible to send with a from address from a completely different domain that is not part of the NS8 Mail configuration at all.

Is there a setting to disable this behavior and allow a user to send mail only from addresses that would deliver to his personal inbox, or to valid shared inboxes?

Thank you!

There is a switch to enable sender/login match In the NS8 Mail settings / Relay, see also Mail — NS8 documentation

4 Likes

Thank you, that solves it!

1 Like

Almost: there is one exception. Since the recipient delimiter is set in postfix, the user test@example.com receives also mails for test+sometext@example.com.
However, sending from test+sometext@example.com is blocked using the setting above. It should however be possible for the user test@example.com, because he owns that mail address.

Can this be solved?

1 Like

I think it can be solved by using a custom postfix configuration, see also GitHub - NethServer/ns8-mail: NS8 Mail module with SMTP, IMAP, Spam/Virus filter