[Beginner] Mail server not sending - auth problem?

Use this forum if you have installed hMailServer and want to ask a question related to a production release of hMailServer. Before posting, please read the troubleshooting guide. A large part of all reported issues are already described in detail here.
Post Reply
Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

[Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 07:32

Hello fellows!

I am having problems trying to send mail through hmailserver and need some help, please.
This is my previous question: https://www.hmailserver.com/forum/viewt ... =7&t=35231
I decided to use my domain as a relay point and here is what I have done and changed in hmailserver.

Note:
1) My domain name has been changed to "goodname.com".
2) My ip address has been changed to "123.456.789.000".

What I have done:

Installed:
1) hMailServer-5.7.0-B2519-x64.exe.
2) Picked password "mailserver123".
3) Default database (MySQL Compact).

On My Domain (MissHosting):
1) Added an A record:
Name TTL Class Type Record
mail.goodname.com 3600 IN A 123.456.789.000

2) Added an MX record:
Name TTL Class Type Record Priority
goodname.com 3600 IN MX Destination: mail.goodname.com 0

sslforfree.com / ZeroSSL SSLs / MissHosting DKIM:
1) Registered my domain at sslforfree.com and got ca_bundle.crt, certificate.crt, and private.key.
2) Went to MissHosting site and added those 3 certs and checked that my dummy website that I never use can be connected through https:// - It is fine.
3) Went to my provider, MissHosting, and got the private DKIM code.

Firewall:
1) Inbound ports opened: 25, 587, 465, 995
2) Outbound ports opened: 25, 587, 465, 995

hMailServer settings:
1) Domains -> goodname.com
-> General:
A1) Domain: "goodname.com"
A2) Enabled: true

-> DKIM Signing:
B1) Enabled: true
B2) Private key file: C:\Program Files\hMailServer\Bin\SSL\dkimprivate.key (gotten from MissHosting)
B3) Selector "mydkim"

-> Advanced:
C1) Catch-all address: "admin@goodname.com"

2) Accounts
-> General:
A1) Address: "noreply@goodname.com"
A2) Password <<Encrypted>>: "mailserver123"

3) Settings -> Protocols -> SMTP:
-> Delivery of e-mail:
A1) Local host name: "mail.goodname.com"

-> RFC compliance:
B1) Allow plain text authentication: true
B2) Allow empty sender address: true
B3) Allow incorrectly formatted line endings: true
B4) Disconnect client after too many invalid commands: 100

-> Advanced:
C1) Delivery of email -> Bind to local IP address: 123.456.789.000

4) Settings -> Logging ->
A1) Enabled: true
A2) Log: I checked all boxes.

-> Auto-ban
B1) Enabled: false (turned it off as I am still in testing & can see that I am not black listed)

-> SSL certificates:
C1) Name: "goodname.com"
C2) Certificate file: C:\Program Files\hMailServer\Bin\SSL\certificate.crt (from ZeroSSL)
C3) Private key file: "C:\Program Files\hMailServer\Bin\SSL\private.key" (from ZeroSSL)

-> IP Ranges -> My computer:
D1) Name: "My computer", Priority: "30", Lower IP: "127.0.0.1", Upper IP: "127.0.0.1"
D2) Allow connections: SMTP, POP3, IMAP
D3) Other: Anti-spam: true, Anti-virus: true, Require SSL/TLS for authentication: false

D4) Allow deliveries from:
Local to local e-mail addresses: true,
Local to external e-mail addresses: true,
External to local e-mail addresses: true,
External to external e-mail addresses: false

D5) Require SMTP authentication:
Local to local email addresses: true,
Local to external e-mail addresses: true,
External to local e-mail addresses: false,
External to external e-mail addresses: false,

-> IP Ranges -> Internet:
D1) Name: "Internet", Priority: "10", Lower IP: "0.0.0.0", Upper IP: "255.255.255.255"
D2) Allow connections: SMTP, POP3, IMAP
D3) Other: Anti-spam: true, Anti-virus: true, Require SSL/TLS for authentication: false

D4) Allow deliveries from:
Local to local e-mail addresses: true,
Local to external e-mail addresses: true,
External to local e-mail addresses: true,
External to external e-mail addresses: false

D5) Require SMTP authentication:
Local to local email addresses: true,
Local to external e-mail addresses: true,
External to local e-mail addresses: false,
External to external e-mail addresses: false,

-> SSL/TLS:
E1) SSL/TLS ciphers: <A lot of stuff, did not change anything>
E2) Verify remote server SSL/TLS certificates: true
E3) Versions: TLS v1.0, TLS v1.1, TLS v1.2, TLS v1.3

-> TCP/IP ports:
F1) Added: SMTP, 0.0.0.0, 465, SSL/TLS, SSL Certificate: "goodname.com"
F2) Added: POP3, 0.0.0.0, 995, SSL/TLS, SSL Certificate: "goodname.com"

5) Utilities
-> Backup:
A1) Destination: C:\mailbackup
A2) Backup: Settings, Domains, Messages + Compress files

