1 (edited by alyysaafan 2018-10-18 04:25:55)

Topic: connection refused

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  iRedMail-0.9.7
- Linux/BSD distribution name and version:  ubuntu 16.04
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): mysql
- Web server (Apache or Nginx):Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====


my connection is refused when I connect to smtp from another IP after trying to send 3 messages with errors



LOG



ct 17 20:10:51 mail postfix/anvil[2196]: statistics: max connection rate 2/60s for (submission:158.69.206.170) at Oct 17 20:07:29
Oct 17 20:10:51 mail postfix/anvil[2196]: statistics: max connection count 1 for (submission:158.69.206.170) at Oct 17 20:07:06
Oct 17 20:10:51 mail postfix/anvil[2196]: statistics: max cache size 1 at Oct 17 20:07:06

----

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

2

Re: connection refused

How to you connect "from another IP"? Mail client (which one) , testing with telnet, another mailserver?
How many "client errors" do you which to be allowed?

Have you changed any value for smtp_errors?
compare the actual settings with changed values
# postconf  |grep smtpd |grep error 
with
postconf -n |grep smtpd |grep error

Are your "other IP" banend in fail2ban? Check
# iptables -L f2b-postfix

3 (edited by alyysaafan 2018-10-18 18:39:55)

Re: connection refused

swejun wrote:

How to you connect "from another IP"? Mail client (which one) , testing with telnet, another mailserver?
How many "client errors" do you which to be allowed?

Have you changed any value for smtp_errors?
compare the actual settings with changed values
# postconf  |grep smtpd |grep error 
with
postconf -n |grep smtpd |grep error

Are your "other IP" banend in fail2ban? Check
# iptables -L f2b-postfix



I want this IP to never get blocked and I connected using smtp the error was that the"from" mail was different than that of the usermail.
No I didn't change any values

4

Re: connection refused

So...., smtp is compulsory, i guess,  since it is a mail server..., but I mean what is producing the SMTP protocol to connect to your mail server?
1) a mail client (Thunderbird, OSX mail, Outlook, ...) with one of your mail users trying to send e-mail
2) a remote mail server trying  send e-mail to a local user
3) manual testing SMTP using "telnet  mail.server.ip 25"

Depending on the above, the approach to allow differs.
If it is 1), use SASL login on port 587 instead of port 25 without login.

If it is 3), the reasons for failing is that you send "ehlo" command to quickly. Wait a couple of seconds after connecting befor sending the ehlo command.

If it is 2), please provide logfiles that proves this.
a)First there is the Client connect name ( the name that the sending mailserver provides in the EHLO message),
b)then there is the Mail Envelope  MAIL_FROM, (which translates to mail header REPLY_TO)
c)and then the Mail Header FROM (what the mail client displays as FROM)
Which ones in combinations do you think the receiving mailserver rejects?
Please give examples

The a) check can bounce if the sending mail server doesnt provide a FQDN name matching the IP address
It can also bounce if the IP is listed in some black lists over known spammers
The b) check can bounce if the MAIL FROM address is not a valid mail address, non existing domain etc.
The c) check is normally not available, must be done in SpamAssassin rules.

5

Re: connection refused

Try to disable "fail2ban" service and try again.
FYI: https://www.fail2ban.org/wiki/index.php/Main_Page