[pfx] Can one override use of myorigin for an unqualified recipient?

2023-07-13 Thread Chris Green via Postfix-users
On the Postfix Basic Configuration page it says:-

For the sake of consistency between sender and recipient addresses,
myorigin also specifies the domain name that is appended to an
unqualified recipient address.

Is there any way to override this, i.e. can one explicitly set the
domain that is appended to an unqualified recipient address to some
value other than myorigin?

I have a number of 'send only' systems running Postfix and I want mail
sent to 'chris' to be sent to my home server not to user chris on the
sending system. However I need myorigin set to the name of the sending
machine so that I can see where the (error) message came from.

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


[pfx] Re: Can one override use of myorigin for an unqualified recipient?

2023-07-13 Thread Noel Jones via Postfix-users

On 7/13/2023 3:53 PM, Chris Green via Postfix-users wrote:

On the Postfix Basic Configuration page it says:-

 For the sake of consistency between sender and recipient addresses,
 myorigin also specifies the domain name that is appended to an
 unqualified recipient address.

Is there any way to override this, i.e. can one explicitly set the
domain that is appended to an unqualified recipient address to some
value other than myorigin?

I have a number of 'send only' systems running Postfix and I want mail
sent to 'chris' to be sent to my home server not to user chris on the
sending system. However I need myorigin set to the name of the sending
machine so that I can see where the (error) message came from.




Use a virtual_alias_maps entry on the sending system to redirect 
mail to where you want it. This won't affect the sending address, so 
you can still see where it came from.


chris@localhost  user@somewhere


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


[pfx] IP/CIDR based exception in smtpd_sender_restrictions?

2023-07-13 Thread Aban Dokht via Postfix-users

Hello list,


I use the following smtpd_sender_restrictions to enforce TLS:



smtpd_sender_restrictions = permit_mynetworks, check_sender_access 
hash:/etc/postfix/tls-exceptions reject_plaintext_session

The check_sender_access is used, to "whitelist" some domains.

So far, everything is working as excepted.


Now I also need to whitelist some IP-adresses

As per

https://www.postfix.org/postconf.5.html#smtpd_sender_restrictions

check_sender_access type:table

only "MAIL FROM address, domain, parent domains, or localpart@," can be used 
but not an IP address.

As a workaround a add them to $mynetworks, to bypass the 
reject_plaintext_session restriction.
But I do not want to allow relaying to the whitelisted addresses.


Any hints how smtpd_sender_restrictions can be overridden with an IP based  
hash or cidr table?




Regards
Aban

--
 Aban Dokht   aban.do...@abando.de
--
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: IP/CIDR based exception in smtpd_sender_restrictions?

2023-07-13 Thread Peter via Postfix-users

On 14/07/23 16:26, Aban Dokht via Postfix-users wrote:

https://www.postfix.org/postconf.5.html#smtpd_sender_restrictions

check_sender_access type:table


...

Any hints how smtpd_sender_restrictions can be overridden with an IP 
based  hash or cidr table?


/etc/postfix/sender_override.cidr:
1.2.3.0/24 OK
5.6.7.128/25 OK

main.cf:
smtpd_sender_restrictions =
  check_client_access cidr:/etc/postfix/sender_override.cidr
  check_sender_access type:table


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