-> MX-query:
B1) E-mail address: noreply@goodname.com
B2) Resolve -> Shows misshosting address + <my_ip> => good good

-> Diagnostics:
A1) goodname.com:

---- Start ----

Test: Server details
hMailServer version: 5.7.0-B2519
Version architecture: x64
Processor architecture: x86
Logical processors: 12
System memory: 32702 MB
Database type: MSSQL Compact

Test: Test IPv6
IPv6 support is available in operating system.

Test: Test outbound port
SMTP relayer not in use. Attempting mail.hmailserver.com:25...
Local address is 123.456.789.000.
Trying to connect to host mail.hmailserver.com...
Trying to connect to TCP/IP address 5.189.183.138 on port 25.
Connected successfully.

Test: Test backup directory
Backup directory C:\mailbackup is writable.

Test: Test MX records
Trying to resolve MX records for goodname.com...
Host name found: mail.goodname.com

Test: Test local connect
Connecting to TCP/IP address in MX records for local domain domain goodname.com...
Trying to connect to host mail.goodname.com...
Trying to connect to TCP/IP address 123.456.789.000 on port 25.
Connected successfully.

Test: Test message file locations
Relative message paths are stored in the database for all messages.

Test: Test IP range configuration
No problems were found in the IP range configuration.

Test: Error logs
There are no error logs in the log directory.

---- Stop ----

Testing the server in 2 different ways:

What I have done to test the server in Mozilla Thunderbird:

Setup:

Outgoing Server (SMTP):
Server name: "mail.goodname.com"
Port: "465"
Connection security: "SSL/TLS"
Authentification method: "none" or "Normal password" or "Encrypted password". - None work
User Name: "noreply@goodname.com"

noreply@goodname.com:
Server Type: POP Mail Server (cannot be changed)
Server Name: "mail.goodname.com"
Port: "465"
User Name: "noreply@goodname.com"
Connection security: "SSL/TLS"
Authenticiation method: "Normal password" or "Encrypted password". - None work

Sending an e-mail to a valid address - Error pop-up:
"Sending of the message failed. Unable to communicate securly with peer: requested domain name does not match the server's certificate. The configuration related to mail.goodname.com must be corrected."


What I have done to test the server in Java / Spring Boot with JavaMailSender:
Observe that this was tested with Gmail about 1 year ago and it worked!

Java properties settings in application properties:
# JavaMail
spring.mail.host=mail.goodname.com
spring.mail.port=465
spring.mail.username=mailserver123
spring.mail.password=mailserver123
spring.mail.sent-from=noreply@ansoa.com
spring.mail.properties.mail.smtp.auth=true
spring.mail.properties.mail.smtp.starttls.enable=true

When running a test:

"org.springframework.mail.MailSendException: Mail server connection failed; nested exception is javax.mail.MessagingException: Got bad greeting from SMTP host: mail.goodname.com, port: 465, response: [EOF]. Failed messages: javax.mail.MessagingException: Got bad greeting from SMTP host: mail.goodname.com, port: 465, response: [EOF]
at org.springframework.mail.javamail.JavaMailSenderImpl.doSend(JavaMailSenderImpl.java:448) ~[spring-context-support-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:361) ~[spring-context-support-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at org.springframework.mail.javamail.JavaMailSenderImpl.send(JavaMailSenderImpl.java:356) ~[spring-context-support-5.2.8.RELEASE.jar:5.2.8.RELEASE]
at square.app.service.email.EmailServiceImpl.createMail(EmailServiceImpl.java:64) ~[classes/:na]"...



What I find odd:

1) Why does Thunderbird complain about the certs? I have a SSL cert for goodname.com and also use the same certs for the server. Am I suppose to get a cert for mail.goodname.com specifically?
2) Why do I get that error thrown? Bad greeting from SMTP host with EOF? What could that be?

I am clueless. I do not know what to do. All I want my server is to send e-mails to user and never get anything back. Any ideas, please?

Edit: Here is from the output file from hmailserver when I try to run my Java code:

"DEBUG" 12720 "2020-08-05 07:35:16.926" "Pre-creating session 21"
"TCPIP" 12720 "2020-08-05 07:35:16.926" "TCP - 123.456.789.000 connected to 123.456.789.000:465."
"DEBUG" 12720 "2020-08-05 07:35:16.926" "TCP connection started for session 20"
"DEBUG" 12720 "2020-08-05 07:35:16.926" "Performing SSL/TLS handshake for session 20. Verify certificate: False"
"TCPIP" 12720 "2020-08-05 07:35:33.286" "TCPConnection - TLS/SSL handshake failed. Session Id: 20, Remote IP: 123.456.789.000, Error code: 10054, Message: An existing connection was forcibly closed by the remote host"
"DEBUG" 12720 "2020-08-05 07:35:33.286" "Ending session 20"

User avatar
johang
Senior user
Senior user
Posts: 1128
Joined: 2008-09-01 09:20

Re: [Beginner] Mail server not sending - auth problem?

Post by johang » 2020-08-05 08:26

Adriansun wrote:
2020-08-05 07:32

