1 (edited by kent@kamar.nz 2021-10-08 03:55:54)

Topic: mynetwork with IPv6 fails, but IPv4 works

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  2021062401
- Deployed with iRedMail Easy or the downloadable installer? iRedMail Easy
- Linux/BSD distribution name and version: Debian 10 (Buster)
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro? Yes
====

Hi,
We have a couple of devices which sent emails (mostly to me) but aren't able to authenticate, so I've opened sending by adding them to mynetworks.

This is working fine when they connect to our mail server using IPv4  but fails every time when they connect with IPv6.

I believe I've correctly set the IPv6 in the 'mynetworks' to allow our IPv6 subnet - but it's constantly rejecting emails.

Is this postfix - or something else in the chain ?

Thanks
Kent.



Per:  http://www.postfix.org/postconf.5.html#mynetworks

------------
mynetworks = [2001:df5:5e80::]/64 127.0.0.0/8 10.0.0.0/8 192.168.2.0/24  [::1]/128 [fe80::]/10

This is also set in '/opt/iredmail/custom/iredapd/settings.py' with:
MYNETWORKS = ["10.0.0.0/8", "192.168.2.0/24", "[::1]/128", "[fe80::]/10", "[2001:df5:5e80::]/64"]

and also in '/opt/iredmail/custom/postfix/custom.sh' with:
postconf -e mynetworks='127.0.0.0/8 10.0.0.0/8 192.168.2.0/24 [::1]/128 [fe80::]/10 [2001:df5:5e80::]/64'
------------



These are the logs on the sending server and also our iredmail server.
When sending an email from another machine (this case also running postfix) on the same network:


IPv6  (sending server)
------------------------------------------------
Recipient address rejected: SMTP AUTH is required for users under this sender domain (in reply to RCPT TO command))


iredmail mail server
------------------------------------------------
Oct  7 13:18:16 mail postfix/smtpd[5078]: NOQUEUE: reject: RCPT from 2fa-1.kamar.nz[2001:df5:5e80::]: 554 5.7.1 <kent@kamar.nz>: Recipient address rejected: SMTP AUTH is required for users under this sender domain

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: mynetwork with IPv6 fails, but IPv4 works

- What's the log line in iRedAPD log file (/var/log/iredapd/iredapd.log) related to this issue?
- Did you try to use "2001:df5:5e80::251" (without []) in iRedAPD config file, parameter MYNETWORKS?

3 (edited by kent@kamar.nz 2021-10-08 03:57:05)

Re: mynetwork with IPv6 fails, but IPv4 works

Hi Zhang,

Modified settings.py as suggested:
--------------------------------------------
MYNETWORKS = ["10.0.0.0/8", "192.168.2.0/24", "::1/128", "fe80::/10", "2001:df5:5e80::/64"]

Rebooted the server and now working.

Should this file include  "127.0.0.0/8" in it as well ?

Thanks
Kent.

4

Re: mynetwork with IPv6 fails, but IPv4 works

127.0.0.1 is included by default, but not 127.0.0.0/8. You’re free to add it if you need it.

5

Re: mynetwork with IPv6 fails, but IPv4 works

ZhangHuangbin wrote:

127.0.0.1 is included by default, but not 127.0.0.0/8. You’re free to add it if you need it.


Okay - thanks.  I don't need so will leave as is.

Cheers
Kent.