1

Topic: mlmmj subscribe error user unknown

==== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Debian 9
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? YES
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I've integrated mlmmj according to the document for LDAP, created a list and added users OK but replies to Subscription Confirmation messages bounce with "user unknown":

-- CUT--
Apr  5 11:03:19 kingsfoil postfix/amavis/smtp[3337]: 2ABB6205EE: to=<job-111+confsub-4216d14e6c4fa9a8-john=domain.com@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.55, delays=0.11/0.01/0/0.43, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9C79C20CD1)
Apr  5 11:03:19 kingsfoil postfix/qmgr[662]: 2ABB6205EE: removed
Apr  5 11:03:19 kingsfoil postfix/pipe[3344]: 9C79C20CD1: to=<job-111+confsub-4216d14e6c4fa9a8-john=domain.com@domain.com>, relay=dovecot, delay=0.04, delays=0.01/0.01/0/0.02, dsn=5.1.1, status=bounced (user unknown)
-- CUT--

I can't find any other error messages. WHat's missing?

----

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

2

Re: mlmmj subscribe error user unknown

Postfix hands over the message to Dovecot (relay=dovecot), so you need to check Dovecot log file.

3 (edited by sayso 2018-04-06 00:55:58)

Re: mlmmj subscribe error user unknown

I tried replying again and the only thing dovecot logs is the bounce:

Apr  5 12:49:06 kingsfoil dovecot: lda(john@domain.com): sieve: from=MAILER-DAEMON@kingsfoil.<domain>, envelope_sender=MAILER-DAEMON, subject=Undelivered Mail Returned to Sender, msgid=<20180405164906.8948C20CD7@kingsfoil.<domain>>, size=7136, stored mail into mailbox 'INBOX'

4

Re: mlmmj subscribe error user unknown

Please try to turn on debug mode in Dovecot and try again, then paste the detailed log related to this error for troubleshooting.
FYI: https://docs.iredmail.org/debug.dovecot.html

5

Re: mlmmj subscribe error user unknown