1) Why does Thunderbird complain about the certs? I have a SSL cert for goodname.com and also use the same certs for the server. Am I suppose to get a cert for mail.goodname.com specifically?

2) Why do I get that error thrown? Bad greeting from SMTP host with EOF? What could that be?

1, yes ... you use a cert for your hostname mail.goodname.com ( or did you buy a wildcard *.goodname.com cert ? )
( you know you can just take the cert out of your configuration and make it work without ? )
have you tested your setup with external tools ? https://ssl-tools.net/mailservers

2 since your SSL seems to be broken ... you can get any error or text ... ( it should not keep communicating because the communication is not trustable)



have you tried without requiring and adding the SSL cert ?, you are after all only doing a local thunderbird to local smtp server connection, the possibility of someone sniffing your password should be minimal in that scenario
lets cheat darwin out of his legacy, find a cure for cancer...

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 09:41

johang wrote:
2020-08-05 08:26
1, yes ... you use a cert for your hostname mail.goodname.com ( or did you buy a wildcard *.goodname.com cert ? )
( you know you can just take the cert out of your configuration and make it work without ? )
have you tested your setup with external tools ? https://ssl-tools.net/mailservers

2 since your SSL seems to be broken ... you can get any error or text ... ( it should not keep communicating because the communication is not trustable)

have you tried without requiring and adding the SSL cert ?, you are after all only doing a local thunderbird to local smtp server connection, the possibility of someone sniffing your password should be minimal in that scenario
Well, can I ask you; if I get another SSL cert, one for mail.goodname.com is that what is called a * (wildcard) cert? You are mentioning it a bit, but I would like to know more. Also I can try without SSL. Port 25 and remove the certs from hmailserver - right? Does the MX seem right to you? I get different results depending on the site I use.

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 09:46

I removed my SSL and in thunderbird I set all ports to 25. I got this error message from Thunderbird:

"An error occurred while sending mail. The mail server responded: Verification failed for <noreply@goodname.com>
No Such User Here
Sender verify failed.
Please check the message recipient "<aValidEmail@itIsGoodIUseItAllTheTimeGmail.com" and try again."

There is nothing new at all in hmailserver logs.

User avatar
jimimaseye
Moderator
Moderator
Posts: 10060
Joined: 2011-09-08 17:48

Re: [Beginner] Mail server not sending - auth problem?

Post by jimimaseye » 2020-08-05 10:03

Ok, l;ets step back and go through this one by one. There is too much written, with too many areas for potential problem, so lets strip back:

As it stands (wihtout any Certs installed, and following the Thunderbird test, run this and post the results: https://www.hmailserver.com/forum/viewt ... 20&t=30914
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

User avatar
mattg
Moderator
Moderator
Posts: 22437
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Beginner] Mail server not sending - auth problem?

Post by mattg » 2020-08-05 10:25

Adriansun wrote:
2020-08-05 07:32
2) Picked password "mailserver123".
Gee, I hope you didn't - if so please change THAT ASAP
(and don't tell the world what your password is)
Adriansun wrote:
2020-08-05 07:32
I am clueless. I do not know what to do. All I want my server is to send e-mails to user and never get anything back...
So you just want to spam the world and not get any feedback...please don't

You do realise that 5.7 is an ALPHA version and SHOULD NOT be used in production.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 10:40

mattg wrote:
2020-08-05 10:25
Adriansun wrote:
2020-08-05 07:32
2) Picked password "mailserver123".
Gee, I hope you didn't - if so please change THAT ASAP
(and don't tell the world what your password is)
Adriansun wrote:
2020-08-05 07:32
I am clueless. I do not know what to do. All I want my server is to send e-mails to user and never get anything back...
So you just want to spam the world and not get any feedback...please don't

You do realise that 5.7 is an ALPHA version and SHOULD NOT be used in production.
Hi there! I know it is an alpha, I had some problem with previous versions. I cannot remember right now what the problem was. Maybe I should try again with an older, more stable, version. Also the password does not matter. The server, for now, is just for testing / trying to make hmailserver start and work. I just tried to do the most easy and minimal work possible. Is there anything else that you can see in my post that might be wrong?

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 13:43

Hi again,

I removed the installation and installed: hMailServer-5.6.7-B2425.exe
...with the same settings.

Now I get in Thunderbird:

"Sending of the message failed.
Unable to communicate securly with peer: requested domain name does not match the server's certificate.
The configuration related to mail.goodname.com must be corrected.".

Can we conclude that there is a problem with the SSL cert and that the cert need to be a wildcard (*) cert for "mail.goodname.com" instead of "goodname.com"?

Edit:
Log:
"DEBUG" 1576 "2020-08-05 13:44:57.859" "Creating session 39"
"TCPIP" 1576 "2020-08-05 13:44:57.859" "TCP - 123.456.789.000 connected to 123.456.789.000:465."
"DEBUG" 1576 "2020-08-05 13:44:57.861" "TCP connection started for session 38"
"DEBUG" 1576 "2020-08-05 13:44:57.862" "Performing SSL/TLS handshake for session 38. Verify certificate: False"
"TCPIP" 19324 "2020-08-05 13:44:57.878" "TCPConnection - TLS/SSL handshake completed. Session Id: 38, Remote IP: 123.456.789.000, Version: TLSv1.2, Cipher: ECDHE-RSA-AES128-GCM-SHA256, Bits: 128"
"SMTPD" 19324 38 "2020-08-05 13:44:57.879" "123.456.789.000" "SENT: 220 mail.goodname.com ESMTP"
"DEBUG" 14820 "2020-08-05 13:44:57.886" "The read operation failed. Bytes transferred: 0 Remote IP: 123.456.789.000, Session: 38, Code: 10053, Message: An established connection was aborted by the software in your host machine"
"DEBUG" 14820 "2020-08-05 13:44:57.887" "Ending session 38"
Last edited by Adriansun on 2020-08-05 13:46, edited 1 time in total.

User avatar
mattg
Moderator
Moderator
Posts: 22437
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Beginner] Mail server not sending - auth problem?

