1 (edited by le_jax 2011-04-12 00:07:07)

Topic: iRedMail 0.7.0 and mail alias

Hello folks,

I try to create mail aliases using the tutorial <http://www.iredmail.org/wiki/index.php? … pLDAPadmin>

My alias is created but I cannont sent with. Note that I can received mail by this alias.

In /var/log/mail.log I found:

<alias@example.com>: Sender address rejected: not owned by user mail@example.com.

I cannot connect to roundcube with this alias. I can connect with my regular email adresse.

Something strange, when I send a mail to thos alias from google mail, the mail is correctly delivered to the regular email address, but the server sent a Mail Delivery Error to my google account:

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

What can I do to make this feature work? What to you think about the Mail Delivery Error?

Thanks in advance,
Jacques

----

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

2

Re: iRedMail 0.7.0 and mail alias

le_jax wrote:

<alias@example.com>: Sender address rejected: not owned by user mail@example.com.

You should remove 'reject_sender_login_mismatch' from postfix setting smtpd_sender_restrictions.
Search 'reject_sender_login_mismatch' in this forum will give you more detail.

I cannot connect to roundcube with this alias. I can connect with my regular email adresse.

This is correct. Mail Alias is not a user.

Something strange, when I send a mail to thos alias from google mail, the mail is correctly delivered to the regular email address, but the server sent a Mail Delivery Error to my google account:

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

Please post the whole error message, you didn't post the most important error message.

Also, it's highly recommended to manage mail accounts (includes mail alias) with iRedAdmin-Pro.
- Features: http://www.iredmail.org/admin_panel.html

3

Re: iRedMail 0.7.0 and mail alias

Hello,

I removed the reject_sender_login_mismatch. Now the messages are delivered, but the sender still received the not delivered message

I add a catchall in /etc/postifx/virtual but it seems to not work.
In smtpd_recipient_restricgtions I found reject_unlisted_recipient which should not be true because of the catchall

There is the full error message received by the sender.

This is the mail system at host mail.example.net.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                  The mail system

<livre@example.net>: user unknown

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


---------- Message transféré ----------
From: Jacques Foucry <jfoucry@gmail.com>
To: livre <livre@example.net>
Date: Thu, 14 Apr 2011 17:25:23 +0200
Subject: test
test

And the log :

Apr 14 17:22:33 mail postfix-policyd: rcpt=1044, whitelist=bypass, host=209.85.215.43 (mail-ew0-f43.google.com), from=jfoucry@gmail.com, to=livre@example.net, size=0
Apr 14 17:22:33 mail postfix/smtpd[4170]: A9A3E850B: client=mail-ew0-f43.google.com[209.85.215.43]
Apr 14 17:22:33 mail postfix/cleanup[4174]: A9A3E850B: message-id=<BANLkTik=cvbuVyki_LwQY-2MAD5tp4E6DA@mail.gmail.com>
Apr 14 17:22:33 mail postfix/qmgr[12495]: A9A3E850B: from=<jfoucry@gmail.com>, size=1887, nrcpt=2 (queue active)
Apr 14 17:22:34 mail postfix/smtpd[4178]: connect from localhost.localdomain[127.0.0.1]
Apr 14 17:22:34 mail postfix/smtpd[4178]: 9491C850C: client=localhost.localdomain[127.0.0.1]
Apr 14 17:22:34 mail postfix/cleanup[4174]: 9491C850C: message-id=<BANLkTik=cvbuVyki_LwQY-2MAD5tp4E6DA@mail.gmail.com>
Apr 14 17:22:34 mail postfix/qmgr[12495]: 9491C850C: from=<jfoucry@gmail.com>, size=2484, nrcpt=2 (queue active)
Apr 14 17:22:34 mail postfix/smtpd[4178]: disconnect from localhost.localdomain[127.0.0.1]
Apr 14 17:22:34 mail amavis[4106]: (04106-18) Passed CLEAN, LOCAL [209.85.215.43] [209.85.215.43] <jfoucry@gmail.com> -> <jacques@example.net>,<livre@example.net>, Message-ID: <BANLkTik=cvbuVyki_LwQY-2MAD5tp4E6DA@mail.gmail.com>, mail_id: K4cuD+4vlAY5, Hits: -110.798, size: 1887, queued_as: 9491C850C, dkim_id=@gmail.com,jfoucry@gmail.com, 923 ms
Apr 14 17:22:34 mail postfix/pipe[4180]: 9491C850C: to=<livre@example.net>, relay=dovecot, delay=0.23, delays=0.07/0.06/0/0.1, dsn=5.1.1, status=bounced (user unknown)
Apr 14 17:22:34 mail postfix/smtp[4175]: A9A3E850B: to=<jacques@example.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.2, delays=0.17/0.01/0.01/1.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04106-18, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9491C850C)
Apr 14 17:22:34 mail postfix/smtp[4175]: A9A3E850B: to=<livre@example.net>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.2, delays=0.17/0.01/0.01/1.1, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=04106-18, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 9491C850C)
Apr 14 17:22:34 mail postfix/qmgr[12495]: A9A3E850B: removed
Apr 14 17:22:35 mail postfix/pipe[4179]: 9491C850C: to=<jacques@example.net>, relay=dovecot, delay=0.51, delays=0.07/0.03/0/0.4, dsn=2.0.0, status=sent (delivered via dovecot service)
Apr 14 17:22:35 mail postfix/cleanup[4174]: 1B2C3850B: message-id=<20110414152235.1B2C3850B@mail.example.net>
Apr 14 17:22:35 mail postfix/qmgr[12495]: 1B2C3850B: from=<>, size=4269, nrcpt=1 (queue active)
Apr 14 17:22:35 mail postfix/bounce[4183]: 9491C850C: sender non-delivery notification: 1B2C3850B
Apr 14 17:22:35 mail postfix/qmgr[12495]: 9491C850C: removed
Apr 14 17:22:37 mail postfix/smtp[4184]: 1B2C3850B: to=<jfoucry@gmail.com>, relay=gmail-smtp-in.l.google.com[209.85.143.27]:25, delay=2, delays=0.05/0.02/0.42/1.5, dsn=2.0.0, status=sent (250 2.0.0 OK 1302794727 q3si3179968weh.190)
Apr 14 17:22:37 mail postfix/qmgr[12495]: 1B2C3850B: removed
Apr 14 17:23:03 mail postfix/smtpd[4170]: disconnect from mail-ew0-f43.google.com[209.85.215.43]

