🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: alt.privacy.anon-server
5 messages
5 total messages Started by Nomen Nescio Thu, 08 Dec 2016 19:11
sender_access Question
#287503
Author: Nomen Nescio
Date: Thu, 08 Dec 2016 19:11
23 lines
1357 bytes
I have added several rules to my sender_access file and then 
updated the file with:
postmap sender_access

I then restart postfix with:
service postfix restart

I am having a problem with this rule:
*@*.br  REJECT

as I received an email from this email address today:
Donovan.Penny@brasiltelecom.net.br

Why does the rule above NOT reject the email from 
Donovan.Penny@brasiltelecom.net.br ?

Here's another one:

*@airtelbroadband.in    REJECT

This email was not rejected: Harrell.Aisha@airtelbroadband.in

I've tried REJECT and DISCARD with the same results.
Re: sender_access Question
#287507
Author: Anonymous
Date: Thu, 08 Dec 2016 21:06
24 lines
1386 bytes
  I don't think wildcards or other special symbols are recognized in sender_access.  Formats accepted:

myfriend@example.com    OK
junk@spam.com           REJECT
marketing@              REJECT
theboss@                OK
deals.marketing.com     REJECT
somedomain.com          OK

So you can probably block these like this

  Donovan.Penny@brasiltelecom.net.br

Add something like this to sender_access

Donovan.Penny@ REJECT
--or--
brasiltelecom.net.br REJECT

  Harrell.Aisha@airtelbroadband.in

Harrell.Aisha REJECT
--or--
airtelbroadband.in REJECT
Re: sender_access Question
#287515
Author: Werner Flamme
Date: Fri, 09 Dec 2016 15:35
33 lines
1861 bytes
Nomen Nescio [08.12.2016 20:11]:
> I have added several rules to my sender_access file and then 
> updated the file with:
> postmap sender_access
> 
> I then restart postfix with:
> service postfix restart
>
> I am having a problem with this rule:
> *@*.br  REJECT
>

I think you have an entry like

smtpd_sender_restrictions = hash:/etc/postfix/sender_access

so you have do a rehash after you changed the file. That far you worked
good :)

But: in a hash db, regexes are not used, all strings are taken literally.

If you want to use regex, you should change your config to something like

smtpd_sender_restrictions = pcre:/etc/postfix/sender_access

"postconf -m" should tell you if your postfix has pcre support compiled
in. You can also use regexp, if compiled in.

And there's no need to "postmap" a pcre/regex file, it is read in as is.
A "service postfix reload" should suffice.


-- 
Re: sender_access Question
#287518
Author: Anonymous
Date: Fri, 09 Dec 2016 21:54
37 lines
2180 bytes
On Fri, 9 Dec 2016 16:35:07 +0100, you wrote:
>
> Nomen Nescio [08.12.2016 20:11]:
> > I have added several rules to my sender_access file and then
> > updated the file with:
> > postmap sender_access
> >
> > I then restart postfix with:
> > service postfix restart
> >
> > I am having a problem with this rule:
> > *@*.br  REJECT
> >
>
> I think you have an entry like
>
> smtpd_sender_restrictions = hash:/etc/postfix/sender_access
>
> so you have do a rehash after you changed the file. That far you worked
> good :)
>
> But: in a hash db, regexes are not used, all strings are taken literally.
>
> If you want to use regex, you should change your config to something like
>
> smtpd_sender_restrictions = pcre:/etc/postfix/sender_access
>
> "postconf -m" should tell you if your postfix has pcre support compiled
> in. You can also use regexp, if compiled in.
>
> And there's no need to "postmap" a pcre/regex file, it is read in as is.
> A "service postfix reload" should suffice.
>
Werner thanks for the knowledge here. Will I see ree rejections in 
my mail.log file as emails are being rejected? I just want to 
confirm by adding the code above to main.cf and removing the 
hash.db references, I can use wildcards in my filter list?
Re: sender_access Question
#287519
Author: Anonymous
Date: Sat, 10 Dec 2016 00:20
45 lines
2535 bytes
On Fri,  9 Dec 2016 16:54:17 -0500 (EST), you wrote:
>
> On Fri, 9 Dec 2016 16:35:07 +0100, you wrote:
> >
> > Nomen Nescio [08.12.2016 20:11]:
> > > I have added several rules to my sender_access file and then
> > > updated the file with:
> > > postmap sender_access
> > >
> > > I then restart postfix with:
> > > service postfix restart
> > >
> > > I am having a problem with this rule:
> > > *@*.br  REJECT
> > >
> >
> > I think you have an entry like
> >
> > smtpd_sender_restrictions = hash:/etc/postfix/sender_access
> >
> > so you have do a rehash after you changed the file. That far you worked
> > good :)
> >
> > But: in a hash db, regexes are not used, all strings are taken literally.
> >
> > If you want to use regex, you should change your config to something like
> >
> > smtpd_sender_restrictions = pcre:/etc/postfix/sender_access
> >
> > "postconf -m" should tell you if your postfix has pcre support compiled
> > in. You can also use regexp, if compiled in.
> >
> > And there's no need to "postmap" a pcre/regex file, it is read in as is.
> > A "service postfix reload" should suffice.
> >
> Werner thanks for the knowledge here. Will I see ree rejections in
> my mail.log file as emails are being rejected? I just want to
> confirm by adding the code above to main.cf and removing the
> hash.db references, I can use wildcards in my filter list?

Just an update. I made the changes to my main.cf file and 
immediately starting getting many rejects from known good users. Do 
I now need to update my friends_whitelist or remailers_whitelist 
which only has one entry in it right now?
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads