On Fri, 7 Aug 2026 19:35:01 +0200
Jaroslaw Rafa via Postfix-users <[email protected]> wrote:

> Dnia  7.08.2026 o godz. 18:14:45 Joe via Postfix-users pisze:
> > Is there, by the way, a method of filtering in Postfix based
> > on the sending server name i.e. its PTR record?  
> 
> You can do this with smtpd_client_restrictions.
> 
> > I could do this in
> > exim4, but the filtering in Postfix seems based on the alleged
> > sender name taken from the headers.  
> 
> Postfix does not filter on headers. That's what milters can do.

Sorry, badly put. It appears as a separate header, while the sender PTR
appears only in a Received: header.

I am old enough to have sent test emails by hand using Telnet, when that
was still possible.

> 
> smtpd_sender_restrictions filters on sender address taken from *SMTP
> transaction* (MAIL FROM: command), not from headers.
> 
> > I'd prefer to dispose of
> > xxx.goggleusercontent.com in one go, rather than a long list of CIDR
> > blocks.  
> 
> My table referenced in smtpd_client_restrictions contains
> 
> bc.googleusercontent.com      REJECT
> 
> and it works well for rejecting mail from all
> *.bc.googleusercontent.com clients.

Thanks, I've finally done it and caught an entry in the log today,
works perfectly.

I did think it must be possible, I'm just not used to thinking of email
senders as 'clients'.

-- 
Joe
_______________________________________________
Postfix-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]

Reply via email to