AW: Change default reject message

2021-02-05 Thread rudolf
Hey, oh sry, i firmly assumed that the postfix creates the message 😐 The method of mapping the quota via a service, I had not on the screen.. Thank you for that tip, my problem is solved now, thx. Mit freundlichen Grüßen Yours sincerely Pascal Rudolf -Ursprüngliche Nachricht- Von:

Re: Catch a forged Return Path

2021-02-05 Thread Matus UHLAR - fantomas
On 2021-02-04 09:08, ludic...@gmail.com wrote: new MS Azure Cloudapp Spam Wave these days. Just a few hosts, but a lot of Spam. There is a pattern there, they all use Return-Path: to disguise as a bounce and bypass any further checks. So the PCRE header check /^Return-Path: / REJECT For

LDAP map: %S doesn't preserve case

2021-02-05 Thread Benoit Branciard
Hello, When using %S in result_format in a LDAP map definition, Postfix stubbornly returns a lower-case version of input key. I would have expected input key to be returned unmodified. Is there a decent reason this has be done this way, or should it be considered as a bug ? This is for Pos

Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Rahul Dhesi
I would like to write an smtpd policy server[1] that will cause incoming mail to be rejected during smtp if a local recipient (a Linux user in my case) is exceeding his filesystem storage quota. Postfix supplies the envelope recipient but not the local recipient to the smtpd policy server. I

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Benny Pedersen
On 2021-02-05 16:22, Rahul Dhesi wrote: Looking for suggestions and ideas. dovecot dict quota (in sql) your policy server query the sql table job done https://wiki.dovecot.org/Quota/Dict you just need to use postfix virtual alias to expand to mailbox storage not just alias recipient, this

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Wietse Venema
Rahul Dhesi: > I would like to write an smtpd policy server[1] that will cause incoming > mail to be rejected during smtp if a local recipient (a Linux user in my > case) is exceeding his filesystem storage quota. > > Postfix supplies the envelope recipient but not the local recipient to the >

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Wietse Venema
Benoit Branciard: > Hello, > > When using %S in result_format in a LDAP map definition, Postfix > stubbornly returns a lower-case version of input key. > > I would have expected input key to be returned unmodified. > > Is there a decent reason this has be done this way, or should it be > consi

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Rahul Dhesi
On Fri, 5 Feb 2021, Wietse Venema wrote: Postfix is a pipeline of processes; some processes transform addresses before a message is queued (canonical_maps, virtual_alias_maps), and some transform addresses in the delivery agent (alias_maps, $HOME/.forward files). It is not practical for an SMTP

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Matus UHLAR - fantomas
On Fri, 5 Feb 2021, Wietse Venema wrote: Postfix is a pipeline of processes; some processes transform addresses before a message is queued (canonical_maps, virtual_alias_maps), and some transform addresses in the delivery agent (alias_maps, $HOME/.forward files). It is not practical for an SMTP d

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Benoit Branciard
Le 05/02/2021 à 16:53, Wietse Venema a écrit : Benoit Branciard: Hello, When using %S in result_format in a LDAP map definition, Postfix stubbornly returns a lower-case version of input key. I would have expected input key to be returned unmodified. Is there a decent reason this has be done t

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Viktor Dukhovni
On Fri, Feb 05, 2021 at 07:47:46PM +0100, Benoit Branciard wrote: > Le 05/02/2021 à 16:53, Wietse Venema a écrit : > > > > All Postfix table-driven mechanisms will case-fold the search key > > except when they use pcre, regexp, or tcp_table. > > This sounds like a acceptable choice for *matching

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Michael Ströder
On 2/5/21 8:03 PM, Viktor Dukhovni wrote: > I am not 100% sure that all LDAP lookups would necessarily > be using lookup keys with case-insensitive matching rules. This is declared in matching rules of the attribute type description found in the subschema. > For example, maps that query accounts

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Feb 05, 2021 at 07:47:46PM +0100, Benoit Branciard wrote: > > > Le 05/02/2021 ? 16:53, Wietse Venema a ?crit?: > > > > > > All Postfix table-driven mechanisms will case-fold the search key > > > except when they use pcre, regexp, or tcp_table. > > > > This sounds like

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Wietse Venema
Rahul Dhesi: > On Fri, 5 Feb 2021, Wietse Venema wrote: > > > Postfix is a pipeline of processes; some processes transform addresses > > before a message is queued (canonical_maps, virtual_alias_maps), > > and some transform addresses in the delivery agent (alias_maps, > > $HOME/.forward files). I

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Viktor Dukhovni
On Fri, Feb 05, 2021 at 02:58:09PM -0500, Wietse Venema wrote: > For quota control, it is necessary to know EXACTLY what local user(s) > will receive the email. That means EXACTLY processing canonical_maps, > virtual_alias_maps, alias_maps and $HOME/.forward. > > So how would you propose for SMTP

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Viktor Dukhovni
On Fri, Feb 05, 2021 at 02:37:18PM -0500, Wietse Venema wrote: > > The feature to conditionally suppress case folding for some LDAP maps > > has not been implemented. Care to contribute a patch? > > > > src/global/dict_ldap.c > > Should not this be controlled one level up, in the maps_finmd

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Feb 05, 2021 at 02:58:09PM -0500, Wietse Venema wrote: > > > For quota control, it is necessary to know EXACTLY what local user(s) > > will receive the email. That means EXACTLY processing canonical_maps, > > virtual_alias_maps, alias_maps and $HOME/.forward. > > > > So

Re: LDAP map: %S doesn't preserve case

2021-02-05 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Feb 05, 2021 at 02:37:18PM -0500, Wietse Venema wrote: > > > > The feature to conditionally suppress case folding for some LDAP maps > > > has not been implemented. Care to contribute a patch? > > > > > > src/global/dict_ldap.c > > > > Should not this be controlle

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Viktor Dukhovni
On Fri, Feb 05, 2021 at 04:45:10PM -0500, Wietse Venema wrote: > > If recipient address rewriting is on input (virtual alias maps rather > > than on output (as with local(8) .forward, or local aliases(5)), then > > one way is perhaps with recipient_address_verification probes and a > > transport t

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Wietse Venema
Viktor Dukhovni: > On Fri, Feb 05, 2021 at 04:45:10PM -0500, Wietse Venema wrote: > > > > If recipient address rewriting is on input (virtual alias maps rather > > > than on output (as with local(8) .forward, or local aliases(5)), then > > > one way is perhaps with recipient_address_verification p

smtp_header_checks vs header_checks: subject header length

2021-02-05 Thread Clemens Mayer
Hello Wietse & Friends, /etc/postfix/main.cf looks like this: header_checks = regexp:/etc/postfix/header_checks smtp_header_checks = regexp:/etc/postfix/header_checks /etc/postfix/header_checks looks like this: /^Subject:/ WARN Two issues: 1. I have a really long subject. -cleanup logs the whole

Re: Accessing local recipient from within an smtpd policy server: how?

2021-02-05 Thread Rahul Dhesi
Thanks for all the suggestions, esp. Wietse, Viktor, Benny, Matus. I'll investigate reject_unverified_recipient, and report back soon with what solution(s) I found. May be a week or two (or more). Rahul

Re: smtp_header_checks vs header_checks: subject header length

2021-02-05 Thread Wietse Venema
Clemens Mayer: > Hello Wietse & Friends, > > /etc/postfix/main.cf looks like this: > header_checks = regexp:/etc/postfix/header_checks > smtp_header_checks = regexp:/etc/postfix/header_checks > > /etc/postfix/header_checks looks like this: > /^Subject:/ WARN > > Two issues: > 1. I have a really