[pfx] Re: SPF hostname and domainname

2024-06-20 Thread Peter via Postfix-users

On 21/06/24 07:13, Wietse Venema via Postfix-users wrote:

Bounces are sent with the null envelope.from address which has no
domain. Therefore, SPF applies policy to a surrogate: the hostname
in the SMTP client's HELO/EHLO command (as if the envelope.from
address was postmaster@helo-argument).

This helo-argument is by default the value of the Postfix myhostname
parameter, which depending on myorigin setting may appear in the
header.from address mailer-daemon@whatever.

DMARC wants that the dmain in envelope.from address (or its surrogate
in the case of <>) in some way align with the domain in the header.from
address (in this case mailer-daemon@whatever).

If someone can come up with a simple checklist for how to do this
then that would be great.


SPF/DKIM/DMARC Checklist for (IMO) the best chance of getting your mail 
to be accepted:


1.  HELO banner should pass SPF.

2.  Envelope Sender should pass SPF.

3.  Envelope Sender domain should align with the From: header domain.

4.  Message should be DKIM signed.

5.  Domain for the DKIM signature should align with the From: header domain.

Not all of the able are necessary (e.g. you can get away with SPF 
alignment only or DKIM alignment only) but the more of those boxes that 
you can successfully tick off the better chance you have for you message 
to be accepted when things go wrong, or when a destination doesn't 
implement one of the above checks properly.



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


[pfx] Re: question for a directive in master.cf

2024-06-20 Thread Viktor Dukhovni via Postfix-users
On Fri, Jun 21, 2024 at 07:54:40AM +0800, Jeff Peng via Postfix-users wrote:
> Hello
> 
> for these options for submission in master.cf:
> 
> submission inet n   -   y   -   -   smtpd
> #  -o syslog_name=postfix/submission
> #  -o smtpd_tls_security_level=encrypt
>   -o smtpd_sasl_auth_enable=yes
> #  -o smtpd_tls_auth_only=yes
> #  -o smtpd_reject_unlisted_recipient=no
> #  -o smtpd_client_restrictions=$mua_client_restrictions
> #  -o smtpd_helo_restrictions=$mua_helo_restrictions
> #  -o smtpd_sender_restrictions=$mua_sender_restrictions
> #  -o smtpd_recipient_restrictions=
> #  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
> #  -o milter_macro_daemon_name=ORIGINATING
> 
> Since "-o smtpd_sasl_auth_enable=yes" specify smtpd_sasl_auth_enable default
> enabled. Why I have to uncomment it out to make it become alive?

The default value is "no", as expected.

$ postconf -d smtpd_sasl_auth_enable
smtpd_sasl_auth_enable = no

Best practice is to enable SASL auth only on the submission ports and
NOT on port 25.

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


[pfx] question for a directive in master.cf

2024-06-20 Thread Jeff Peng via Postfix-users

Hello

for these options for submission in master.cf:

submission inet n   -   y   -   -   smtpd
#  -o syslog_name=postfix/submission
#  -o smtpd_tls_security_level=encrypt
  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_tls_auth_only=yes
#  -o smtpd_reject_unlisted_recipient=no
#  -o smtpd_client_restrictions=$mua_client_restrictions
#  -o smtpd_helo_restrictions=$mua_helo_restrictions
#  -o smtpd_sender_restrictions=$mua_sender_restrictions
#  -o smtpd_recipient_restrictions=
#  -o smtpd_relay_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING

Since "-o smtpd_sasl_auth_enable=yes" specify smtpd_sasl_auth_enable 
default enabled. Why I have to uncomment it out to make it become alive?


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


[pfx] Re: discard message

2024-06-20 Thread Bill Cole via Postfix-users
On 2024-06-20 at 15:59:25 UTC-0400 (Thu, 20 Jun 2024 15:59:25 -0400 
(EDT))

Wietse Venema via Postfix-users 
is rumored to have said:


If you use some Milter like rspamd then you need milter_header_checks.


You could do that, but if a milter is handling the filter it can just 
tell postfix to reject or discard it.


