Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Wietse Venema
Viktor Dukhovni: > On Sun, Feb 07, 2021 at 05:33:10PM +0100, Marek Kozlowski wrote: > > > Presumably it's my fault but I cannot find such an option. If so - thank > > you for directing me to it. I'm wondering if it possible to limit > > incoming mail with '...@somedomain.tld' specified as a

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Viktor Dukhovni
On Sun, Feb 07, 2021 at 05:33:10PM +0100, Marek Kozlowski wrote: > Presumably it's my fault but I cannot find such an option. If so - thank > you for directing me to it. I'm wondering if it possible to limit > incoming mail with '...@somedomain.tld' specified as a sender address*) > to IPs

Re: TCP wrappers and Postfix

2021-02-07 Thread Viktor Dukhovni
On Mon, Feb 08, 2021 at 02:17:46AM +0300, Eugene Podshivalov wrote: > Are there any reasons not to have Postfix compiled with TCP wrappers? Because that would likely be entirely redundant. Postfix already has IP-based access controls (local tables, RBL lookups, postscreen(8), ... and can also

TCP wrappers and Postfix

2021-02-07 Thread Eugene Podshivalov
Hi all, Are there any reasons not to have Postfix compiled with TCP wrappers? Regards, Eugene

Re: fork_attempts=10 ?

2021-02-07 Thread Bob Proulx
Marek Kozlowski wrote: > Have you ever read you own code (or quick fixes) written >5 years > ago if you'd forgotten to place comments? ;-) I often say, "I miss my younger brain." Back then I could remember all of the details. These days I write notes to my future self. My future self who will

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Viktor Dukhovni
On Sun, Feb 07, 2021 at 03:26:29PM -0500, Alex wrote: > > Quoting Zathros, "Cannot say. Saying, I would know. Do not know, so > > cannot say." It all depends upon your use of sudo. One can't say it > > won't be secure. The devil is in the details. > > I figured that if main.cf was owned by

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Bob Proulx
Alex wrote: > Yes, it's a web front-end, using apache and php-fpm. > It's written using laravel and PHP. It relieves me (Whew!) that it is not using WP which historically has had deep security vulnerabilities quite often. And therefore in the situation you are proposing would be a likely

Re: fork_attempts=10 ?

2021-02-07 Thread Wietse Venema
Marek Kozlowski: > :-) > > On 2/7/21 10:00 PM, Wietse Venema wrote: > > Marek Kozlowski: > >> :-) > >> > >> I'm working on simplification, adding comments and brushing up my > >> main.cf. I've just found the following entry: > >> > >> fork_attempts=10 > >> > >> Seems to be added manually so there

Re: fork_attempts=10 ?

2021-02-07 Thread Marek Kozlowski
:-) On 2/7/21 10:00 PM, Wietse Venema wrote: Marek Kozlowski: :-) I'm working on simplification, adding comments and brushing up my main.cf. I've just found the following entry: fork_attempts=10 Seems to be added manually so there was some reason for it. How many people have root

Re: fork_attempts=10 ?

2021-02-07 Thread Wietse Venema
Marek Kozlowski: > :-) > > I'm working on simplification, adding comments and brushing up my > main.cf. I've just found the following entry: > > fork_attempts=10 > > Seems to be added manually so there was some reason for it. How many people have root privilege on your machine? >

fork_attempts=10 ?

2021-02-07 Thread Marek Kozlowski
:-) I'm working on simplification, adding comments and brushing up my main.cf. I've just found the following entry: fork_attempts=10 Seems to be added manually so there was some reason for it. Unfortunately there is no comment on it in the file. The documentation is very short: "Limit on

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Chris Green
On Sun, Feb 07, 2021 at 02:47:11PM -0500, Wietse Venema wrote: > Alex: > > Hi, > > > > I'm working on a front-end to modify our main.cf and other config > > files, such as the transport and relay_recips file and want to be sure > > I'm doing it securely. > > > > Postfix complains if the files

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Alex
Hi, > > I'm working on a front-end to modify our main.cf and other config > > files, such as the transport and relay_recips file > > Hmm... A front-end? Should we assume this is a web UI frontend? > Because although most of us use $EDITOR for those files the official > frontend is "postconf"

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Bob Proulx
Alex wrote: > I'm working on a front-end to modify our main.cf and other config > files, such as the transport and relay_recips file Hmm... A front-end? Should we assume this is a web UI frontend? Because although most of us use $EDITOR for those files the official frontend is "postconf" for

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Bill Cole
On 7 Feb 2021, at 14:33, Marek Kozlowski wrote: :-) On 2/7/21 7:51 PM, Bill Cole wrote: On 7 Feb 2021, at 12:52, Marek Kozlowski wrote: :-) On 2/7/21 6:34 PM, Benny Pedersen wrote: On 2021-02-07 18:28, Marek Kozlowski wrote: Mail from 192.168.3/24 with sender's address 'sth3.tld' should

Re: User script for modifying main.cf and other config files