Ok. Here it is

Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Loading modules from directory: /usr/lib/dovecot/modules
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib01_acl_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib02_imap_acl_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib11_imap_quota_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib15_notify_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mail_log_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mailbox_alias_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib90_stats_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib95_imap_stats_plugin.so
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Added userdb setting: mail=maildir:~/Maildir/
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Added userdb setting: plugin/master_user=john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Added userdb setting: plugin/quota_rule=*:bytes=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42/
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota rule: root=user mailbox=* bytes=0 messages=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota warning: bytes=0 (100%) messages=0 reverse=no command=quota-warning 100 john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota warning: bytes=0 (90%) messages=0 reverse=no command=quota-warning 90 john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota warning: bytes=0 (85%) messages=0 reverse=no command=quota-warning 85 john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Quota grace: root=user bytes=0 (10%)
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: dict quota: user=john@domain.com, uri=proxy::quotadict, noenforcing=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir/
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: maildir++: root=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir, alt=
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: initializing backend with data: vfile
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: acl username = john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: owner = 1
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl vfile: Global ACLs disabled
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/Shared/%Ld/%Ln
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: shared: root=/var/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: initializing backend with data: vfile
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: acl username = john@domain.com
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl: owner = 0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl vfile: Global ACLs disabled
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: quota: quota_over_flag check: STORAGE ret=0 value=577598 limit=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: quota: quota_over_flag check: MESSAGE ret=0 value=3059 limit=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: quota: quota_over_flag=0((null)) vs currently overquota=0
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl vfile: file /var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir/.Sent/dovecot-acl not found
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl vfile: file /var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir/dovecot-acl not found
Apr  5 16:00:30 kingsfoil dovecot: imap(john@domain.com): Debug: acl vfile: file /var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir/.Drafts/dovecot-acl not found
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Loading modules from directory: /usr/lib/dovecot/modules
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib01_acl_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib15_notify_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mail_log_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mailbox_alias_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib90_stats_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(job-111@domain.com): Debug: auth USER input:
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Loading modules from directory: /usr/lib/dovecot/modules
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib01_acl_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib10_quota_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib15_notify_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mail_log_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib20_mailbox_alias_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib90_sieve_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Module loaded: /usr/lib/dovecot/modules/lib90_stats_plugin.so
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: auth USER input: john@domain.com master_user=john@domain.com home=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42/ mail=maildir:~/Maildir/ quota_rule=*:bytes=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Added userdb setting: mail=maildir:~/Maildir/
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Added userdb setting: plugin/master_user=john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Added userdb setting: plugin/quota_rule=*:bytes=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Effective uid=2000, gid=2000, home=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42/
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota rule: root=user mailbox=* bytes=0 messages=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=0 (100%) messages=0 reverse=no command=quota-warning 100 john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=0 (95%) messages=0 reverse=no command=quota-warning 95 john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=0 (90%) messages=0 reverse=no command=quota-warning 90 john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=0 (85%) messages=0 reverse=no command=quota-warning 85 john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota grace: root=user bytes=0 (10%)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: dict quota: user=john@domain.com, uri=proxy::quotadict, noenforcing=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Namespace : type=private, prefix=, sep=/, inbox=yes, hidden=no, list=yes, subscriptions=yes location=maildir:~/Maildir/
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: maildir++: root=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir, index=, indexpvt=, control=, inbox=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//Maildir, alt=
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: initializing backend with data: vfile
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: acl username = john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: owner = 1
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl vfile: Global ACLs disabled
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Namespace : type=shared, prefix=Shared/%u/, sep=/, inbox=no, hidden=no, list=children, subscriptions=yes location=maildir:%Lh/Maildir/:INDEX=%Lh/Maildir/Shared/%Ld/%Ln
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: shared: root=/var/run/dovecot, index=, indexpvt=, control=, inbox=, alt=
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: initializing backend with data: vfile
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: acl username = john@domain.com
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl: owner = 0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: acl vfile: Global ACLs disabled
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: quota: quota_over_flag check: STORAGE ret=0 value=577602 limit=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: quota: quota_over_flag check: MESSAGE ret=0 value=3060 limit=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: quota: quota_over_flag=0((null)) vs currently overquota=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota root: name=user backend=dict args=:proxy::quotadict
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota rule: root=user mailbox=* bytes=1073741824 messages=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=1073741824 (100%) messages=0 reverse=no command=quota-warning 100 raw mail user
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=1020054732 (95%) messages=0 reverse=no command=quota-warning 95 raw mail user
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=966367641 (90%) messages=0 reverse=no command=quota-warning 90 raw mail user
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota warning: bytes=912680550 (85%) messages=0 reverse=no command=quota-warning 85 raw mail user
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Quota grace: root=user bytes=107374182 (10%)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: dict quota: user=raw mail user, uri=proxy::quotadict, noenforcing=0
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: none: root=, index=, indexpvt=, control=, inbox=, alt=
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Destination address: john@domain.com (source: user@hostname)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Pigeonhole version 0.4.16 (fed8554) initializing
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file storage: Storage path `/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//sieve' not found
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file storage: Failed to normalize active script directory (path=/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//sieve): Part of the path does not exist (yet)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file storage: Using Sieve script path: /var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//sieve/dovecot.sieve
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file storage: Storage path `/var/vmail/vmail1/domain.com/j/o/h/john-2018.03.23.13.04.42//sieve/dovecot.sieve' not found
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: storage: No default script location configured
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: User has no personal script
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file storage: Using Sieve script path: /var/vmail/sieve/dovecot.sieve
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: file script: Opened script `dovecot' from `/var/vmail/sieve/dovecot.sieve'
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Executed before user's personal Sieve script(1): /var/vmail/sieve/dovecot.sieve
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Mailbox stdin: Opened mail UID=1 because: header Message-ID (Cache file is unusable)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Opening script 1 of 1 from `/var/vmail/sieve/dovecot.sieve'
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Loading script /var/vmail/sieve/dovecot.sieve
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Script binary /var/vmail/sieve/dovecot.svbin successfully loaded
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: binary save: not saving binary /var/vmail/sieve/dovecot.svbin, because it is already stored
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: sieve: Executing script from `/var/vmail/sieve/dovecot.svbin'
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Mailbox stdin: Opened mail UID=1 because: header X-Spam-Flag (Cache file is unusable)
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Mailbox stdin: Opened mail UID=1 because: copying
Apr  5 16:00:31 kingsfoil dovecot: lda(john@domain.com): Debug: Mailbox stdin: Opened mail UID=1 because: virtual size (Cache file is unusable)

6

Re: mlmmj subscribe error user unknown

No error in the debug log at all (it says personal sieve filter doesn't exist, this is safe to ignore).
Did you see any log lines mention "user unknown" in DOVECOT log files?

7 (edited by sayso 2018-04-09 00:18:18)

Re: mlmmj subscribe error user unknown

Actually, yes. I missed this last night...

Apr  5 15:35:01 kingsfoil dovecot: auth: Debug: master in: USER#0111#011job-111@domain.com#011service=lda
Apr  5 15:35:01 kingsfoil dovecot: auth: Debug: ldap(job-111@domain.com): user search: base=o=domains,dc=domain,dc=tldscope=subtree filter=(&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=lda)(|(mail=job-111@domain.com)(&(enabledService=shadowaddress)(shadowAddress=job-111@domain.com)))) fields=mail,mail,homeDirectory,mailQuota
Apr  5 15:35:01 kingsfoil dovecot: auth: Debug: ldap(job-111@domain.com): no fields returned by the server
Apr  5 15:35:01 kingsfoil dovecot: auth: ldap(job-111@domain.com): unknown user
Apr  5 15:35:01 kingsfoil dovecot: lda(job-111@domain.com): Debug: auth USER input:
Apr  5 15:35:01 kingsfoil dovecot: auth: Debug: userdb out: NOTFOUND#0111

8 (edited by sayso 2018-04-09 00:18:51)

Re: mlmmj subscribe error user unknown

The DN

mail=job-111@domain.com,ou=Groups,domainName=domain.com,o=domains,dc=domain,dc=tld

exists in the directory

9

Re: mlmmj subscribe error user unknown

sayso wrote:

(&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=lda)(|(mail=job-111@domain.com)(&(enabledService=shadowaddress)(shadowAddress=job-111@domain.com))))

Try to do a LDAP query with openldap command line tool like this:

ldapsearch -x -D cn=vmail,dc=xx,dc=xx -W -b 'o=domains,dc=xx,dc=xx' "(&(objectClass=mailUser)(|(mail=job-111@domain.com)(shadowAddress=job-111@domain.com)))"

NOTE:

- You need to replace 'dc=xx,dc=xx' by the real ldap root dn. You can find it in file under /etc/postfix/ldap/.
- It will ask you to input password for 'cn=vmail,dc=xx,dc=xx'. You can find it in file under /etc/postfix/ldap/.

Show us the output of above ldapsearch command.

10 (edited by sayso 2018-04-09 00:17:34)

Re: mlmmj subscribe error user unknown

Of course. Here it is...

ldapsearch -x -D cn=vmail,dc=domain,dc=tld -W -b 'o=domains,dc=domain,dc=tld' "(&(objectClass=mailList)(|(mail=job-111@domain.com)(shadowAddress=job-111@domain.com)))"
Enter LDAP Password: XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

--CUT --
# extended LDIF
#
# LDAPv3
# base <o=domains,dc=domain,dc=tld> with scope subtree
# filter: (&(objectClass=mailList)(|(mail=job-111@domain.com)(shadowAddress=job-111@domain.com)))
# requesting: ALL
#

# job-111@domain.com, Groups, domain.com, domains, domain.tld
dn: mail=job-111@domain.com,ou=Groups,domainName=domain.com,o=domains,dc=domain,dc=tld
objectClass: mailList
mail: job-111@domain.com
mtaTransport: mlmmj:domain.com/job-111
mailingListID: 8156f0da-d7d7-4c51-86b0-0f5176c356d5
enabledService: mail
enabledService: deliver
enabledService: mlmmj
cn: Test
accessPolicy: membersonly
accountStatus: active
listAllowedUser: john@domain.com

# search result
search: 2
result: 0 Success

# numResponses: 2
# numEntries: 1
--CUT --

11

Re: mlmmj subscribe error user unknown

job-111@ is a mailing list, not mail user. This is the problem.

Postfix detects job-111@ as a mail user, and it hands over the mail to Dovecot for local deliver, obviously Dovecot cannot find this USER.

The problem is: how did you create this account 'job-111@'?

12

Re: mlmmj subscribe error user unknown

I created it using the web interface.

13

Re: mlmmj subscribe error user unknown

Did you modify /etc/dovecot/dovecot-ldap.conf? It's same as the default iRedMail setting below?
https://bitbucket.org/zhb/iredmail/src/ … -ldap.conf

Could you please show us the FULL content of this file? please remove password before pasting.

14 (edited by sayso 2018-04-09 00:15:18)

Re: mlmmj subscribe error user unknown

Looks to be the same...

