1

Topic: distribution groups are not being processed

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

So far I'm not sure where things went wrong as it was working fine before, but it seems like now none of my distribution lists are being processed.
The distribution lists have been configured exactly as per the instructions at https://docs.iredmail.org/sql.create.mail.alias.html

Following is the error returned on sending a message to a group:

Reporting-MTA: dns; mail.example.com
X-Postfix-Queue-ID: 47t9wD0r78z30Q3
X-Postfix-Sender: rfc822; group@example.com
Arrival-Date: Wed,  8 Jan 2020 16:04:12 +0200 (SAST)

Final-Recipient: rfc822; group@example.com
Original-Recipient: rfc822;group@example.com
Action: failed
Status: 5.1.1
Diagnostic-Code: x-unix; user unknown

If there's any other details you need from me just let me know smile

Following is the enabled options in postfix main.cf

queue_directory = /var/spool/postfix
command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix/sbin
data_directory = /var/lib/postfix
mail_owner = postfix
sendmail_path = /usr/sbin/sendmail
newaliases_path = /usr/bin/newaliases
mailq_path = /usr/bin/mailq
setgid_group = postdrop
debugger_command =
    PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin
    ddd $daemon_directory/$process_name $process_id & sleep 5
debug_peer_level = 2
unknown_local_recipient_reject_code = 550
biff = no
swap_bangpath = no
allow_percent_hack = no
allow_min_user = no
disable_vrfy_command = yes
inet_protocols = ipv4
inet_interfaces = all
smtpd_tls_key_file = /etc/ssl/private/iRedMail.key
smtpd_tls_cert_file = /etc/ssl/certs/iRedMail.crt
smtpd_tls_CAfile = /etc/ssl/certs/iRedMail.crt
smtpd_tls_CApath = /etc/ssl/certs
smtpd_tls_protocols = !SSLv2 !SSLv3
smtpd_tls_mandatory_protocols = !SSLv2 !SSLv3
smtp_tls_protocols = !SSLv2 !SSLv3
smtp_tls_mandatory_protocols = !SSLv2 !SSLv3
lmtp_tls_protocols = !SSLv2 !SSLv3
lmtp_tls_mandatory_protocols = !SSLv2 !SSLv3
smtpd_tls_exclude_ciphers = aNULL, eNULL, EXPORT, DES, RC4, MD5, PSK, aECDH, EDH-DSS-DES-CBC3-SHA, EDH-RSA-DES-CDC3-SHA, KRB5-DE5, CBC3-SHA
smtpd_tls_dh512_param_file = /etc/ssl/dh512_param.pem
smtpd_tls_dh1024_param_file = /etc/ssl/dh2048_param.pem
tls_random_source = dev:/dev/urandom
smtp_tls_loglevel = 1
smtpd_tls_loglevel = 1
smtpd_tls_security_level = may
smtp_tls_security_level = may
smtp_tls_CApath = /etc/ssl/certs
smtp_tls_CAfile = $smtpd_tls_CAfile
smtp_tls_note_starttls_offer = yes
enable_long_queue_ids = yes
smtpd_reject_unlisted_recipient = yes
header_checks = pcre:/etc/postfix/header_checks
body_checks = pcre:/etc/postfix/body_checks.pcre
smtpd_command_filter = pcre:/etc/postfix/command_filter.pcre
smtpd_helo_required = yes
smtpd_helo_restrictions =
    permit_mynetworks
    permit_sasl_authenticated
    check_helo_access pcre:/etc/postfix/helo_access.pcre
    reject_non_fqdn_helo_hostname
    reject_unknown_helo_hostname
smtpd_sender_restrictions =
    reject_unknown_sender_domain
    reject_non_fqdn_sender
    permit_mynetworks
    permit_sasl_authenticated
    check_sender_access pcre:/etc/postfix/sender_access.pcre
smtpd_recipient_restrictions =
    reject_non_fqdn_recipient
    reject_unlisted_recipient
    check_policy_service inet:127.0.0.1:7777
    permit_mynetworks
    permit_sasl_authenticated
    reject_unauth_destination
smtpd_end_of_data_restrictions =
    check_policy_service inet:127.0.0.1:7777
