[pfx] Re: mask "mail from: " for Microsoft

2023-09-14 Thread Bill Cole via Postfix-users
On 2023-09-14 at 10:08:42 UTC-0400 (Thu, 14 Sep 2023 10:08:42 -0400 
(EDT))

Wietse Venema via Postfix-users 
is rumored to have said:


That appears to be a different use case: you are not originating a
message for some recipient on the Internet, instead you appear to
be using Postfix to forward a message from the Internet to a Microsoft
email service.

For this, your best bet is to forward the message as an attachment,
instead of inline. That is, create a new email message, from your
email address, and attach the forwarded message as message/rfc822.

I do this sporadically, using the 'forward' feature of a mail reader
program. If you want to do this in some automated manner, perhaps
Bill Cole has some tooling suggestions.



Do I?

Oh, I guess I've earned that by repeatedly suggesting MIMEDefang (or its 
sibling MailMunge) for doing things in a milter that no MTA should be 
doing.


If one wished to do this, MIMEDefang could handle it and there may even 
be an example of the basic encapsulation technique in the documentation.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo and many *@billmail.scconsult.com addresses)
Not Currently Available For Hire
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: how to log forwarded email subject

2023-09-14 Thread Wietse Venema via Postfix-users
Eero Volotinen via Postfix-users:
> Hi list,
> 
> I need to log all subjects that are forwarded via my mailproxy. how to do
> this?
> 
> looks like this is not working for me?
> 
> https://www.linuxtechi.com/log-email-subject-maillog/

Then you made a mistake. Try "tail -f" instead of "tailf".

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] how to log forwarded email subject

2023-09-14 Thread Eero Volotinen via Postfix-users
Hi list,

I need to log all subjects that are forwarded via my mailproxy. how to do
this?

looks like this is not working for me?

https://www.linuxtechi.com/log-email-subject-maillog/

Eero
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: mask "mail from: " for Microsoft

2023-09-14 Thread Wietse Venema via Postfix-users
Marc Lucke via Postfix-users:
> On 15/09/2023 12:08 am, Wietse Venema via Postfix-users wrote:
> 
> > Marc Lucke via Postfix-users:
> >> re:
> >> https://techcommunity.microsoft.com/t5/exchange-team-blog/updated-requirements-for-smtp-relay-through-exchange-online/ba-p/3851357
> > That text is about relaying email: you originate a message, and use
> > Postfix to ask a Microsoft email service to deliver that message
> > to some recipient on the Internet.
> >
> > As documented at the link that you cite, Microsoft requires that
> > the SMTP client is authorized to use the MAIL FROM domain.
> >
> >> Let's say I send an email. I use:
> >>
> >>   > mail from: 
> >>
> >> and in the data (body)
> >>
> >>   > From: Professional Legit Person
> >> 
> > That appears to be a different use case: you are not originating a
> > message for some recipient on the Internet, instead you appear to
> > be using Postfix to forward a message from the Internet to a Microsoft
> > email service.
> >
> > For this, your best bet is to forward the message as an attachment,
> > instead of inline. That is, create a new email message, from your
> > email address, and attach the forwarded message as message/rfc822.
> >
> > I do this sporadically, using the 'forward' feature of a mail reader
> > program. If you want to do this in some automated manner, perhaps
> > Bill Cole has some tooling suggestions.
> >
> > Wietse
> 
> 
> Thanks Wietse.  Not my use case.  It's a simple store & forward MTA & 
> the senders will always be local & authorized - that's already taken 
> care of.

You need to prove that to a remote SMTP server (e.g., Microsoft)
with DMARC, DKIM, SPF, and so on.

> I literally would like to know how to make it so that whatever 
> the "mail from: " that was used is none of Microsoft's, or anyone 
> else's, business, & if that's possible.  But I'm also annoyed that I 
> have to.

You would have to invent time traval and go back 20 years, when
email receivers were more liberal in what MAIL FROM address they
accepted.

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: mask "mail from: " for Microsoft

2023-09-14 Thread Marc Lucke via Postfix-users

On 15/09/2023 12:08 am, Wietse Venema via Postfix-users wrote:


Marc Lucke via Postfix-users:

re:
https://techcommunity.microsoft.com/t5/exchange-team-blog/updated-requirements-for-smtp-relay-through-exchange-online/ba-p/3851357

That text is about relaying email: you originate a message, and use
Postfix to ask a Microsoft email service to deliver that message
to some recipient on the Internet.

