encoding issue with header_checks Windows-1252

2019-07-18 Thread Stefan Bauer
Hi,

header_checks = regexp:/etc/postfix/headerstring
/^Subject: .*\[cleartext\].*/ FILTER cleartext:

And now, there is the following mail-Subject, that did not trigger the
above FILTER and i dont see why:

Subject:
=?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=

Any ideas?

Stefan


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Matus UHLAR - fantomas

On 18.07.19 13:35, Stefan Bauer wrote:

header_checks = regexp:/etc/postfix/headerstring
/^Subject: .*\[cleartext\].*/ FILTER cleartext:

And now, there is the following mail-Subject, that did not trigger the
above FILTER and i dont see why:

Subject:
=?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=



"cleartext" vs. "Cleartext" looks like case sensitivity problem.
--
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.
I intend to live forever - so far so good.


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Stefan Bauer
man 5 header_checks

By default, regexp : and
   pcre : patterns are
case *insensitive*.


Am Do., 18. Juli 2019 um 13:40 Uhr schrieb Matus UHLAR - fantomas <
uh...@fantomas.sk>:

> On 18.07.19 13:35, Stefan Bauer wrote:
> >header_checks = regexp:/etc/postfix/headerstring
> >/^Subject: .*\[cleartext\].*/ FILTER cleartext:
> >
> >And now, there is the following mail-Subject, that did not trigger the
> >above FILTER and i dont see why:
> >
> >Subject:
>
> >=?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=
>
>
> "cleartext" vs. "Cleartext" looks like case sensitivity problem.
> --
> 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.
> I intend to live forever - so far so good.
>


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread pasvon
What does the complete file /etc/postfix/headerstring look like?
Does another line match a filter action and override the desired result?
Have you defined any other header_checks (body for example)?

That should be enough, too:
/^Subject: .*\[cleartext\]/ FILTER cleartext:



--
Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Matus UHLAR - fantomas

On 18.07.19 13:42, Stefan Bauer wrote:

man 5 header_checks

By default, regexp : and
  pcre : patterns are
case *insensitive*.


sorry, misread. Should be more careful.. 


Am Do., 18. Juli 2019 um 13:40 Uhr schrieb Matus UHLAR - fantomas <
uh...@fantomas.sk>:


On 18.07.19 13:35, Stefan Bauer wrote:
>header_checks = regexp:/etc/postfix/headerstring
>/^Subject: .*\[cleartext\].*/ FILTER cleartext:
>
>And now, there is the following mail-Subject, that did not trigger the
>above FILTER and i dont see why:
>
>Subject:

>=?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=


"cleartext" vs. "Cleartext" looks like case sensitivity problem.


--
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.
Remember half the people you know are below average.


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Stefan Bauer
only this single filter is present - no other filters.

Unfortunately thats not enough to trigger the filter.

Am Do., 18. Juli 2019 um 14:00 Uhr schrieb pasvon :

> What does the complete file /etc/postfix/headerstring look like?
> Does another line match a filter action and override the desired result?
> Have you defined any other header_checks (body for example)?
>
> That should be enough, too:
> /^Subject: .*\[cleartext\]/ FILTER cleartext:
>
>
>
> --
> Sent from: http://postfix.1071664.n5.nabble.com/Postfix-Users-f2.html
>


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Wietse Venema
Stefan Bauer:
> Hi,
> 
> header_checks = regexp:/etc/postfix/headerstring
> /^Subject: .*\[cleartext\].*/ FILTER cleartext:
> 
> And now, there is the following mail-Subject, that did not trigger the
> above FILTER and i dont see why:
> 
> Subject:
> =?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=
> 

Postfix does not decode headers.

To test:

echo "Subject: =?Windows-1252?Q?[Cleartext..." |postmap -q - 
regexp:/etc/postfix/headerstring

Wietse


myorigin

2019-07-18 Thread Tobias Köck

Hi,

I have setup

myorigin=mydomain.de

but if I send an email with MUTT emai client or with 'echo "test" | 
mail' s...@email.de I get as email source


usern...@mail.mydomain.de (the name of the mailserver).

For testing I have added the mydomain.de to the mydestination and the mx 
entry is set up right.


I am wondering why the source email adresse is still not 
'usern...@mydomain.de' but instead 'usern...@mail.mydomain.de'?


Greetings
Tobias


Re: myorigin