Post by mattg » 2020-08-05 13:43

mattg wrote:
2020-08-05 10:25
Adriansun wrote:
2020-08-05 07:32
I am clueless. I do not know what to do. All I want my server is to send e-mails to user and never get anything back...
So you just want to spam the world and not get any feedback...please don't
For clarity, that is 'please reconsider your desire to run any mail server'

It would suit those of who are serious to not have to fight yet another spam spewing machine.
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 13:52

mattg wrote:
2020-08-05 13:43
mattg wrote:
2020-08-05 10:25
Adriansun wrote:
2020-08-05 07:32
I am clueless. I do not know what to do. All I want my server is to send e-mails to user and never get anything back...
So you just want to spam the world and not get any feedback...please don't
For clarity, that is 'please reconsider your desire to run any mail server'

It would suit those of who are serious to not have to fight yet another spam spewing machine.
Hello @mattg,

My email server is intended to send out verification mails when a user register, and in worst case senario if the database is compromised and I need to notify everyone to update their passwords. What is wrong with that?

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 15:39

If I get another SSL cert for mail.goodname.com then what option should I choose? Here are my two options:

"Please choose an SSL validation method (all are automatic):

You will usually want to use the HTTP validation method. If your domain's nameservers point to cPanel, then you have the option of using the DNS validation method instead.

If you wish to issue wildcards, you MUST use the DNS validation method.
http-01 dns-01 ".

User avatar
jimimaseye
Moderator
Moderator
Posts: 10060
Joined: 2011-09-08 17:48

Re: [Beginner] Mail server not sending - auth problem?

Post by jimimaseye » 2020-08-05 17:06

Adriansun wrote:
2020-08-05 13:52
mattg wrote:
2020-08-05 13:43
mattg wrote:
2020-08-05 10:25

So you just want to spam the world and not get any feedback...please don't
For clarity, that is 'please reconsider your desire to run any mail server'

It would suit those of who are serious to not have to fight yet another spam spewing machine.
Hello @mattg,

My email server is intended to send out verification mails when a user register, and in worst case senario if the database is compromised and I need to notify everyone to update their passwords. What is wrong with that?
I think there is a misunderstanding here and Matt thinks that by your statement:

"All I want my server is to send e-mails to user and never get anything back..."

... you are sending one way (like spam) and not that you mean you dont want rejections due to badly configured server. However, RFC dictates that as a webiste/mailserver you must be in a position to receive emails such as 'postmaster@' and 'abuse@'. As a responsible emailer you should be receiving feedback and complaints and dealing with them.
5.7 on test.
SpamassassinForWindows 3.4.0 spamd service
AV: Clamwin + Clamd service + sanesecurity defs : https://www.hmailserver.com/forum/viewtopic.php?f=21&t=26829

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 17:58

jimimaseye wrote:
2020-08-05 17:06
Adriansun wrote:
2020-08-05 13:52
mattg wrote:
2020-08-05 13:43

For clarity, that is 'please reconsider your desire to run any mail server'

It would suit those of who are serious to not have to fight yet another spam spewing machine.
Hello @mattg,

My email server is intended to send out verification mails when a user register, and in worst case senario if the database is compromised and I need to notify everyone to update their passwords. What is wrong with that?
I think there is a misunderstanding here and Matt thinkls that by your statement:

"All I want my server is to send e-mails to user and never get anything back..."

... you are sending one way (like spam) and not that you mean you dont want rejections due to badly configured server. However, RFC dictates that as a webiste/mailserver you must be in a position to receive emails such as 'postmaster@' and 'abuse@'. As a responsible emailer you should be receiving feedback and complaints and dealing with them.
Yes, that is fine. I understand more now. Yes, it is okay with rejections and take complaints.

On a side note: Do you know the answer to my latest question besides this one? Really want my server up.

User avatar
johang
Senior user
Senior user
Posts: 1128
Joined: 2008-09-01 09:20

Re: [Beginner] Mail server not sending - auth problem?

Post by johang » 2020-08-05 18:37

mailserver to mailserver communication via port 25 does not require SSL.

