1

Topic: Two separate options for aliases?

==== Required information ====
- iRedMail version: 0.8.3
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): LDAP
- Linux/BSD distribution name and version: Ubuntu 12.04
- Related log if you're reporting an issue:
====

I would like to get a clarification on mail aliases in the iRedAdminPro admin panel.

it seems that there are two separate options to create mail aliases:

1. Select a domain and display a user. Then click on the Aliases tab.
    It says here:
        Emails sent to alias accounts will be delivered to user xxxxxx
    So essentially, this constitutes forwarding to an existing mail address.

2. Display a domain profile, and click on the blue "Mail Aliases" link at the top.
    Here you can add a new alias, and then you can add "members", which are
    the destination e-mail address for any mail sent to the alias.
    In such case, the alias e-mail does not exist as a mailbox in the same way
    as a "user".

While I do understand the concept behind this, it does not always work the way I expect
it if if I use option 1.

I have added a few alias mails (which aren't addresses
of existing users) to the mail box of an existing user per option 1 above.

If I then send a mail to any of these "aliases", my SMTP server (another server) fails to send it
and reports back "user unknown".

The awkward thing is that for some forwards added this way it works, for some it does not.
Is there any additional condition, which I may have set unknowingly?

----

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

2

Re: Two separate options for aliases?

"user unknown" means Postfix cannot find this user via LDAP queries. If this error occurs, please export LDIF data of this user/alias to help troubleshoot.

3

Re: Two separate options for aliases?

Here is the LDIF for that user. It is a user account with a mailbox:

dn: mail=xxxyyy@mydomain.com,ou=Users,domainName=mydomain.com,o=domains,dc=mx1,dc=mydomain,dc=com
accountStatus: active
amavisLocal: TRUE
cn: User Name
enabledService: mail
enabledService: internal
enabledService: doveadm
enabledService: lib-storage
enabledService: smtp
enabledService: smtpsecured
enabledService: imap
enabledService: imapsecured
enabledService: deliver
enabledService: forward
enabledService: shadowaddress
enabledService: managesieve
enabledService: managesievesecured
enabledService: recipientbcc
enabledService: senderbcc
enabledService: displayedInGlobalAddressBook
enabledService: sieve
enabledService: sievesecured
enabledService: lda
homeDirectory: /maildisk/vmail1/mydomain2.dk/x/x/x/xxxyyy-2013.02.23.18.43.32/
mail: xxxyyy@mydomain2.dk
mailMessageStore: vmail1/mydomain2.dk/x/x/x/xxxyyy-2013.02.23.18.43.32/
mailQuota: 104857600
objectClass: inetOrgPerson
objectClass: mailUser
objectClass: shadowAccount
objectClass: amavisAccount
shadowLastChange: 0
sn: xxxyyy
storageBaseDirectory: /maildisk/
uid: xxxyyy
userPassword: {SSHA}.....

4

Re: Two separate options for aliases?

Could you please paste output of below command to help troubleshoot:

# cd /etc/postfix/ldap/
# for cf in $(ls *.cf); do echo ${cf}; postmap -q xxxyyy@mydomain.com ldap:./${cf}; done

Replace 'xxxyyy@mydomain.com' by the real email address which has problem.

5

Re: Two separate options for aliases?

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_login_maps.cf
koljah@newerapublications.dk
transport_maps_domain.cf
transport_maps_user.cf
virtual_alias_maps.cf
virtual_group_maps.cf
virtual_group_members_maps.cf
xxxyyy@mydomain.com
virtual_mailbox_domains.cf
virtual_mailbox_maps.cf
vmail1/mydomain.com/x/x/x/xxxyyy-2013.02.23.18.43.32//Maildir/

6

Re: Two separate options for aliases?

Output looks fine. It should work as expected. Could you please try again?

7

Re: Two separate options for aliases?

Comparing this output to what I get on other mail boxes shows that the above address is simply a normal mailbox.
I had it set up as an alias before (using option 1 above). Then removed that alias as it didn't seem to work.
The problem was there all the time, also after removing that alias.

Seems that it's not related to aliases then at all.
Right now I can send mail to this address from a normal client. I could not earlier, though I changed nothing.

The error comes ALWAYS when a specific PHP script sends mail to this address - then the iRedMail server reports back to the SMTP of the server running the script "stat=user unknown." The script works fine and has been for quite a while, and it does send mails to 2 addresses at the same time, the 2nd one of which does receive it every time.

Do I have to just recreate that mailbox and that's it?

8

Re: Two separate options for aliases?

Weird, no idea yet. sad

Could you please run commands in my 2nd post when it reports "user unknow" and paste the output here?