[ 
https://issues.apache.org/jira/browse/JAMES-4242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18143945#comment-18143945
 ] 

Brian Banerjee edited comment on JAMES-4242 at 11/12/26, 6:25 PM:
------------------------------------------------------------------

{quote}Generally I'd expect to be able to hit Reply and that it hit the guy 
sending the mail...
{quote}
This is 100% true in my intended usecase. The application sends transactional 
emails after the user requests it. These applications usually do not support 
reading replies and send as {{{}noreply@{}}}, but I would rather make the 
emails more personal and identifiable by sending on behalf of the actual user 
rather than a generic address.
{quote}We address this by opening port26 internally with verifyIdentity=false 
and auth for known apps to send email on the behalf of the user
{quote}
I am aware that this is possible, but it allows the application to send mail on 
behalf of _any_ user (or even a nonexistent user). The user controlling the 
application or an exploit in the application may be able to impersonate any 
user, including very sensitive ones like {{{}webmaster@{}}}, {{{}admin@{}}}, or 
highly privileged users' personal addresses. And this risk increases with every 
application added. I would much rather have a mechanism that supports the 
principle of least privilege approach.
{quote}I'd prefer us to document this practice rather than doing a gas 
factory...
{quote}
It is already possible to do what I am asking with matchers and mailets to 
rewrite the From header, which is a much worse approach. It is not scalable and 
requires restarting James to apply configuration changes.

It might be possible to perform this enforcement in Rspamd (by using Rspamd to 
check outgoing emails before relaying), but I think this feature should be 
implemented in James directly.


was (Author: JIRAUSER314614):
{quote}Generally I'd expect to be able to hit Reply and that it hit the guy 
sending the mail...
{quote}
This is 100% true in my intended usecase. The application sends transactional 
emails after the user requests it. These applications usually do not support 
reading replies and use {{noreply@}} addresses, but I would rather make the 
emails a bit more personal and identifiable by sending on behalf of the actual 
user rather than a generic email.
{quote}We address this by opening port26 internally with verifyIdentity=false 
and auth for known apps to send email on the behalf of the user
{quote}
I am aware that this is possible, but it allows the application to send mail on 
behalf of _any_ user (or even a nonexistent user). The user controlling the 
application or an exploit in the application may be able to impersonate any 
user, including very sensitive ones like {{{}webmaster@{}}}, {{{}admin@{}}}, or 
highly privileged users' personal addresses. And this risk increases with every 
application added. I would much rather have a mechanism that supports the 
principle of least privilege approach.
{quote}I'd prefer us to document this practice rather than doing a gas 
factory...
{quote}
It is already possible to do what I am asking with matchers and mailets to 
rewrite the From header, which is a much worse approach. It is not scalable and 
requires restarting James to apply configuration changes.

It might be possible to perform this enforcement in Rspamd (by using Rspamd to 
check outgoing emails before relaying), but I think this feature should be 
implemented in James directly.

> Add authorized From addresses without alias
> -------------------------------------------
>
>                 Key: JAMES-4242
>                 URL: https://issues.apache.org/jira/browse/JAMES-4242
>             Project: James Server
>          Issue Type: New Feature
>          Components: RRT
>            Reporter: Brian Banerjee
>            Priority: Major
>
> Currently, the only way to authorize a user to send mail with a different 
> From header is to add an alias or domain alias in the RRT. This has the 
> implication that mail sent to the alias address will be received by the user.
> I am looking for a way to authorize a user to send mail with a particular 
> From header (using the same semantics as an alias) but *not* receive/access 
> mail sent to that address.
> WebAdmin routes for this feature can be similar to the WebAdmin routes for 
> aliases.
> Disabling {{verifyIdentity}} in smtpserver.xml is not acceptable for security 
> reasons.
> h2. Usecase:
> An application or service needs to send transactional mail on behalf of an 
> existing user, but replies, bounces, and incoming mail will only be monitored 
> by the user directly. I want to have a service account that can use the 
> user's From header but cannot access any mail received by the user.
> The service account must use a different username and password from the user 
> for security (principle of least privilege, accurate audit logs) and to 
> prevent errors when the user changes their password.



--
This message was sent by Atlassian Jira
(v10.3.26#10030026)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to