client to mailserver communication often includes a username and password being sent, if clients are outside your network and perhaps visit hotel wifi, train wifi other open wifi internetaccess you want to secure the transmission of password .... and you you put a ssl cert in place .. ( mostly on port 587, 465, 993 and 995 )

90 days cert for free https://www.sslforfree.com/
Adriansun wrote:
2020-08-05 09:41
johang wrote:
2020-08-05 08:26
1, yes ... you use a cert for your hostname mail.goodname.com ( or did you buy a wildcard *.goodname.com cert ? )
( you know you can just take the cert out of your configuration and make it work without ? )
have you tested your setup with external tools ? https://ssl-tools.net/mailservers

2 since your SSL seems to be broken ... you can get any error or text ... ( it should not keep communicating because the communication is not trustable)

have you tried without requiring and adding the SSL cert ?, you are after all only doing a local thunderbird to local smtp server connection, the possibility of someone sniffing your password should be minimal in that scenario
Well, can I ask you; if I get another SSL cert, one for mail.goodname.com is that what is called a * (wildcard) cert? You are mentioning it a bit, but I would like to know more. Also I can try without SSL. Port 25 and remove the certs from hmailserver - right? Does the MX seem right to you? I get different results depending on the site I use.
Wildcard SSL Certificate. ... The difference between a single domain SSL and a Wildcard SSL is that the Wildcard SSL has a prefix '*' known as the Wildcard character, which is added to the domain name. So, '*' could be 'mail,' 'login,' 'ftp,' or anything else.

Yes you can remove SSL on port 25

I have no clue if your MX is right ( because i do not know your real domainname ) please check on https://mxtoolbox.com/

Code: Select all

On My Domain (MissHosting):
1) Added an A record:
Name TTL Class Type Record
mail.goodname.com 3600 IN A 123.456.789.000

2) Added an MX record:
Name TTL Class Type Record Priority
goodname.com 3600 IN MX Destination: mail.goodname.com 0
but this looks right


if you get different results when checking your MX .... well ... without knowing which sites and what domain we are talking about




because goodname.com exists... and is not configured as you are indicating it to be configured
goodname.com. 14399 IN A 185.205.211.178
mail.goodname.com. 14399 IN CNAME goodname.com.
goodname.com. 14399 IN MX 0 goodname.com.
goodname.com. 21599 IN NS ns121.truehoster.net.
goodname.com. 21599 IN NS ns120.truehoster.net.
goodname.com. 21599 IN SOA ns120.truehoster.net. cpanel.truehoster.net. 2019121100 3600 7200 1209600 86400
goodname.com. 14399 IN MX 0 goodname.com.
goodname.com. 14399 IN TXT "v=spf1 ip4:185.205.211.110 ip4:185.205.211.178 +a +mx ~all"
lets cheat darwin out of his legacy, find a cure for cancer...

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-05 18:46

johang wrote:
2020-08-05 18:37
because goodname.com exists... and is not configured as you are indicating it to be configured
goodname.com. 14399 IN A 185.205.211.178
mail.goodname.com. 14399 IN CNAME goodname.com.
goodname.com. 14399 IN MX 0 goodname.com.
goodname.com. 21599 IN NS ns121.truehoster.net.
goodname.com. 21599 IN NS ns120.truehoster.net.
goodname.com. 21599 IN SOA ns120.truehoster.net. cpanel.truehoster.net. 2019121100 3600 7200 1209600 86400
goodname.com. 14399 IN MX 0 goodname.com.
goodname.com. 14399 IN TXT "v=spf1 ip4:185.205.211.110 ip4:185.205.211.178 +a +mx ~all"
Not sure what you mean with the above code. Way beyond me.

From https://mxtoolbox.com:
goodname.com:
DMARC Record Published DMARC Record found
DMARC Policy Not Enabled DMARC Quarantine/Reject policy enabled
DNS Record Published DNS Record found

mail.goodname.com:
DNS Record Published DNS Record not found More Info
DMARC Record Published DMARC Record found
DMARC Policy Not Enabled DMARC Quarantine/Reject policy enabled

User avatar
johang
Senior user
Senior user
Posts: 1128
Joined: 2008-09-01 09:20

Re: [Beginner] Mail server not sending - auth problem?

Post by johang » 2020-08-05 20:04

Adriansun wrote:
2020-08-05 07:32
Hello fellows!

--snipp--
On My Domain (MissHosting):
1) Added an A record:
Name TTL Class Type Record
mail.goodname.com 3600 IN A 123.456.789.000

2) Added an MX record:
Name TTL Class Type Record Priority
goodname.com 3600 IN MX Destination: mail.goodname.com 0
no you didnt

from : https://www.digwebinterface.com/?hostna ... meservers=
mail.goodname.com. 3600 IN CNAME goodname.com.
goodname.com. 3600 IN MX Destination: goodname.com.

Adriansun wrote:
2020-08-05 18:46
Not sure what you mean with the above code. Way beyond me.
what you said you had done was good
not doing what you said you had done, is not good :wink: beyond you or not...


i just had NO clue it was the domain.. i mean you masked the IP.. i naturally thought you masked your domain
lets cheat darwin out of his legacy, find a cure for cancer...

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-06 13:01