hosts           = 127.0.0.1:389
ldap_version    = 3
auth_bind       = yes
dn              = cn=vmail,dc=domain,dc=tld
dnpass          = XXXXXXXXXXXXXXXXXXXXXXXXXX
base            = o=domains,dc=domain,dc=tld
scope           = subtree
deref           = never

# Below two are required by command 'doveadm mailbox ...'
iterate_attrs   = mail=user
iterate_filter  = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail))

user_filter     = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
user_attrs      = mail=master_user,mail=user,homeDirectory=home,=mail=maildir:~/Maildir/,mailQuota=quota_rule=*:bytes=%$

# Used for dn lookup
pass_filter     = (&(objectClass=mailUser)(accountStatus=active)(!(domainStatus=disabled))(enabledService=mail)(enabledService=%Ls%Lc)(|(mail=%u)(&(enabledService=shadowaddress)(shadowAddress=%u))))
pass_attrs      = mail=user,userPassword=password,allowNets=allow_nets
default_pass_scheme = CRYPT

15

Re: mlmmj subscribe error user unknown

Please show us output of commands below:

cd /etc/postfix/ldap/
for cf in $(ls); do echo $cf; do postmap -q job-111@domain.com ldap:./$cf; done

16

Re: mlmmj subscribe error user unknown

I had to remove the second 'do' statement to get it to run:

root@kingsfoil:/etc/postfix/ldap# for cf in $(ls); do echo $cf;  postmap -q job-111@domain.com ldap:./$cf; done
catchall_maps.cf
recipient_bcc_maps_domain.cf
recipient_bcc_maps_user.cf
relay_domains.cf
sender_bcc_maps_domain.cf
sender_bcc_maps_user.cf
sender_dependent_relayhost_maps_domain.cf
sender_dependent_relayhost_maps_user.cf
sender_login_maps.cf
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
job-111@domain.com
virtual_group_members_maps.cf
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf

17

Re: mlmmj subscribe error user unknown

sayso wrote:

virtual_group_maps.cf
job-111@domain.com

Postfix found it as a mailing list.

Could you please try to send a new email to job-111@? I wonder what error you will get. Everything looks just fine.

18

Re: mlmmj subscribe error user unknown

Bounces as user unknown...

Apr  9 07:17:39 kingsfoil postfix/postscreen[12028]: CONNECT from [127.0.0.1]:35740 to [127.0.0.1]:25
Apr  9 07:17:39 kingsfoil postfix/postscreen[12028]: WHITELISTED [127.0.0.1]:35740
Apr  9 07:17:39 kingsfoil postfix/smtpd[12029]: connect from localhost[127.0.0.1]
Apr  9 07:17:39 kingsfoil postfix/smtpd[12029]: 3CD7920A7B: client=localhost[127.0.0.1]
Apr  9 07:17:39 kingsfoil postfix/cleanup[12032]: 3CD7920A7B: message-id=<f36-5acb4c00-45-42cad180@201579335>
Apr  9 07:17:39 kingsfoil postfix/smtpd[12029]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  9 07:17:39 kingsfoil postfix/qmgr[11981]: 3CD7920A7B: from=<john@domain.com>, size=937, nrcpt=1 (queue active)
Apr  9 07:17:39 kingsfoil amavis[1073]: (01073-08) NOTICE: reconnecting in response to: err=2006, HY000, DBD::mysql::st execute failed: MySQL server has gone away at (eval 109) line 172.
Apr  9 07:17:40 kingsfoil postfix/10025/smtpd[12037]: connect from localhost[127.0.0.1]
Apr  9 07:17:40 kingsfoil postfix/10025/smtpd[12037]: 54D5020EA1: client=localhost[127.0.0.1]
Apr  9 07:17:40 kingsfoil postfix/cleanup[12032]: 54D5020EA1: message-id=<f36-5acb4c00-45-42cad180@201579335>
Apr  9 07:17:40 kingsfoil postfix/10025/smtpd[12037]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  9 07:17:40 kingsfoil postfix/qmgr[11981]: 54D5020EA1: from=<john@domain.com>, size=2190, nrcpt=1 (queue active)
Apr  9 07:17:40 kingsfoil amavis[1073]: (01073-08) Passed CLEAN {RelayedInternal}, MYNETS LOCAL [127.0.0.1]:35740 <john@domain.com> -> <job-111@domain.com>, Queue-ID: 3CD7920A7B, Message-ID: <f36-5acb4c00-45-42cad180@201579335>, mail_id: 16W3CfFiDMoS, Hits: -0.999, size: 937, queued_as: 54D5020EA1, dkim_new=dkim:domain.com, 1004 ms, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001]
Apr  9 07:17:40 kingsfoil postfix/amavis/smtp[12033]: 3CD7920A7B: to=<job-111@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.2, delays=0.11/0.01/0.22/0.85, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 54D5020EA1)
Apr  9 07:17:40 kingsfoil postfix/qmgr[11981]: 3CD7920A7B: removed
Apr  9 07:17:40 kingsfoil postfix/pipe[12038]: 54D5020EA1: to=<job-111@domain.com>, relay=dovecot, delay=0.05, delays=0.01/0.01/0/0.03, dsn=5.1.1, status=bounced (user unknown)
Apr  9 07:17:40 kingsfoil postfix/cleanup[12032]: 60B7420EB3: message-id=<20180409111740.60B7420EB3@kingsfoil.domain.tld>
Apr  9 07:17:40 kingsfoil postfix/bounce[12040]: 54D5020EA1: sender non-delivery notification: 60B7420EB3
Apr  9 07:17:40 kingsfoil postfix/qmgr[11981]: 60B7420EB3: from=<>, size=4044, nrcpt=1 (queue active)
Apr  9 07:17:40 kingsfoil postfix/qmgr[11981]: 54D5020EA1: removed
Apr  9 07:17:40 kingsfoil postfix/pipe[12038]: 60B7420EB3: to=<john@domain.com>, relay=dovecot, delay=0.05, delays=0.01/0/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr  9 07:17:40 kingsfoil postfix/qmgr[11981]: 60B7420EB3: removed