smtpd_data_restrictions = reject_unauth_pipelining
proxy_read_maps =  $virtual_alias_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_maps $smtp_generic_maps $smtpd_sender_login_maps $transport_maps $virtual_alias_domains $virtual_mailbox_domains $virtual_mailbox_maps $smtpd_sender_restrictions $sender_dependent_relayhost_maps
enable_original_recipient = no
virtual_minimum_uid = 2000
virtual_uid_maps = static:2000
virtual_gid_maps = static:2000
virtual_mailbox_base = /var/vmail
virtual_alias_domains =
myhostname = mail.example.com
myorigin = mail.example.com
mydomain = mail.example.com
mynetworks = 127.0.0.1
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination
smtp_host_lookup = native
mydestination = $myhostname, localhost, localhost.localdomain
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
message_size_limit = 15728640
recipient_delimiter = +
compatibility_level = 2
transport_maps =
    proxy:mysql:/etc/postfix/mysql/transport_maps_maillist.cf
    proxy:mysql:/etc/postfix/mysql/transport_maps_user.cf
    proxy:mysql:/etc/postfix/mysql/transport_maps_domain.cf
    hash:/etc/postfix/transport_rules/transport_domain
sender_dependent_relayhost_maps =
    proxy:mysql:/etc/postfix/mysql/sender_dependent_relayhost_maps.cf
smtpd_sender_login_maps =
    proxy:mysql:/etc/postfix/mysql/sender_login_maps.cf
virtual_mailbox_domains =
    proxy:mysql:/etc/postfix/mysql/virtual_mailbox_domains.cf
relay_domains =
    $mydestination
    proxy:mysql:/etc/postfix/mysql/relay_domains.cf
virtual_mailbox_maps =
virtual_alias_maps =
    proxy:mysql:/etc/postfix/mysql/virtual_alias_maps.cf
    proxy:mysql:/etc/postfix/mysql/domain_alias_maps.cf
    proxy:mysql:/etc/postfix/mysql/catchall_maps.cf
    proxy:mysql:/etc/postfix/mysql/domain_alias_catchall_maps.cf
sender_bcc_maps =
    proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_user.cf
    proxy:mysql:/etc/postfix/mysql/sender_bcc_maps_domain.cf
recipient_bcc_maps =
    proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_user.cf
    proxy:mysql:/etc/postfix/mysql/recipient_bcc_maps_domain.cf
postscreen_greet_action = drop
postscreen_blacklist_action = drop
postscreen_dnsbl_action = drop
postscreen_dnsbl_threshold = 2
postscreen_dnsbl_reply_map = texthash:/etc/postfix/postscreen_dnsbl_reply
postscreen_access_list = permit_mynetworks cidr:/etc/postfix/postscreen_access.cidr
postscreen_dnsbl_whitelist_threshold = -2
smtpd_sasl_type = dovecot
smtpd_sasl_path = private/dovecot-auth
virtual_transport = dovecot
dovecot_destination_recipient_limit = 1
mlmmj_destination_recipient_limit = 1
content_filter = smtp-amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
smtp-amavis_destination_recipient_limit = 1
relayhost = za-smtp-outbound-1.mimecast.co.za:25
smtp_sasl_password_maps = hash:/etc/postfix/sasl/sasl_password
smtp_sasl_auth_enable = yes
smtp_sasl_mechanism_filter = login
smtp_sasl_security_options = noanonymous

2

Re: distribution groups are not being processed

MuPp3t33r wrote:

Diagnostic-Code: x-unix; user unknown

This error means Postfix can not find the "group@example.com" by SQL query.
Please show us the full SQL record you inserted to created this group. Better double check with our tutorial.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee

3

Re: distribution groups are not being processed

ZhangHuangbin wrote:

This error means Postfix can not find the "group@example.com" by SQL query.
Please show us the full SQL record you inserted to created this group. Better double check with our tutorial.

Please see attached zip file containing (exported) CSV's of the vmail.alias and vmail.forwardings SQL tables.

As mentioned, it was working for a while, but I have no idea what changed since then.
I'm suspecting that it is not querying the SQL entries, but not sure how to troubleshoot that

4

Re: distribution groups are not being processed

After much searching I eventually came across the entry "no_address_mappings" in master.cf for amavis postfix re-injection which I've commented out, now it's working as expected

5

Re: distribution groups are not being processed

Updating master.cf is not correct.
The info i wanted is what SQL commands did you run to create this mail alias, it might be incorrect.

----

Does my reply help a little? How about buying me a cup of coffee ($5) as an encouragement?

buy me a cup of coffee