johang wrote:
2020-08-05 20:04
Adriansun wrote:
2020-08-05 07:32
Hello fellows!

--snipp--
On My Domain (MissHosting):
1) Added an A record:
Name TTL Class Type Record
mail.goodname.com 3600 IN A 123.456.789.000

2) Added an MX record:
Name TTL Class Type Record Priority
goodname.com 3600 IN MX Destination: mail.goodname.com 0
no you didnt

from : https://www.digwebinterface.com/?hostna ... meservers=
mail.goodname.com. 3600 IN CNAME goodname.com.
goodname.com. 3600 IN MX Destination: goodname.com.

Adriansun wrote:
2020-08-05 18:46
Not sure what you mean with the above code. Way beyond me.
what you said you had done was good
not doing what you said you had done, is not good :wink: beyond you or not...


i just had NO clue it was the domain.. i mean you masked the IP.. i naturally thought you masked your domain
goodname.com is not my real domain name.

User avatar
jim.bus
Senior user
Senior user
Posts: 1571
Joined: 2011-05-28 11:49
Location: US

Re: [Beginner] Mail server not sending - auth problem?

Post by jim.bus » 2020-08-06 14:01

I had to put my comment in.

If a beginner, it would seem to me that you are attempting to do too many complicated configurations at once. When I started with hMailServer which was the first and only mail server I have used. I first installed hMailServer with all of its Default Settings. Then configured it to the minimal amount of settings necesary to get it up and running. The Help Documentation will tell you most of what you need to configure to do that. You do need to create in DNS an SPF Text Record, a PTR (reverse DNS entry). You do need to properly define your domain and MX Records. You need to understand the difference between the hMailServer name (hostname or subdomain name) and the actual Domain. You need to define a Domain in hMailServer.

hMailServer Default settings pretty much work to start. By the way, you should have had your Requires Authentication options 'Checked' for 'External to external' (the Defaults have this set properly). Once you get hMailServer running with the Defaults then maybe start adding one by one the options you think you need to add such as Security Certificates.

Again when I first installed hMailServer, I was unaware of the existence of the Help Documentation installation instructions (if it existed at that time). Now I was an ex Main Frame programmer but a novice when it came to email Servers. The only other experience I had was in getting an SFTP File Transfer Server running. This taught me what a Server Name or Hostname actually was. But I managed to get hMailServer configured to a running state in 4 days. I mostly solved all my installation problems myself (though running questions by people such as mattg, etc. but I came up with the actual solution myself). But the thing was I didn't try to go much beyond the Default Settings until I got things running. I have ever since been gradually augmenting my hMailServer.

The way you've approached it, as a novice to me it looks like you are trying to do too many changes to the Default Settings which introduces too many things that can go wrong when. As I said hMailServer doesn't require a lot of configuration to get it up and running. And I have not had to change much of the Default Settings ever. But do be aware, I'm not saying that it doesn't take some setting up. It is just you'll have an easier time if you take it one step at a time. Get one function working before you attempt another. As a clue, I didn't add DKIM for a long time and not until I understood the concept.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-06 21:51

jim.bus wrote:
2020-08-06 14:01
I had to put my comment in.

If a beginner, it would seem to me that you are attempting to do too many complicated configurations at once. When I started with hMailServer which was the first and only mail server I have used. I first installed hMailServer with all of its Default Settings. Then configured it to the minimal amount of settings necesary to get it up and running. The Help Documentation will tell you most of what you need to configure to do that. You do need to create in DNS an SPF Text Record, a PTR (reverse DNS entry). You do need to properly define your domain and MX Records. You need to understand the difference between the hMailServer name (hostname or subdomain name) and the actual Domain. You need to define a Domain in hMailServer.

hMailServer Default settings pretty much work to start. By the way, you should have had your Requires Authentication options 'Checked' for 'External to external' (the Defaults have this set properly). Once you get hMailServer running with the Defaults then maybe start adding one by one the options you think you need to add such as Security Certificates.

Again when I first installed hMailServer, I was unaware of the existence of the Help Documentation installation instructions (if it existed at that time). Now I was an ex Main Frame programmer but a novice when it came to email Servers. The only other experience I had was in getting an SFTP File Transfer Server running. This taught me what a Server Name or Hostname actually was. But I managed to get hMailServer configured to a running state in 4 days. I mostly solved all my installation problems myself (though running questions by people such as mattg, etc. but I came up with the actual solution myself). But the thing was I didn't try to go much beyond the Default Settings until I got things running. I have ever since been gradually augmenting my hMailServer.

The way you've approached it, as a novice to me it looks like you are trying to do too many changes to the Default Settings which introduces too many things that can go wrong when. As I said hMailServer doesn't require a lot of configuration to get it up and running. And I have not had to change much of the Default Settings ever. But do be aware, I'm not saying that it doesn't take some setting up. It is just you'll have an easier time if you take it one step at a time. Get one function working before you attempt another. As a clue, I didn't add DKIM for a long time and not until I understood the concept.
You sound sensible like others. Is there any chance that you can guide me through, eg Google Hangouts, to make it start and work. All I want is a Java program (that works) to send an email to eg Gmail and for eg Gmail to accept the email. That is all. I can donate a bit of money for your time if that would help.

