[pfx] Re: postscreen question

2023-04-26 Thread Mihaly Zachar via Postfix-users
On Wed, 26 Apr 2023 at 18:47, Wietse Venema via Postfix-users <
postfix-users@postfix.org> wrote:

> Don't do it unless you aree willing to suffer some pain. The mere
> fast that a button exists does not impy that everyone must use it.
>
>
Dear Wietse,

Could you please give me some examples where you think it will cause the
most pain ?

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


[pfx] postconf -M foo/unix='foo unix ...' get segfault if multiple entries exist in master.cf

2023-04-26 Thread SATOH Fumiyasu (TSUCHIDA Fumiyasu) via Postfix-users
I see the following problems.

1. `postconf -M bar/unix='foo unix ...'` will duplicates entries in master.cf.
2. `postconf -M foo/unix='foo unix ...' get segfault if multiple entries exist 
in master.cf.

```
# postconf mail_version
mail_version = 3.7.4
# postconf -M foo/unix='foo unix - n n - - pipe argv=/bin/false'
# tail /etc/postfix/master.cf
...
foounix  -   n   n   -   -   pipe argv=/bin/false
# postconf -M bar/unix='foo unix - n n - - pipe argv=/bin/false'
# tail /etc/postfix/master.cf
...
foounix  -   n   n   -   -   pipe argv=/bin/false
foounix  -   n   n   -   -   pipe argv=/bin/false
# postconf -M foo/unix='foo unix - n n - - pipe argv=/bin/false'
Segmentation fault
```

-- 
-- Name: SATOH Fumiyasu @ OSSTech Corp., Japan (fumiyas @ osstech co jp)
-- Business Home: https://www.OSSTech.co.jp/
-- GitHub Home: https://GitHub.com/fumiyas/
-- PGP Fingerprint: BBE1 A1C9 525A 292E 6729  CDEC ADC2 9DCA 5E1C CBCA
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: postscreen question

2023-04-26 Thread Ken Peng via Postfix-users
Using rspamd instead of postscreen?


> 
> Dear All,
> 
> I am building a new server where I would like to build the best spam filter
> possible :)
> I am checking postscreen these days. I am planning to turn on the "deep
> tests" as well, but it seems to be really scary to me :)
> 
> In the doc they say that I can have 2 IPs and set up a secondary MX record
> and usually the sender will immediately connect back from the same IP.
> 
> How good idea is it to do this ? What happens if the sender has a really
> big pool of IPs and they will not use the same IP when reconnect to the 2nd
> MX ? Theoretically it means that that sender will never be able to send
> mail to us right ?
> 
> What is the best practice here ? I am curious for your opinions.
> 
> Thanks,
> Mitya
> 
> ___
> Postfix-users mailing list -- postfix-users@postfix.org
> To unsubscribe send an email to postfix-users-le...@postfix.org
>

--
https://kenpeng.pages.dev/
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: postscreen question

2023-04-26 Thread Bill Cole via Postfix-users

On 2023-04-26 at 11:56:01 UTC-0400 (Wed, 26 Apr 2023 17:56:01 +0200)
Mihaly Zachar via Postfix-users 
is rumored to have said:


Dear All,

I am building a new server where I would like to build the best spam 
filter

possible :)
I am checking postscreen these days. I am planning to turn on the 
"deep

tests" as well, but it seems to be really scary to me :)


Don't. They are not worth it.


What is the best practice here ? I am curious for your opinions.


Only use Postscreen's before-greeting tests. The "deep" tests add very 
little marginal value.


--
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: follow-up: Re: regression: cleanup crashes if fullname contains only whitespace(s) . fixed?

2023-04-26 Thread PGNet Dev via Postfix-users

This was fixed almost 2 years ago in postfix-3.3.19, postfix-3.4.22,
postfix-3.5.12, postfix-3.6.3.


thx.

dropped from Fedora v3.0.8 pkgs:

  https://src.fedoraproject.org/rpms/postfix/blob/rawhide/f/postfix.spec#_807


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


[pfx] Re: postscreen question

2023-04-26 Thread Wietse Venema via Postfix-users
Mihaly Zachar via Postfix-users:
> Dear All,
> 
> I am building a new server where I would like to build the best spam filter
> possible :)
> I am checking postscreen these days. I am planning to turn on the "deep
> tests" as well, but it seems to be really scary to me :)

Don't do it unless you aree willing to suffer some pain. The mere
fast that a button exists does not impy that everyone must use it.

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


[pfx] Re: follow-up: Re: regression: cleanup crashes if fullname contains only whitespace(s) . fixed?

2023-04-26 Thread Wietse Venema via Postfix-users
PGNet Dev via Postfix-users:
> fedora 38/rhel pkg builds carry a few patches
> 
> i'm trying to figure out what still needs to be carried
> 
> one was reported @ distro
> 
>   Bug 1977732 - [Regression] postfix "cleanup" crashes when processing 
> messages containing a "whitespace-only" fullname
>https://bugzilla.redhat.com/show_bug.cgi?id=1977732

This was fixed almost 2 years ago in postfix-3.3.19, postfix-3.4.22,
postfix-3.5.12, postfix-3.6.3.

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


[pfx] postscreen question

2023-04-26 Thread Mihaly Zachar via Postfix-users
Dear All,

I am building a new server where I would like to build the best spam filter
possible :)
I am checking postscreen these days. I am planning to turn on the "deep
tests" as well, but it seems to be really scary to me :)

In the doc they say that I can have 2 IPs and set up a secondary MX record
and usually the sender will immediately connect back from the same IP.

How good idea is it to do this ? What happens if the sender has a really
big pool of IPs and they will not use the same IP when reconnect to the 2nd
MX ? Theoretically it means that that sender will never be able to send
mail to us right ?

What is the best practice here ? I am curious for your opinions.

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


[pfx] follow-up: Re: regression: cleanup crashes if fullname contains only whitespace(s) . fixed?

2023-04-26 Thread PGNet Dev via Postfix-users

fedora 38/rhel pkg builds carry a few patches

i'm trying to figure out what still needs to be carried

one was reported @ distro

Bug 1977732 - [Regression] postfix "cleanup" crashes when processing messages 
containing a "whitespace-only" fullname
 https://bugzilla.redhat.com/show_bug.cgi?id=1977732

then sent to list here, and ACK'd

https://marc.info/?l=postfix-users&m=162531677406087&w=2

List:   postfix-users
Subject:Re: regression: cleanup crashes if fullname 
contains only whitespace(s)
From:   Wietse Venema 
Date:   2021-07-03 12:52:19
Message-ID: 4GHBg75XKrzJrNy () spike ! porcupine ! org

checking src @


https://github.com/vdukhovni/postfix/blob/master/postfix/src/cleanup/cleanup_message.c#L773

the provided workaround patch

https://bugzilla-attachments.redhat.com/attachment.cgi?id=1797493

wasn't adopted as-is.  checking logs/HISTORY, not clear to me that it was dealt 
with.

*WAS* is fixed otherwise ?
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: Subject modification based on recipient

2023-04-26 Thread Wietse Venema via Postfix-users
Wietse Venema via Postfix-users:
> Andreas Cieslak via Postfix-users:
> > Hi list,
> > 
> > i want to achieve that my postfix relay will modify the subject based on
> > the recipients.
> > The postfiy relay is receiving email from other internal systems and
> > forwards all mail to a mail group (testgroup) on another internal mail
> > system.
> 
> Suggestion: use milter-regex. You can install it from source code,
> or install as a package for many distributions.

Unfortunately, it looks like milter-regex is good for rejecting
mail, not for message modification.

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


[pfx] Re: Subject modification based on recipient

2023-04-26 Thread Wietse Venema via Postfix-users
Andreas Cieslak via Postfix-users:
> Hi list,
> 
> i want to achieve that my postfix relay will modify the subject based on
> the recipients.
> The postfiy relay is receiving email from other internal systems and
> forwards all mail to a mail group (testgroup) on another internal mail
> system.

Suggestion: use milter-regex. You can install it from source code,
or install as a package for many distributions.

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


[pfx] Re: Subject modification based on recipient

2023-04-26 Thread Bill Cole via Postfix-users

On 2023-04-26 at 10:07:09 UTC-0400 (Wed, 26 Apr 2023 16:07:09 +0200)
Andreas Cieslak via Postfix-users 
is rumored to have said:


Hi list,

i want to achieve that my postfix relay will modify the subject based 
on

the recipients.
The postfiy relay is receiving email from other internal systems and
forwards all mail to a mail group (testgroup) on another internal mail
system.

I have already configured the following in the header_checks file
if !/^To: email@company$/
/^Subject: (.+)$/i REPLACE Subject: [email@company] $1
endif
For this one case it works fine.

Now i want to modify the subject for more emails in the header_checks 
like

if !/^To: email@company$/
/^Subject: (.+)$/i REPLACE Subject: [email@company] $1
endif
if !/^To: email@company2$/
/^Subject: (.+)$/i REPLACE Subject: [email@company2] $1
endif

I have read that there is a header_checks limitation for the first 
line

check, so my example does not work.


Correct. The header_checks facility checks exactly one header at a time, 
so there is NO WAY to make the above logic work using header_checks. 
When header_checks is examining the To header, it is ONLY able to 
operate on the To header. The 'if/endif' structure is primarily useful 
to make sure some rules are only ever applied to specific headers and 
skipped for others.



Does anybody know if its possible with regex within header_checks?
Or is there another possibility to solve this?


You would need to use a milter or a content_filter for this. For 
example, MIMEDefang (or its descendant MailMunge) could do this in a 
filter_end() subroutine.



--
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] Subject modification based on recipient

2023-04-26 Thread Andreas Cieslak via Postfix-users
Hi list,

i want to achieve that my postfix relay will modify the subject based on
the recipients.
The postfiy relay is receiving email from other internal systems and
forwards all mail to a mail group (testgroup) on another internal mail
system.

I have already configured the following in the header_checks file
if !/^To: email@company$/
/^Subject: (.+)$/i REPLACE Subject: [email@company] $1
endif
For this one case it works fine.

Now i want to modify the subject for more emails in the header_checks like
if !/^To: email@company$/
/^Subject: (.+)$/i REPLACE Subject: [email@company] $1
endif
if !/^To: email@company2$/
/^Subject: (.+)$/i REPLACE Subject: [email@company2] $1
endif

I have read that there is a header_checks limitation for the first line
check, so my example does not work.
Does anybody know if its possible with regex within header_checks?
Or is there another possibility to solve this?

Any hints would be appreciated.

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


[pfx] Re: qmgr tuning

2023-04-26 Thread Wietse Venema via Postfix-users
Gino Ferguson via Postfix-users:
> Hi,
> 
> 
> 
> I'm wondering why is the qmgr process count set to 1 by default in master.cf

Because there MUST be only one scheduler.

> Does it make any sense to increase this number to 2 or 5 or 10?
> There are a couple of million emails are going through our servers
> per day and there is a plenty of free CPU and RAM which could be
> used.

If you want to use more resourcs for email delivery, use more
*delivery agent* proesses. Howevever, millions/day is nothing
to worry about, even a Raspberri Pi could do that.

> Also I'm wondering if it would help to speed up the delivery of
> the new emails if there are higher number of delayed, older mails
> in the queue.

That's how it already works. See maximal_backoff_time
and minimal_backoff_time.

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


[pfx] qmgr tuning

2023-04-26 Thread Gino Ferguson via Postfix-users
Hi,



I'm wondering why is the qmgr process count set to 1 by default in master.cf

Does it make any sense to increase this number to 2 or 5 or 10? There are a 
couple of million emails are going through our servers per day and there is a 
plenty of free CPU and RAM which could be used.

Also I'm wondering if it would help to speed up the delivery of the new emails 
if there are higher number of delayed, older mails in the queue.

Cheers,
G.

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


[pfx] Re: postfix mail server qmgr log entry query

2023-04-26 Thread Matus UHLAR - fantomas via Postfix-users

On 26.04.23 05:48, Jitendra Chaudhari via Postfix-users wrote:

The strange thing that is observed in the log is no-reply=19=tjsb@xxx.co.in

The user email id at the email server is tjsb@xxx.co.in  so my worry is 
what is the " no-reply=19=" string getting appended before the user email 
id "tjsb@xxx.co.in"


i think it's a thing called VERP:
https://en.wikipedia.org/wiki/Variable_envelope_return_path


Is this a postfix qmgr process that is adding this string?
And I can see many such entries in /var/maillog particularly for postfix/qmgr process 
with the random number getting appended as "no-reply=XX="user email address


I don't think so. It's probably icewarp adding this.


--
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.
REALITY.SYS corrupted. Press any key to reboot Universe.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org