2019-07-18 Thread Wietse Venema
Tobias K?ck:
> Hi,
> 
> I have setup
> 
> myorigin=mydomain.de
> 
> but if I send an email with MUTT emai client or with 'echo "test" | 
> mail' s...@email.de I get as email source
> 
> usern...@mail.mydomain.de (the name of the mailserver).

What is the output from:

$ postconf myorigin

If that is really mydomain.de, then mutt is giving Postfix
the wrong sender address, and you need to configure mutt.

Wietse


Re: myorigin

2019-07-18 Thread Tobias Köck

Hi>  $ postconf myorigin


If that is really mydomain.de, then mutt is giving Postfix
the wrong sender address, and you need to configure mutt.
Yes it's really mydomain.de. I was testing the mail command additioinaly 
of mutt to verify.


Is there another internal testing possiblity to send an internal mail 
from Postfix to verify the myorigin setting?


Greetings
Tobias


Re: encoding issue with header_checks Windows-1252

2019-07-18 Thread Stefan Bauer
I dont get it. Testing the above correctly shows

Subject:
=?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=
FILTER cleartext:

But the e-mail itself was not passed to the FILTER cleartext. Above subject
was extracted from mail client. I believe, there is something going wrong
with encoding.

Am Do., 18. Juli 2019 um 16:27 Uhr schrieb Wietse Venema <
wie...@porcupine.org>:

> Stefan Bauer:
> > Hi,
> >
> > header_checks = regexp:/etc/postfix/headerstring
> > /^Subject: .*\[cleartext\].*/ FILTER cleartext:
> >
> > And now, there is the following mail-Subject, that did not trigger the
> > above FILTER and i dont see why:
> >
> > Subject:
> >
> =?Windows-1252?Q?[Cleartext]_Webinar_=84Noch_keine_55_und_ab_in_die_GKV=93?=
> >
>
> Postfix does not decode headers.
>
> To test:
>
> echo "Subject: =?Windows-1252?Q?[Cleartext..." |postmap -q -
> regexp:/etc/postfix/headerstring
>
> Wietse
>


Re: myorigin

2019-07-18 Thread Tobias Köck

I found the reason why

Debian uses a file named /etc/mailname

https://wiki.debian.org/EtcMailName

If this file is set with another name it seems to be the case that 
Postfix uses this file even if I have explicitely overwritten the


myorigin

with another value.

I'm still a little bit confused how that works out but that seems to be 
the case.


Greetings
Tobias

On 7/18/19 5:12 PM, Wietse Venema wrote:

Tobias K?ck:

Hi,

I have setup

myorigin=mydomain.de

but if I send an email with MUTT emai client or with 'echo "test" |
mail' s...@email.de I get as email source

usern...@mail.mydomain.de (the name of the mailserver).


What is the output from:

$ postconf myorigin

If that is really mydomain.de, then mutt is giving Postfix
the wrong sender address, and you need to configure mutt.

Wietse



Re: myorigin

2019-07-18 Thread Matus UHLAR - fantomas

On 18.07.19 18:44, Tobias Köck wrote:

I found the reason why

Debian uses a file named /etc/mailname

https://wiki.debian.org/EtcMailName

If this file is set with another name it seems to be the case that 
Postfix uses this file even if I have explicitely overwritten the


myorigin

with another value.

I'm still a little bit confused how that works out but that seems to 
be the case.


postfix appends myorigin only if the domain is not present
(and if append_at_myorigin is yes, but it's the default)

if mutt provides  domain, postfix does not add it.
if you look at logs, you may see that domain was provided by sending agent.

--
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.
I just got lost in thought. It was unfamiliar territory.


Re: myorigin

2019-07-18 Thread Tobias Köck

postfix appends myorigin only if the domain is not present
(and if append_at_myorigin is yes, but it's the default)
Interesting. I haven't seen this depencendy. Where can I find it (in the 
documentation)?





Re: myorigin

2019-07-18 Thread Ralph Seichter
* Tobias Köck:

> I am wondering why the source email adresse is still not 
> 'usern...@mydomain.de' but instead 'usern...@mail.mydomain.de'?

Postfix settings aside, Mutt can be configured to generate specific
sender addresses:

  # Your .muttrc
  set hostname=somehost.example.com
  set hidden_host=yes

According to the man page, 'hidden_host' defaults to no.

-Ralph