User avatar
jim.bus
Senior user
Senior user
Posts: 1571
Joined: 2011-05-28 11:49
Location: US

Re: [Beginner] Mail server not sending - auth problem?

Post by jim.bus » 2020-08-06 22:41

Adriansun wrote:
2020-08-06 21:51

You sound sensible like others. Is there any chance that you can guide me through, eg Google Hangouts, to make it start and work. All I want is a Java program (that works) to send an email to eg Gmail and for eg Gmail to accept the email. That is all. I can donate a bit of money for your time if that would help.
Sorry, I don't use the facilities you refer to and I don't know anything about using Java. I primarily use the email Client Outlook, though I believe without having actually used Thunderbird, Thunderbird (Freeware) is probably a good alternative to Outlook.

I will give you one other piece of advice on how I managed to get an hMailServer running. You also need to have a properly configured DNS. I went to my Domain Registrar (GoDaddy) which also had an email set up for me as part of my Domain service. To find out how to set up my DNS to be used with hMailServer, I just looked at the DNS Zone File for my Domain at GoDaddy and basically just substituted my hMailServer hostname (otherwise called a subdomain name) in place of their Email Server Name. I changed their SPF Record and PTR entry to match my hMailServer hostname, etc. So I learned how to setup my DNS by copying a working example already configured for a different server. Later on I read up a little on the various DNS Record Types and how they are used.

And by the way, I still am not an expert by any stretch of the imagination. I've only been telling you about things which worked adequately for me. Mattg and the others are way more experienced than me. The advice about starting out with the Defaults is advice I believe many people would give anybody (novice or not). You just don't want to complicate things any more than you have to.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-06 23:31

jim.bus wrote:
2020-08-06 22:41
Adriansun wrote:
2020-08-06 21:51

You sound sensible like others. Is there any chance that you can guide me through, eg Google Hangouts, to make it start and work. All I want is a Java program (that works) to send an email to eg Gmail and for eg Gmail to accept the email. That is all. I can donate a bit of money for your time if that would help.
Sorry, I don't use the facilities you refer to and I don't know anything about using Java. I primarily use the email Client Outlook, though I believe without having actually used Thunderbird, Thunderbird (Freeware) is probably a good alternative to Outlook.

I will give you one other piece of advice on how I managed to get an hMailServer running. You also need to have a properly configured DNS. I went to my Domain Registrar (GoDaddy) which also had an email set up for me as part of my Domain service. To find out how to set up my DNS to be used with hMailServer, I just looked at the DNS Zone File for my Domain at GoDaddy and basically just substituted my hMailServer hostname (otherwise called a subdomain name) in place of their Email Server Name. I changed their SPF Record and PTR entry to match my hMailServer hostname, etc. So I learned how to setup my DNS by copying a working example already configured for a different server. Later on I read up a little on the various DNS Record Types and how they are used.

And by the way, I still am not an expert by any stretch of the imagination. I've only been telling you about things which worked adequately for me. Mattg and the others are way more experienced than me. The advice about starting out with the Defaults is advice I believe many people would give anybody (novice or not). You just don't want to complicate things any more than you have to.
You do not have to be an expert. I have already done what you have told me. If you want to help me by voice and let me share my screen then I am up for it with whatever program you want. Google Hangout was just an example.

User avatar
mattg
Moderator
Moderator
Posts: 22437
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Beginner] Mail server not sending - auth problem?

Post by mattg » 2020-08-07 04:18

Adriansun wrote:
2020-08-06 21:51
You sound sensible like others. Is there any chance that you can guide me through, eg Google Hangouts, to make it start and work. All I want is a Java program (that works) to send an email to eg Gmail and for eg Gmail to accept the email. That is all. I can donate a bit of money for your time if that would help.
Why don't you simply use gmail's server to send the messages from
Why put a mailserver in the middle

gMail will accept mail for resubmission on port 587, using StartTLS, to anyone, as long as you use your gmail account as credentials