2021-02-07 Thread Wietse Venema
Alex: > Hi, > > I'm working on a front-end to modify our main.cf and other config > files, such as the transport and relay_recips file and want to be sure > I'm doing it securely. > > Postfix complains if the files are not owned by root, but I don't want > the script to have to run as root. What

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Marek Kozlowski
:-) On 2/7/21 7:51 PM, Bill Cole wrote: On 7 Feb 2021, at 12:52, Marek Kozlowski wrote: :-) On 2/7/21 6:34 PM, Benny Pedersen wrote: On 2021-02-07 18:28, Marek Kozlowski wrote: Mail from 192.168.3/24 with sender's address 'sth3.tld' should be accepted even if the user is not

Re: ipv6, SPF, DMARC

2021-02-07 Thread Bob Proulx
Jeff Abrahamson wrote: > Setting > inet_protocols = ipv4 > fixes the issue. I have heard (so apply the rumor filter accordingly) that Google's Gmail is more strict for IPv6 clients than IPv4 clients. When SPF, DKIM, DMARC fails then for IPv4 clients it is more likely it will be accepted and

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Bill Cole
On 7 Feb 2021, at 12:52, Marek Kozlowski wrote: :-) On 2/7/21 6:34 PM, Benny Pedersen wrote: On 2021-02-07 18:28, Marek Kozlowski wrote: Mail from 192.168.3/24 with sender's address 'sth3.tld' should be accepted even if the user is not authenticated, and rejected without authentication for

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Marek Kozlowski
:-) On 2/7/21 6:34 PM, Benny Pedersen wrote: On 2021-02-07 18:28, Marek Kozlowski wrote: Mail from 192.168.3/24 with sender's address 'sth3.tld' should be accepted even if the user is not authenticated, and rejected without authentication for other CIDR blocks. add 192.168.0.0/16 to

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Benny Pedersen
On 2021-02-07 18:28, Marek Kozlowski wrote: Mail from 192.168.3/24 with sender's address 'sth3.tld' should be accepted even if the user is not authenticated, and rejected without authentication for other CIDR blocks. add 192.168.0.0/16 to mynetworks you show bogus logs btw

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Benny Pedersen
On 2021-02-07 18:08, Curtis Maurand wrote: I would suggest giving higher preference to SPF. You can even reject if SPF fails. sure spf is the network policy, but i do not need network policy to reject local domains in port 25 world would be perfect if spf was used more even on postfix

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Marek Kozlowski
:-) No, misunderstanding. I'm not asking about SPF, DKIM etc. smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, ... I have a mail server for a few domains. I need something more general that

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Curtis Maurand
Sent from my iPhone > On Feb 7, 2021, at 11:44 AM, Benny Pedersen wrote: > > On 2021-02-07 17:33, Marek Kozlowski wrote: >> :-) > > +1 > >> Presumably it's my fault but I cannot find such an option. If so - >> thank you for directing me to it. I'm wondering if it possible to >> limit

Re: Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Benny Pedersen
On 2021-02-07 17:33, Marek Kozlowski wrote: :-) +1 Presumably it's my fault but I cannot find such an option. If so - thank you for directing me to it. I'm wondering if it possible to limit incoming mail with '...@somedomain.tld' specified as a sender address*) to IPs belonging from some

Mail from @somedomain.tld allowed only from some CIDR ranges?

2021-02-07 Thread Marek Kozlowski
:-) Presumably it's my fault but I cannot find such an option. If so - thank you for directing me to it. I'm wondering if it possible to limit incoming mail with '...@somedomain.tld' specified as a sender address*) to IPs belonging from some CIDR ranges: - if addresses from the ranges belong

User script for modifying main.cf and other config files

2021-02-07 Thread Alex
Hi, I'm working on a front-end to modify our main.cf and other config files, such as the transport and relay_recips file and want to be sure I'm doing it securely. Postfix complains if the files are not owned by root, but I don't want the script to have to run as root. What is the most secure

Re: TLS is required, but was not offered

2021-02-07 Thread Viktor Dukhovni
On Sun, Feb 07, 2021 at 11:09:42AM +0300, OzyMate wrote: > If I change smtp_tls_security_level = encrypt with > smtplmtp_tls_security_level =encrypt, all seem working. You completely ignored the bulk of my reply, and just fudged something random. :-( 0. An apparently working configuration

Re: TLS is required, but was not offered

2021-02-07 Thread OzyMate
If I change smtp_tls_security_level = encrypt with smtplmtp_tls_security_level =encrypt, all seem working. I appreciate your help. Please find below output of "postconf -n" for completeness: alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases command_directory = /usr/sbin

Re: TLS is required, but was not offered

2021-02-07 Thread OzyMate
Thank you for taking your time to reply. I didn't say that 127.0.0.1 is Amazon SES. That is my server. As soon as I change "smtp_tls_security_level = encrypt" with "smtp_tls_security_level = may", it works. My question is that why "encrypt" option is not working with my postfix setup.