[GH-ISSUE #1827] SMTP Auth not working #1434

Closed
opened 2026-02-27 11:17:05 +03:00 by kerem · 5 comments
Owner

Originally created by @pappastech on GitHub (Jan 19, 2020).
Original GitHub issue: https://github.com/modoboa/modoboa/issues/1827

Impacted versions

  • Modoboa: 1.14.0
  • installer used: Yes
  • Webserver: Nginx

Steps to reproduce

Telnet to port 25 on server and look for the following after 'EHLO' command.
250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN

I have been reviewing configuration files for a couple of hours and comparing to an existing mail server where this is working and have not found the problem yet.

Current behavior

AUTH is not displayed as available.

Expected behavior

AUTH should be presented as available.

Video/Screenshot link (optional)

image

Respectfully,
Tom

Originally created by @pappastech on GitHub (Jan 19, 2020). Original GitHub issue: https://github.com/modoboa/modoboa/issues/1827 # Impacted versions * Modoboa: 1.14.0 * installer used: Yes * Webserver: Nginx # Steps to reproduce Telnet to port 25 on server and look for the following after 'EHLO' command. 250-AUTH PLAIN LOGIN 250-AUTH=PLAIN LOGIN I have been reviewing configuration files for a couple of hours and comparing to an existing mail server where this is working and have not found the problem yet. # Current behavior AUTH is not displayed as available. # Expected behavior AUTH should be presented as available. # Video/Screenshot link (optional) ![image](https://user-images.githubusercontent.com/532780/72674663-3dac1c00-3a47-11ea-8efa-8b027e29fea2.png) Respectfully, Tom
kerem closed this issue 2026-02-27 11:17:05 +03:00
Author
Owner

@Saulzi commented on GitHub (Jan 30, 2020):

I have the same issue, interestingly it says that it is when i telnet from the local machine but when I do it remotely it does not give me 250-AUTH

<!-- gh-comment-id:580352772 --> @Saulzi commented on GitHub (Jan 30, 2020): I have the same issue, interestingly it says that it is when i telnet from the local machine but when I do it remotely it does not give me 250-AUTH
Author
Owner

@Saulzi commented on GitHub (Jan 30, 2020):

@pappastech i have managed to get this to work for me after a little bit of research.

Steps to reproduce.

Fresh install on Ubuntu 18.04 on new VPS.
Attempt to connect using outlook etc not working.
telnet from local host displays message with ehlo command
telnet from remote host does not display message with ehlo command

it turns out that this is happening because of the postfix configuration,

the following line is the culprit
mynetworks = 127.0.0.0/8
basically this means authorize local machine only

this needs to be changed to
mynetworks_style = class
this will allow same network class i.e. A / B / C

then restart postfix and you can connect remotely

<!-- gh-comment-id:580485624 --> @Saulzi commented on GitHub (Jan 30, 2020): @pappastech i have managed to get this to work for me after a little bit of research. Steps to reproduce. Fresh install on Ubuntu 18.04 on new VPS. Attempt to connect using outlook etc not working. telnet from local host displays message with ehlo command telnet from remote host does not display message with ehlo command it turns out that this is happening because of the postfix configuration, the following line is the culprit mynetworks = 127.0.0.0/8 basically this means authorize local machine only this needs to be changed to mynetworks_style = class this will allow same network class i.e. A / B / C then restart postfix and you can connect remotely
Author
Owner

@pappastech commented on GitHub (Jan 31, 2020):

Good find Saulzi, but I think it's a better idea to specify both mynetworks and mynetworks_class; something like this so trust doesn't reach to unwanted SMTP clients.

mynetworks = 127.0.0.0/8 192.168.1.0/24
mynetworks_style = host

This works in my environment and restricts trusted SMTP hosts to the local client and offers SMTP AUTH to everyone else.

<!-- gh-comment-id:580555116 --> @pappastech commented on GitHub (Jan 31, 2020): Good find Saulzi, but I think it's a better idea to specify both mynetworks and mynetworks_class; something like this so trust doesn't reach to unwanted SMTP clients. mynetworks = 127.0.0.0/8 192.168.1.0/24 mynetworks_style = host This works in my environment and restricts trusted SMTP hosts to the local client and offers SMTP AUTH to everyone else.
Author
Owner

@Saulzi commented on GitHub (Jan 31, 2020):

@pappastech

I am no postfix expert but you may find the following interesting
http://www.postfix.org/BASIC_CONFIGURATION_README.html

Specify "mynetworks_style = class" when Postfix should forward mail from SMTP clients in the same IP class A/B/C networks as the local machine. Don't do this with a dialup site - it would cause Postfix to "trust" your entire provider's network. Instead, specify an explicit mynetworks list by hand, as described below.

Alternatively, you can specify the mynetworks list by hand, in which case Postfix ignores the mynetworks_style setting. To specify the list of trusted networks by hand, specify network blocks in CIDR (network/mask) notation, for example:

/etc/postfix/main.cf:
mynetworks = 168.100.189.0/28, 127.0.0.0/8

if you are your mail server is on the same network i.e. 192.168 then you will get the headers, not sure if your configuration will work from the public internet (if that is the intention?)

Again, I'm no expert so my settings could probably be better.

<!-- gh-comment-id:580665724 --> @Saulzi commented on GitHub (Jan 31, 2020): @pappastech I am no postfix expert but you may find the following interesting http://www.postfix.org/BASIC_CONFIGURATION_README.html Specify "mynetworks_style = class" when Postfix should forward mail from SMTP clients in the same IP class A/B/C networks as the local machine. Don't do this with a dialup site - it would cause Postfix to "trust" your entire provider's network. Instead, specify an explicit mynetworks list by hand, as described below. Alternatively, you can specify the mynetworks list by hand, in which case Postfix ignores the mynetworks_style setting. To specify the list of trusted networks by hand, specify network blocks in CIDR (network/mask) notation, for example: /etc/postfix/main.cf: mynetworks = 168.100.189.0/28, 127.0.0.0/8 if you are your mail server is on the same network i.e. 192.168 then you will get the headers, not sure if your configuration will work from the public internet (if that is the intention?) Again, I'm no expert so my settings could probably be better.
Author
Owner

@Saulzi commented on GitHub (Jan 31, 2020):

ps. I have tested with mxtoolbox and Im not a public relay etc.

<!-- gh-comment-id:580666214 --> @Saulzi commented on GitHub (Jan 31, 2020): ps. I have tested with mxtoolbox and Im not a public relay etc.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/modoboa-modoboa#1434
No description provided.