This would be a much simpler solution for you (and also means that the rest of us don't need to fight the spam that is likely to come from you hosting a mailserver.

To me this is like you want to travel from A to B, so you think building a car is the best way forward. Catch an Uber or Taxi and be done
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

User avatar
johang
Senior user
Senior user
Posts: 1128
Joined: 2008-09-01 09:20

Re: [Beginner] Mail server not sending - auth problem?

Post by johang » 2020-08-07 14:18

lets cheat darwin out of his legacy, find a cure for cancer...

Adriansun
New user
New user
Posts: 15
Joined: 2020-07-24 19:43

Re: [Beginner] Mail server not sending - auth problem?

Post by Adriansun » 2020-08-08 02:06

mattg wrote:
2020-08-07 04:18
Adriansun wrote:
2020-08-06 21:51
You sound sensible like others. Is there any chance that you can guide me through, eg Google Hangouts, to make it start and work. All I want is a Java program (that works) to send an email to eg Gmail and for eg Gmail to accept the email. That is all. I can donate a bit of money for your time if that would help.
Why don't you simply use gmail's server to send the messages from
Why put a mailserver in the middle

gMail will accept mail for resubmission on port 587, using StartTLS, to anyone, as long as you use your gmail account as credentials

This would be a much simpler solution for you (and also means that the rest of us don't need to fight the spam that is likely to come from you hosting a mailserver.

To me this is like you want to travel from A to B, so you think building a car is the best way forward. Catch an Uber or Taxi and be done
My project is pretty big. I used your suggestion up until a year ago when it did work. But(!) Gmail limits me, as seen as a 1 person, to 50 mails per day (or was it 99?). Imagine that more people would like to get an account at my website and need a verification mail, but cannot, because of this limitation. The other option, with Gmail, is to pay them or other companies to send more emails. I would like to go around that money problem by having my own email server. That is why I am here.

User avatar
johang
Senior user
Senior user
Posts: 1128
Joined: 2008-09-01 09:20

Re: [Beginner] Mail server not sending - auth problem?

Post by johang » 2020-08-08 10:52

jimimaseye wrote:
2020-08-05 10:03
Ok, l;ets step back and go through this one by one. There is too much written, with too many areas for potential problem, so lets strip back:
As it stands (wihtout any Certs installed, and following the Thunderbird test, run this and post the results: https://www.hmailserver.com/forum/viewt ... 20&t=30914
do what jimimaseye asked

you seems to have problem with your java emailclient and your thunderbird emailclient connecting to your hmailserver, but we have no clue as if to your hmailserver actually operates.

to be able to help you it is very much simpler to know what you have configured instaed of at this point guessing what setup you have


in almost all cases of fault searching im involved in i go into 1 out of 2 appraoches ..
first 1. is.. is there a possibility to split the behaviour to half to see which chunk has a problem .. thats not possible in this scenario as you have problems all over ...
number 2. take away everything "on top" so you go down into bare metal mode .. for you that would be .. take away ssl, take away authentication .. and look into the logs of you applications and servers to find what is not talking to what and why ..

so you have 1 server .. have you gotten it to work "bare metal"? no horns or whisssles
https://www.hmailserver.com/documentati ... figuration
can you connect via telnet to port 25 on that server both from your ( i pressume ) local net and internet ?
lets cheat darwin out of his legacy, find a cure for cancer...

User avatar
jim.bus
Senior user
Senior user
Posts: 1571
Joined: 2011-05-28 11:49
Location: US

Re: [Beginner] Mail server not sending - auth problem?

Post by jim.bus » 2020-08-08 12:07

johang wrote:
2020-08-08 10:52
jimimaseye wrote:
2020-08-05 10:03
Ok, l;ets step back and go through this one by one. There is too much written, with too many areas for potential problem, so lets strip back:
As it stands (wihtout any Certs installed, and following the Thunderbird test, run this and post the results: https://www.hmailserver.com/forum/viewt ... 20&t=30914
do what jimimaseye asked

you seems to have problem with your java emailclient and your thunderbird emailclient connecting to your hmailserver, but we have no clue as if to your hmailserver actually operates.

to be able to help you it is very much simpler to know what you have configured instaed of at this point guessing what setup you have


in almost all cases of fault searching im involved in i go into 1 out of 2 appraoches ..
first 1. is.. is there a possibility to split the behaviour to half to see which chunk has a problem .. thats not possible in this scenario as you have problems all over ...
number 2. take away everything "on top" so you go down into bare metal mode .. for you that would be .. take away ssl, take away authentication .. and look into the logs of you applications and servers to find what is not talking to what and why ..

so you have 1 server .. have you gotten it to work "bare metal"? no horns or whisssles
https://www.hmailserver.com/documentati ... figuration
can you connect via telnet to port 25 on that server both from your ( i pressume ) local net and internet ?
Not meaning to gloat, but that is what I was trying to tell him to do a while back and he stated he had done what I asked him to do (which was to go to all the default settings and get hMailServer working on the Default Settings first), though he didn't state what he had actually done. If he did what I was telling him to do, he should already be at that point of being at, as you called it, 'bare metal' mode.
If you think you understand quantum mechanics, you don't understand quantum mechanics.

User avatar
mattg
Moderator
Moderator
Posts: 22437
Joined: 2007-06-14 05:12
Location: 'The Outback' Australia

Re: [Beginner] Mail server not sending - auth problem?

Post by mattg » 2020-08-08 14:57

Adriansun wrote:
2020-08-08 02:06
My project is pretty big. I used your suggestion up until a year ago when it did work. But(!) Gmail limits me, as seen as a 1 person, to 50 mails per day (or was it 99?).
This document says the limit is 2000 per day
To put that in context , that is one EVERY 43.2 seconds
https://support.google.com/a/answer/166852?hl=en

Any more than that, and I smell a spammer
Just 'cause I link to a page and say little else doesn't mean I am not being nice.
https://www.hmailserver.com/documentation

Post Reply