1

Topic: Sending to SMTP 25 hungs

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.5-1
- Linux/BSD distribution name and version: Ubuntu-Server 14.04.2
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro? Yes
- Related log if you're reporting an issue:
====

I have I very busy server... for some users in local_net 192.168/16 is enabled SMTP 25 (without authentication)

It's very strange but sometimes emails goes, but sometimes just stuck and saiting for timeouts...

postconf -n
alias_database = hash:/etc/postfix/aliases
alias_maps = hash:/etc/postfix/aliases
allow_min_user = no
allow_percent_hack = no
biff = no
body_checks = pcre:/etc/postfix/body_checks.pcre
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/lib/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
debug_peer_list = 192.168.0.0/16
debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
default_destination_concurrency_limit = 100
default_destination_recipient_limit = 100
default_process_limit = 100
disable_vrfy_command = yes
dovecot_destination_recipient_limit = 1
enable_original_recipient = no
header_checks = pcre:/etc/postfix/header_checks
home_mailbox = Maildir/
inet_interfaces = all
inet_protocols = all
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
mail_owner = postfix
mailbox_command = /usr/lib/dovecot/deliver
mailq_path = /usr/bin/mailq
maximal_backoff_time = 1000s
message_size_limit = 39321600
minimal_backoff_time = 300s
mydestination = $myhostname, localhost, localhost.localdomain
mydomain = mail.domain.tld
myhostname = mail.domain.tld
mynetworks = 127.0.0.1, 192.168.0.0/16
myorigin = mail.domain.tld
newaliases_path = /usr/bin/newaliases
postscreen_access_list = permit_mynetworks, cidr:/etc/postfix/postscreen_access.cidr
postscreen_blacklist_action = enforce
postscreen_dnsbl_action = enforce
postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
postscreen_dnsbl_sites = zen.spamhaus.org*3 b.barracudacentral.org*2
postscreen_dnsbl_threshold = 2
postscreen_dnsbl_whitelist_threshold = -2
postscreen_greet_action = enforce
proxy_read_maps = $canonical_maps $lmtp_generic_maps $local_recipient_maps $mydestination $mynetworks $recipient_bcc_maps $recipient_canonical_maps $relay_domains $relay_recipient_maps $relocated_maps $sender_bcc_maps $sender_canonical_m
aps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_alias_maps $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
queue_directory = /var/spool/postfix
recipient_bcc_maps = proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_user.cf proxy:ldap:/etc/postfix/ldap/recipient_bcc_maps_domain.cf
recipient_delimiter = +
relay_domains = $mydestination proxy:ldap:/etc/postfix/ldap/relay_domains.cf
sender_bcc_maps = proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_user.cf proxy:ldap:/etc/postfix/ldap/sender_bcc_maps_domain.cf
sender_dependent_relayhost_maps = proxy:ldap:/etc/postfix/ldap/sender_dependent_relayhost_maps_domain.cf, proxy:ldap:/etc/postfix/ldap/sender_dependent_relayhost_maps_user.cf
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp-amavis_destination_recipient_limit = 1
smtp_destination_concurrency_limit = 100
smtp_mx_session_limit = 100
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_loglevel = 0

----

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

2

Re: Sending to SMTP 25 hungs

Some strange warnings in mail.log
May 18 17:21:40 mail postfix/master[4742]: warning: process /usr/lib/postfix/postscreen pid 31473 exit status 1
May 18 17:21:40 mail postfix/master[4742]: warning: /usr/lib/postfix/postscreen: bad command startup -- throttling

3

Re: Sending to SMTP 25 hungs

*) Is it blocked by fail2ban?
*) Try to add your internal network in postscreen whitelist: /etc/postfix/postscreen_access.cidr.

*) Since iRedMail-0.9.5, port 25 is running postscreen by default, not smtpd service, and no smtp SASL auth anymore. If you have some internal network devices (like fax, router, etc) need to send email without smtp auth, try open another port for them, e.g. 2525. FYI: http://www.iredmail.org/docs/additional.smtp.port.html

4

Re: Sending to SMTP 25 hungs

1) failban doesn't block - whitelist, logs was checked
2) postscreen whitelist: /etc/postfix/postscreen_access.cidr.
was done before posting 192.168.0.0/16 permit -and it does not help
3) if postscreen whitelist is enabled for 192.168.0.0/16 scope it must do ahead without postscreen testing

Anyway I can get insane, why sending works sometimes and sometimes not, or email sending waits 2-5 min. to be done...  or just get an error with timeout.

ZhangHuangbin wrote:

*) Is it blocked by fail2ban?
*) Try to add your internal network in postscreen whitelist: /etc/postfix/postscreen_access.cidr.

*) Since iRedMail-0.9.5, port 25 is running postscreen by default, not smtpd service, and no smtp SASL auth anymore. If you have some internal network devices (like fax, router, etc) need to send email without smtp auth, try open another port for them, e.g. 2525. FYI: http://www.iredmail.org/docs/additional.smtp.port.html

5

Re: Sending to SMTP 25 hungs

This problem was resolved with another port