As documented at the link that you cite, Microsoft requires that
the SMTP client is authorized to use the MAIL FROM domain.


Let's say I send an email. I use:

  > mail from: 

and in the data (body)

  > From: Professional Legit Person


That appears to be a different use case: you are not originating a
message for some recipient on the Internet, instead you appear to
be using Postfix to forward a message from the Internet to a Microsoft
email service.

For this, your best bet is to forward the message as an attachment,
instead of inline. That is, create a new email message, from your
email address, and attach the forwarded message as message/rfc822.

I do this sporadically, using the 'forward' feature of a mail reader
program. If you want to do this in some automated manner, perhaps
Bill Cole has some tooling suggestions.

Wietse



Thanks Wietse.  Not my use case.  It's a simple store & forward MTA & 
the senders will always be local & authorized - that's already taken 
care of.  I literally would like to know how to make it so that whatever 
the "mail from: " that was used is none of Microsoft's, or anyone 
else's, business, & if that's possible.  But I'm also annoyed that I 
have to.


___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: mask "mail from: " for Microsoft

2023-09-14 Thread Wietse Venema via Postfix-users
Marc Lucke via Postfix-users:
> re: 
> https://techcommunity.microsoft.com/t5/exchange-team-blog/updated-requirements-for-smtp-relay-through-exchange-online/ba-p/3851357
>  

That text is about relaying email: you originate a message, and use
Postfix to ask a Microsoft email service to deliver that message
to some recipient on the Internet.

As documented at the link that you cite, Microsoft requires that
the SMTP client is authorized to use the MAIL FROM domain.

> Let's say I send an email. I use:
> 
>  > mail from: 
> 
> and in the data (body)
> 
>  > From: Professional Legit Person 
> 

That appears to be a different use case: you are not originating a
message for some recipient on the Internet, instead you appear to
be using Postfix to forward a message from the Internet to a Microsoft
email service.

For this, your best bet is to forward the message as an attachment,
instead of inline. That is, create a new email message, from your
email address, and attach the forwarded message as message/rfc822.

I do this sporadically, using the 'forward' feature of a mail reader
program. If you want to do this in some automated manner, perhaps
Bill Cole has some tooling suggestions.

Wietse
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: mask "mail from: " for Microsoft

2023-09-14 Thread Matus UHLAR - fantomas via Postfix-users

On 14.09.23 13:08, Marc Lucke via Postfix-users wrote:

re: 
https://techcommunity.microsoft.com/t5/exchange-team-blog/updated-requirements-for-smtp-relay-through-exchange-online/ba-p/3851357


Let's say I send an email.  I use:


mail from: 


and in the data (body)

From: Professional Legit Person 



Looking at headers from Microsoft, they track 2 fields: smtp.mailfrom 
and header.from


From what I can work out, they'll start to say that if smtp.mailfrom 
!= header.from (in my example, spammer.com != innocent.pizza), 
Microsoft will bounce the email - even if authenticated etc.  They 
seem very happy to spend our time, huh? (unless I have something 
wrong)


I don't think so. Many mail resenders e.g. mailing lists change envelope 
from: and keep header From:


what they are removing, is the check of correct header From: and you must 
provide correct certificate or correct envelope from: for mail to be 
accepted.


I can & do use generic sender address masking successfully. In fact, 
in the above example, in reality, "innocent.pizza" is actually the 
hostname in most cases.  generic is the wrong solution to my issue.  



Also masquerading won't work, because I can't guarantee who the "mail 
from: " that postfix includes will be.


I don't agree with Microsoft's action here, & think many use cases 
would be broken if everyone did this, such as my forward from yahoo, & 
maybe mailing lists.


My question is this:  is there a way to hide the "mail from: " value 


No. The envelope (mail from:) sender is used in SMTP protocol and most of 
postfix checks.


from Microsoft & instead use the generic mapped sender instead?  In my 
example, Microsoft would only ever see "innocent.pizza" and never 
"spammer.com" as if I'd originally done this instead, when I did not:



mail from: 


Why do you accept mail from incorrect (spammer) envelope domain?
Why not fix this problem in the right place (sender)?

--
Matus UHLAR - fantomas, uh...@fantomas.sk ; http://www.fantomas.sk/
Warning: I wish NOT to receive e-mail advertising to this address.
Varovanie: na tuto adresu chcem NEDOSTAVAT akukolvek reklamnu postu.
Atheism is a non-prophet organization.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org