--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo@toad.social 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: SPF hostname and domainname

2024-06-20 Thread Emmanuel Fusté via Postfix-users

Le 21/06/2024 à 00:13, John Levine a écrit :

It appears that Emmanuel Fusté via Postfix-users  said:

In the general case (not null sender), HELO SPF validation does not
interfere with DMARC as DMARC only use the MAIL FROM identity.
There was historically a bug in some DMARC implementation witch evaluate
whatever SPF identity check that pass.

That's not a bug, that's how it's supposed to work, SPF uses the HELO
if the return path is null. See section 2.4 of RFC 7208 and 4.1 of RFC
7489.

We're nearly done with some updates to the DMARC spec and that is not
changing.



Ok I'm not a native english but please reread what wrote. That is 
exactly what I said.

The bug was in the general case IE when the return path is not null.

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


[pfx] Re: discard message

2024-06-20 Thread Jeff Peng via Postfix-users





best is to use a milter to reject spam, such as rspamd or 
amavisd-milter, no forged header checks then




i know rspamd is a milter, but spamassassin not working as milter?
thanks.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread John Levine via Postfix-users
It appears that Emmanuel Fusté via Postfix-users  said:
>In the general case (not null sender), HELO SPF validation does not 
>interfere with DMARC as DMARC only use the MAIL FROM identity.
>There was historically a bug in some DMARC implementation witch evaluate 
>whatever SPF identity check that pass.

That's not a bug, that's how it's supposed to work, SPF uses the HELO
if the return path is null. See section 2.4 of RFC 7208 and 4.1 of RFC
7489.

We're nearly done with some updates to the DMARC spec and that is not
changing.

R's,
John
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Bastian Blank via Postfix-users
On Thu, Jun 20, 2024 at 01:02:36PM -0400, postfix--- via Postfix-users wrote:
> > Then you can not use this e-mail address as envelope sender.  People
> > will do sender callout and then reject all e-mail with this as sender.
> An option is to have noreply@ delivered to /dev/null. It's valid and a trash 
> can.

No, you need to handle bounces and those are sent to the envelope
sender.

Bastian

-- 
War is never imperative.
-- McCoy, "Balance of Terror", stardate 1709.2
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: discard message

2024-06-20 Thread Benny Pedersen via Postfix-users

Paul Schmehl via Postfix-users skrev den 2024-06-20 21:28:


If it’s header_checks, I would probably use something like
/^X-Spam-Status: Yes, score=[5-100[/ to catch everything above five.


header checks in postfix is done before content filters, so you would 
love to reject spam on base of remote spammers own clasificaton ? :)


same reason that spamassassin also remove senders X-Spam-* so it only is 
local added results


best is to use a milter to reject spam, such as rspamd or 
amavisd-milter, no forged header checks then


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


[pfx] Re: discard message

2024-06-20 Thread Wietse Venema via Postfix-users
Paul Schmehl via Postfix-users:
> > On Jun 20, 2024, at 7:17?AM, Wietse Venema via Postfix-users 
> >  wrote:
> > 
> > Paul Schmehl via Postfix-users:
> >> Is there a place in postfix where I could discard mail if it has
> >> a spam score higher than say 4 or 5? I know that postfix hands the
> >> mail off to spamassassin for processing and then receives it back
> >> for delivery, but I'm unclear what checks could be implemented to
> >> catch spam and discard it.
> >> 
> >> This is what I could match on: X-Spam-Status: Yes, score=2.1
> >> 
> >> If the score was higher than some number (e.g >4) than reject the mail.
> > 
> > One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/
> 
> Would this be in header_checks? I confess, I?m not clear on how
> mail is handled after spamassassin returns it to Postfix. Does it
> go all the way through the process again, beginning with header_checks?

That depends. 

If you use the "content_filter" feature then header_checks shold do it.

If you use some Milter like rspamd then you need milter_header_checks.

> If it?s header_checks, I would probably use something like /^X-Spam-Status: 
> Yes, score=[5-100[/ to catch everything above five.

No. It's a regular expression, it does not compute that 5 is less than 100.
Use a pattern from Viktor's post.

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


[pfx] Re: discard message

2024-06-20 Thread Noel Jones via Postfix-users

On 6/20/2024 2:28 PM, Paul Schmehl via Postfix-users wrote:
On Jun 20, 2024, at 7:17 AM, Wietse Venema via Postfix-users 
 wrote:


Paul Schmehl via Postfix-users:

Is there a place in postfix where I could discard mail if it has
a spam score higher than say 4 or 5? I know that postfix hands the
mail off to spamassassin for processing and then receives it back
for delivery, but I'm unclear what checks could be implemented to
catch spam and discard it.

This is what I could match on: X-Spam-Status: Yes, score=2.1

If the score was higher than some number (e.g >4) than reject the 
mail.


One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/


Would this be in header_checks? I confess, I’m not clear on how mail 
is handled after spamassassin returns it to Postfix. Does it go all 
the way through the process again, beginning with header_checks?


If it’s header_checks, I would probably use something like 
/^X-Spam-Status: Yes, score=[5-100[/ to catch everything above five.


Paul Schmehl
paul.schm...@gmail.com



Yeah, been there, done that.

Please resist the urge to discard mail that scores above some 
amount. The way Spamassassin works, a higher score does not 
necessarily indicate "more" spamminess.


Spamassassin has a non-zero error rate, and if a wanted mail is 
discarded, neither you nor the sender will ever know, nor will you 
have much in the way of evidence to adjust future scores. I can 
guarantee this will cause you a problem at some point.


The safe choices are limited.

If you use a pre-queue filter such as a milter, you can safely 
reject the mail. Legit senders will be notified their mail wasn't 
delivered and can take action.


If you use a post-queue filter such as your spamd script, it's too 
late to reject.  You can mark the mail and deliver it, or send it to 
a quarantine.


I know it can seem very satisfying to discard mail, but DISCARD 
should be reserved for very narrow use cases, such as a former lover 
or a very persistent spammer.



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


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread Emmanuel Fusté via Postfix-users

Le 20/06/2024 à 21:13, Wietse Venema via Postfix-users a écrit :

Bounces are sent with the null envelope.from address which has no
domain. Therefore, SPF applies policy to a surrogate: the hostname
in the SMTP client's HELO/EHLO command (as if the envelope.from
address was postmaster@helo-argument).

This helo-argument is by default the value of the Postfix myhostname
parameter, which depending on myorigin setting may appear in the
header.from address mailer-daemon@whatever.

DMARC wants that the dmain in envelope.from address (or its surrogate
in the case of <>) in some way align with the domain in the header.from
address (in this case mailer-daemon@whatever).

If someone can come up with a simple checklist for how to do this
then that would be great.

The HELO identity is used too in the general case to enforce HELO fqdn 
value matching the DNS published A record of the outbound server IP.

You generally want "v=spf1 a: -all" for your sending server.

In the general case (not null sender), HELO SPF validation does not 
interfere with DMARC as DMARC only use the MAIL FROM identity.
There was historically a bug in some DMARC implementation witch evaluate 
whatever SPF identity check that pass.


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


[pfx] Re: discard message

2024-06-20 Thread Paul Schmehl via Postfix-users
> On Jun 20, 2024, at 7:17 AM, Wietse Venema via Postfix-users 
>  wrote:
> 
> Paul Schmehl via Postfix-users:
>> Is there a place in postfix where I could discard mail if it has
>> a spam score higher than say 4 or 5? I know that postfix hands the
>> mail off to spamassassin for processing and then receives it back
>> for delivery, but I'm unclear what checks could be implemented to
>> catch spam and discard it.
>> 
>> This is what I could match on: X-Spam-Status: Yes, score=2.1
>> 
>> If the score was higher than some number (e.g >4) than reject the mail.
> 
> One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/

Would this be in header_checks? I confess, I’m not clear on how mail is handled 
after spamassassin returns it to Postfix. Does it go all the way through the 
process again, beginning with header_checks?

If it’s header_checks, I would probably use something like /^X-Spam-Status: 
Yes, score=[5-100[/ to catch everything above five.

Paul Schmehl
paul.schm...@gmail.com
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread Wietse Venema via Postfix-users
Bounces are sent with the null envelope.from address which has no
domain. Therefore, SPF applies policy to a surrogate: the hostname
in the SMTP client's HELO/EHLO command (as if the envelope.from
address was postmaster@helo-argument).

This helo-argument is by default the value of the Postfix myhostname
parameter, which depending on myorigin setting may appear in the
header.from address mailer-daemon@whatever.

DMARC wants that the dmain in envelope.from address (or its surrogate
in the case of <>) in some way align with the domain in the header.from
address (in this case mailer-daemon@whatever).

If someone can come up with a simple checklist for how to do this
then that would be great.

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


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread postfix--- via Postfix-users

So there's a confusion between the hostname of the mailer and the
doamin to be used for the SPF check. Is anybody else seeing this ?


Yes, I had to recently add an "a:" record to an SPF (for the sending hostname) 
as I was seeing some of these I think.



Im confused by the language being used.

Isn't that the whole point of SPF records? To authorize the IP of the sending 
server? So by default shouldn't there already be an A record for the hostname 
of the sending server? And shouldn't there already be either that server's 
hostname or IP (or MX) in the SPF record? Otherwise what's in your SPF record 
if not those things?

I understand why there is potential confusion between hostname and domain. SPF 
says for this sending-address domain, these servers (identified by Hostname/IP) 
are authorized.

And while im at it, why are some admins insistent on having the HELO be 
something other than the hostname?
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread Gilgongo via Postfix-users
On Thu, 20 Jun 2024, 2:01 pm Emmanuel Seyman via Postfix-users, <
postfix-users@postfix.org> wrote:

>
> So there's a confusion between the hostname of the mailer and the
> doamin to be used for the SPF check. Is anybody else seeing this ?
>

Yes, I had to recently add an "a:" record to an SPF (for the sending
hostname) as I was seeing some of these I think.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread postfix--- via Postfix-users

Is an automated/unattended email notifying the user about something,
providing proper ways of contacting. As this email is not read in any way,
rejecting the mail would be a better way to handle than an automatic
response. IMHO.


Then you can not use this e-mail address as envelope sender.  People
will do sender callout and then reject all e-mail with this as sender.



An option is to have noreply@ delivered to /dev/null. It's valid and a trash 
can.

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


[pfx] Re: discard message

2024-06-20 Thread Varadi Gabor via Postfix-users

2024. 06. 20. 14:33 keltezéssel, Michael Grimm via Postfix-users írta:

Wietse Venema via Postfix-users  wrote:

Paul Schmehl via Postfix-users:



This is what I could match on: X-Spam-Status: Yes, score=2.1

If the score was higher than some number (e.g >4) than reject the mail.


One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/


Please correct me if I am mistaken, but that won't catch scores >= 10?


/^X-Spam-Status: Yes, score=[1-9][0-9]/

--
  [Varadi Gabor]

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


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Jaroslaw Rafa via Postfix-users
Dnia 20.06.2024 o godz. 09:08:39 Bastian Blank via Postfix-users pisze:
> Then you can not use this e-mail address as envelope sender.  People
> will do sender callout and then reject all e-mail with this as sender.

Sender callout is discouraged now, because it is considered aggressive
behavior by most mail providers, and if you routinely do sender callout, you
may end up being blacklisted and having trouble when sending email yourself.

I personally don't agree with this, but this is the position most mail
server operators are taking now.
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Jaroslaw Rafa via Postfix-users
Dnia 20.06.2024 o godz. 08:51:33 Alexander Leidinger via Postfix-users pisze:
> 
> This implies that the organization / company is willing to spend
> money on having someone available to actually respond / provide
> support. For a lot of the use cases I would say even a mail to
> ticket system gateway is out of the willingness to spend money on.
> So any technical solution you can propose here, will be way out of
> the area of interest of those people which will make those
> decisions.

They should not be *sending* any mail then. Simple enough?
-- 
Regards,
   Jaroslaw Rafa
   r...@rafa.eu.org
--
"In a million years, when kids go to school, they're gonna know: once there
was a Hushpuppy, and she lived with her daddy in the Bathtub."
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Ralph Seichter via Postfix-users
* Tan Mientras via Postfix-users:

> Is an automated/unattended email notifying the user about something,
> providing proper ways of contacting.

"Proper" is for the recipients of your messages to be able to use the
reply function in their MUA, to ask for clarification/assistance in
regards to the message you sent to them.

> As this email is not read in any way, rejecting the mail would be a
> better way to handle than an automatic response. IMHO.

The better way, as you put it, would be a process where there is not
merely an automatic response, but having replies read/answered by
somebody in your organisation. Ticket tracking systems can be used if
scaling is an issue. In my opinion, rejecting replies to email
communication your organisation initiated shows similarities to a
drive-by-shooting, in the broad sense that your organisation hopes to
"get the message out" but avoid the consequences of their actions. This
is of course a dramatic comparison, not to be taken literally.

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


[pfx] Re: SPF hostname and domainname

2024-06-20 Thread Bill Cole via Postfix-users

On 2024-06-20 at 09:00:35 UTC-0400 (Thu, 20 Jun 2024 15:00:35 +0200)
Emmanuel Seyman via Postfix-users 
is rumored to have said:


Hello, all.

Since yesterday, I've started seeing email from my servers getting
rejected due to SPF problems.

550 5.7.23 : Sender address rejected: Message 
rejected due to: SPF fail - not authorized. Please see 
http://spf.libraesva.com/Why?s=helo;id=mail01.my-company.com;ip=192.168.52.130;r=dounia.someth...@client.com 
(in reply to RCPT TO command))


That page states:
dounia.someth...@client.com received a message from 
mail01.my-company.com (192.168.52.130) that claimed to be 
mail01.my-company.com.
However, the domain mail01.my-company.com has declared using SPF that 
it does not send mail through mail01.my-company.com (192.168.52.130).

That is why the message was rejected.

So there's a confusion between the hostname of the mailer and the
doamin to be used for the SPF check. Is anybody else seeing this ?


Seeing WHAT?

You've obfuscated all details to the point that it is impossible to 
understand exactly what problem you are encountering.


My best *guess* based on how the error description is phrased is that 
the receiving side is unwisely enforcing SPF against your HELO argument. 
Doing that is deeply unwise for mail systems that want to generally 
receive legitimate email, but there are sites that do it anyway. Because 
of that, it is generally a good idea to include an 'a' directive in your 
SPF record and make sure that the IP which you appear to be coming from 
and the name you use in HELO/EHLO have simply symmetric DNS.




--
Bill Cole
b...@scconsult.com or billc...@apache.org
(AKA @grumpybozo@toad.social 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] SPF hostname and domainname

2024-06-20 Thread Emmanuel Seyman via Postfix-users


Hello, all.

Since yesterday, I've started seeing email from my servers getting
rejected due to SPF problems.

550 5.7.23 : Sender address rejected: Message rejected 
due to: SPF fail - not authorized. Please see 
http://spf.libraesva.com/Why?s=helo;id=mail01.my-company.com;ip=192.168.52.130;r=dounia.someth...@client.com
 (in reply to RCPT TO command))

That page states:
dounia.someth...@client.com received a message from mail01.my-company.com 
(192.168.52.130) that claimed to be mail01.my-company.com.
However, the domain mail01.my-company.com has declared using SPF that it does 
not send mail through mail01.my-company.com (192.168.52.130).
That is why the message was rejected.

So there's a confusion between the hostname of the mailer and the
doamin to be used for the SPF check. Is anybody else seeing this ?

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


[pfx] Re: discard message

2024-06-20 Thread Michael Grimm via Postfix-users
Viktor Dukhovni via Postfix-users  wrote:
> On Thu, Jun 20, 2024 at 02:33:08PM +0200, Michael Grimm via Postfix-users 
> wrote:

>>> One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/
>> 
>> Please correct me if I am mistaken, but that won't catch scores >= 10?
> 
> Yes, but easily adapted.
> 
>> But I don't know how such a regex should be defined.

Thanks for the examples, highly appreciated.

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


[pfx] Re: discard message

2024-06-20 Thread Viktor Dukhovni via Postfix-users
On Thu, Jun 20, 2024 at 02:33:08PM +0200, Michael Grimm via Postfix-users wrote:

> > One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/
> 
> Please correct me if I am mistaken, but that won't catch scores >= 10?

Yes, but easily adapted.

> But I don't know how such a regex should be defined.

PCRE:

/^X-Spam-Status: Yes, score=(?:[5-9]|[1-9]\d)/ ...

ARE:

/^X-Spam-Status: Yes, score=([5-9]|[1-9][0-9])/ ...

Or, simpler, two tests, be it slightly less efficient:

/^X-Spam-Status: Yes, score=[5-9]/  ...
/^X-Spam-Status: Yes, score=[1-9][0-9]/  ...

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


[pfx] Re: discard message

2024-06-20 Thread Michael Grimm via Postfix-users
Wietse Venema via Postfix-users  wrote:
> Paul Schmehl via Postfix-users:

>> This is what I could match on: X-Spam-Status: Yes, score=2.1
>> 
>> If the score was higher than some number (e.g >4) than reject the mail.
> 
> One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/

Please correct me if I am mistaken, but that won't catch scores >= 10?

But I don't know how such a regex should be defined.

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


[pfx] Re: discard message

2024-06-20 Thread Wietse Venema via Postfix-users
Paul Schmehl via Postfix-users:
> Is there a place in postfix where I could discard mail if it has
> a spam score higher than say 4 or 5? I know that postfix hands the
> mail off to spamassassin for processing and then receives it back
> for delivery, but I'm unclear what checks could be implemented to
> catch spam and discard it.
> 
> This is what I could match on: X-Spam-Status: Yes, score=2.1
> 
> If the score was higher than some number (e.g >4) than reject the mail.

One could try some variant of /^X-Spam-Status: Yes, score=[5-9]/

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


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Matus UHLAR - fantomas via Postfix-users

Then you can not use this e-mail address as envelope sender.  People
will do sender callout and then reject all e-mail with this as sender.


On 20.06.24 11:22, Tan Mientras via Postfix-users wrote:

Sorry. Im lost in translation. Could you elaborate/ELI5?

This address is not and will never receiveread any messages. Is an
automated message to notify users they must change their password.


there are servers that do sender verification.

They will join your server and if you reject mail for that address, they 
will reject mail from that address.


If you want to send mail from an address, make sure that address is 
deliverable.


--
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.
There's a long-standing bug relating to the x86 architecture that
allows you to install Windows.   -- Matthew D. Fuller
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Tan Mientras via Postfix-users
>
> Then you can not use this e-mail address as envelope sender.  People
> will do sender callout and then reject all e-mail with this as sender.
>

Sorry. Im lost in translation. Could you elaborate/ELI5?

This address is not and will never receiveread any messages. Is an
automated message to notify users they must change their password.
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org


[pfx] Re: REJECT sending mails to no-reply accounts

2024-06-20 Thread Bastian Blank via Postfix-users
On Thu, Jun 20, 2024 at 07:47:19AM +0200, Tan Mientras via Postfix-users wrote:
> @Ralph
> Is an automated/unattended email notifying the user about something,
> providing proper ways of contacting. As this email is not read in any way,
> rejecting the mail would be a better way to handle than an automatic
> response. IMHO.

Then you can not use this e-mail address as envelope sender.  People
will do sender callout and then reject all e-mail with this as sender.

Bastian

-- 
Witch!  Witch!  They'll burn ya!
-- Hag, "Tomorrow is Yesterday", stardate unknown
___
Postfix-users mailing list -- postfix-users@postfix.org
To unsubscribe send an email to postfix-users-le...@postfix.org