19

Re: mlmmj subscribe error user unknown

Hi,

i ran into the same issue. Finally i fixed it.

Change the file /etc/postfix/ldap/transport_maps_user.cf like this:

search_base = domainName=%d,o=domains,dc=xxx,dc=xxx
scope = sub

The values i had:

search_base = ou=Users,domainName=%d,o=domains,dc=xxx,dc=xxx
scope = one

Hope this helps.

20

Re: mlmmj subscribe error user unknown

Thank you! Almost there...  I was able to email job-111@<domain> however, replying to the subscription, 17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com , did not work (see second block of code).

Success delivering to job-111@

Apr  9 13:07:35 kingsfoil postfix/postscreen[14442]: CONNECT from [127.0.0.1]:52140 to [127.0.0.1]:25
Apr  9 13:07:35 kingsfoil postfix/postscreen[14442]: WHITELISTED [127.0.0.1]:52140
Apr  9 13:07:35 kingsfoil postfix/smtpd[14443]: connect from localhost[127.0.0.1]
Apr  9 13:07:35 kingsfoil postfix/smtpd[14443]: 72FB520CDF: client=localhost[127.0.0.1]
Apr  9 13:07:35 kingsfoil postfix/cleanup[14446]: 72FB520CDF: message-id=<309-5acb9e00-1b-637bea80@109263260>
Apr  9 13:07:35 kingsfoil postfix/qmgr[14371]: 72FB520CDF: from=<john@domain.com>, size=976, nrcpt=1 (queue active)
Apr  9 13:07:35 kingsfoil postfix/smtpd[14443]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: connect from localhost[127.0.0.1]
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: 16CFD20CF3: client=localhost[127.0.0.1]
Apr  9 13:07:36 kingsfoil postfix/cleanup[14446]: 16CFD20CF3: message-id=<309-5acb9e00-1b-637bea80@109263260>
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  9 13:07:36 kingsfoil postfix/qmgr[14371]: 16CFD20CF3: from=<john@domain.com>, size=2229, nrcpt=1 (queue active)
Apr  9 13:07:36 kingsfoil amavis[1064]: (01064-01) Passed CLEAN {RelayedInternal}, MYtldS LOCAL [127.0.0.1]:52140 <john@domain.com> -> <job-111@domain.com>, Queue-ID: 72FB520CDF, Message-ID: <309-5acb9e00-1b-637bea80@109263260>, mail_id: YircYxORBr2g, Hits: -0.999, size: 976, queued_as: 16CFD20CF3, dkim_new=dkim:domain.com, 579 ms, Tests: [ALL_TRUSTED=-1,HTML_MESSAGE=0.001]
Apr  9 13:07:36 kingsfoil postfix/amavis/smtp[14447]: 72FB520CDF: to=<job-111@domain.com>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.7, delays=0.1/0.01/0.01/0.59, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 16CFD20CF3)
Apr  9 13:07:36 kingsfoil postfix/qmgr[14371]: 72FB520CDF: removed
Apr  9 13:07:36 kingsfoil postfix/pipe[14453]: 16CFD20CF3: to=<job-111@domain.com>, relay=mlmmj, delay=0.09, delays=0.01/0.01/0/0.07, dsn=2.0.0, status=sent (delivered via mlmmj service)
Apr  9 13:07:36 kingsfoil postfix/qmgr[14371]: 16CFD20CF3: removed
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: connect from localhost[127.0.0.1]
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: 67B2A20CF3: client=localhost[127.0.0.1]
Apr  9 13:07:36 kingsfoil postfix/cleanup[14446]: 67B2A20CF3: message-id=<1523293656-14459-mlmmj-73eabeee@domain.com>
Apr  9 13:07:36 kingsfoil postfix/10025/smtpd[14452]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5
Apr  9 13:07:36 kingsfoil postfix/qmgr[14371]: 67B2A20CF3: from=<job-111+bounces-help@domain.com>, size=4843, nrcpt=1 (queue active)
Apr  9 13:07:36 kingsfoil amavis[1065]: (01065-01) Passed CLEAN {RelayedInternal}, MLMMJ LOCAL [127.0.0.1] <job-111+bounces-help@domain.com> -> <john@domain.com>, Message-ID: <1523293656-14459-mlmmj-73eabeee@domain.com>, mail_id: a17UQeFGgmjJ, Hits: -, size: 3819, queued_as: 67B2A20CF3, dkim_new=dkim:domain.com, 131 ms
Apr  9 13:07:36 kingsfoil postfix/pipe[14461]: 67B2A20CF3: to=<john@domain.com>, relay=dovecot, delay=0.06, delays=0.01/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr  9 13:07:36 kingsfoil postfix/qmgr[14371]: 67B2A20CF3: removed