Thanks for your help,

Jacques

4

Re: iRedMail 0.7.0 and mail alias

le_jax wrote:

I add a catchall in /etc/postifx/virtual but it seems to not work.

Did you list this file in posrfix main.cf? it's not used in iRedMail be default.

le_jax wrote:

In smtpd_recipient_restricgtions I found reject_unlisted_recipient which should not be true because of the catchall

This setting is correct.
You can create catchall account in LDAP. Sample LDIF data of catch-all account:

dn: mail=@borkh.net,ou=Users,domainName=borkh.net,o=domains,dc=iredmail,dc=org
accountstatus: active
cn: Catch-all account
mail: @borkh.net
mailforwardingaddress: user01@example.com
mailforwardingaddress: user02@example.com
objectclass: inetOrgPerson
objectclass: mailUser
sn: Catch-all account
uid: catchall

It's highly recommended to manage iRedMail with iRedAdmin-Pro, you can try our demo here:
http://demo.iredmail.org/

Screenshot of create catch-all account in iRedAdmin-Pro-LDAP:
http://screenshots.iredmail.googlecode.com/hg/iredadmin/domain_profile_catchall.png

5

Re: iRedMail 0.7.0 and mail alias

Hi,

Yes, I listed /etc/postfix/virtual in the virtual_alias_maps statement, at the end:

virtual_alias_maps = proxy:ldap:/etc/postfix/ldap/virtual_alias_maps.cf, proxy:ldap:/etc/postfix/ldap/virtual_group_maps.cf, proxy:ldap:/etc/postfix/ldap/sender_login_maps.cf, proxy:ldap:/etc/postfix/ldap/catchall_maps.cf, hash:/etc/postfix/virtual

And I do the postmap th create the binary indexed file.

Jacques

6

Re: iRedMail 0.7.0 and mail alias

Apr 14 17:22:34 mail amavis[4106]: (04106-18) Passed CLEAN, LOCAL [209.85.215.43] [209.85.215.43] <jfoucry@gmail.com> -> <jacques@example.net>,<livre@example.net>, Message-ID: <BANLkTik=cvbuVyki_LwQY-2MAD5tp4E6DA@mail.gmail.com>, mail_id: K4cuD+4vlAY5, Hits: -110.798, size: 1887, queued_as: 9491C850C, dkim_id=@gmail.com,jfoucry@gmail.com, 923 ms
Apr 14 17:22:34 mail postfix/pipe[4180]: 9491C850C: to=<livre@example.net>, relay=dovecot, delay=0.23, delays=0.07/0.06/0/0.1, dsn=5.1.1, status=bounced (user unknown)

I find the root cause.

iRedMail uses dovecot-lda as MDA (mail deliver agent), since you create accounts in static file, it can't find these accounts.

There're several ways to solve this issue:

*) Add a static userdb/passdb in dovecot.conf, so that lda can find these users.
*) Config postfix to use transport  'virtual' instead of 'dovecot' (it's default in iRedMail).
*) Create mail accounts (user, alias, mail list) in LDAP. Personally, i recommend this way for better management.

7

Re: iRedMail 0.7.0 and mail alias

I find the root cause.

iRedMail uses dovecot-lda as MDA (mail deliver agent), since you create accounts in static file, it can't find these accounts.

Brillant !

There're several ways to solve this issue:

*) Add a static userdb/passdb in dovecot.conf, so that lda can find these users.
*) Config postfix to use transport  'virtual' instead of 'dovecot' (it's default in iRedMail).
*) Create mail accounts (user, alias, mail list) in LDAP. Personally, i recommend this way for better management.

I will implemente the LDAP catchall as you suggest before.

Thank your very much for your help.

Jacques

8

Re: iRedMail 0.7.0 and mail alias

Hello again,

I created the LDIF catchall file and import it into my LDAP. I reloaded postfix, but it still does not work as expected for reception.

In fact the mail is delivered but the Undelivered Mail Returned to Sender alert is send too.

Jacques