Null sender rewrite from a specified host.

2021-07-06 Thread Xavier Beaudouin
Hello there,

I ran into a specific situation.
I currently have an appliance that misuse the null sender (mail from:<>) to 
send mail.
Unfortunatly, this appliance is closed source and we can only setup : fixed ip 
address and recipient address on GUI (nothing else, even if I try to h4x0r the 
configuration file).
Is there any good advice I can have to make the internal relay server which is 
postfix based to rewrite the null sender to something cleaner... but ONLY for 
the device that use postfix as internal relay server ?

I know the null sender should not be changed but the appliance is brain 
damaged... :(

Kind regards,
Xavier


Re: Null sender rewrite from a specified host.

2021-07-06 Thread Viktor Dukhovni
On Tue, Jul 06, 2021 at 12:56:50PM +0200, Xavier Beaudouin wrote:

> I currently have an appliance that misuse the null sender (mail
> from:<>) to send mail.
>
> Unfortunatly, this appliance is closed source
> and we can only setup : fixed ip address and recipient address on GUI
> (nothing else, even if I try to h4x0r the configuration file).
>
> Is there any good advice I can have to make the internal relay server
> which is postfix based to rewrite the null sender to something
> cleaner... but ONLY for the device that use postfix as internal relay
> server?

This requires a content filter or milter, that replaces the envelope
sender address for messages from the client IP address in question.

There is no built-in feature that performs sender address rewrites
conditional on the client IP address.

The milter should be easy to implement.

-- 
Viktor.


Re: SPF still fails; Was: Echange virtual and local domain

2021-07-06 Thread Robert L Mathews
On 7/4/21 5:37 AM, Markus Grunwald wrote:

> And the error:
> 
> SPF Alignment: Domain not found in SPF
> 

I think you're perhaps just misunderstanding what an "SPF Alignment"
error is (according to MXToolbox). If you view this page:

 https://mxtoolbox.com/problem/spf/spf-alignment?page=prob_spf

You will see:

"Successful alignment happens when the “Mail-From” address and the
“From” address domains are identical."

That's all they mean. And in your sample message, they aren't identical:

Return-Path: 
From: Markus Grunwald 

-- 
Robert L Mathews, Tiger Technologies