Fail replying to subscription ( 17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com )

Apr  9 13:08:52 kingsfoil postfix/postscreen[14442]: CONNECT from [127.0.0.1]:52334 to [127.0.0.1]:25
Apr  9 13:08:52 kingsfoil postfix/postscreen[14442]: WHITELISTED [127.0.0.1]:52334
Apr  9 13:08:52 kingsfoil postfix/smtpd[14443]: connect from localhost[127.0.0.1]
Apr  9 13:08:52 kingsfoil postfix/smtpd[14443]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<john@domain.com> to=<17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com> proto=ESMTP helo=<localhost>
Apr  9 13:08:52 kingsfoil postfix/smtpd[14443]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4

21

Re: mlmmj subscribe error user unknown

And the bounce from mlmmj


Hi, this is the Mlmmj program managing the <job-111@domain.com> mailing
list.

The message from <john@domain.com> with subject "Test four" was unable to be
delivered to the list because you are not a list subscriber.

If you wish to become a subscriber, you will need to contact a list
administrator. You can email <job-111+owner@domain.com> to contact the list
owner.

If you believe you are a subscriber, you are probably subscribed with a
different email address. To find out which address you are subscribed with,
refer to the message welcoming you to the list, or look at the envelope
"Return-Path" header of a message you receive from the list.

(The denied message is below.)

22

Re: mlmmj subscribe error user unknown

What backend_* values do you have in /opt/mlmmjadmin/settings.py?

23

Re: mlmmj subscribe error user unknown

This

backend_api = "bk_none"
backend_cli = "bk_iredmail_ldap"

24

Re: mlmmj subscribe error user unknown

I've tried it both ways. The tutorial seems to be backwards but I went with it anyway. I meant to ask about it before now.

It is having problem recognizing the address extension after the + sign.

Apr  9 15:02:01 kingsfoil postfix/smtpd[19777]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com>: Recipient address rejected: User unknown in virtual mailbox table; from=<john@domain.com> to=<17.050+confsub-62a7c9e00171f400-john=domain.com@domain.com> proto=ESMTP helo=<localhost>
Apr  9 15:02:01 kingsfoil postfix/smtpd[19777]: disconnect from localhost[127.0.0.1] ehlo=1 mail=1 rcpt=0/1 quit=1 commands=3/4

25 (edited by sayso 2018-04-10 03:15:48)

Re: mlmmj subscribe error user unknown

Hmm... I set my backends to "bk_iredmail_ldap" and created a new list.. subscription works. I'm going to delete the original Job-111@... and continue on. The tutuorial should be reviewed.