1 (edited by cmastro84 2016-01-28 04:35:55)

Topic: The alias doesn't work since upgrade iRedMail-0.8.6 to iRedMail-0.9.4

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

Hi,

I have upgrade from iRedMail-0.8.6 to iRedMail-0.9.4, and the Alias stop working.

I need to create an alias from "user@example.com" to "user@test.com".

I try with different methods but in all cases get this error:
"postfix/smtpd[13931]: NOQUEUE: reject: RCPT from mail-io0-f172.google.com[209.85.223.172]: 554 5.7.1 <user@example.com>: Relay access denied; from=<prueba@gmail.com> to=<user@example.com> proto=ESMTP helo=<mail-io0-f172.google.com>

Obviously "user@example.com", "user@test.com" and "prueba@gmail.com" are mails for the forum. I'm using existing emails accounts.

The methods I have used to create alias are:

1) INSERT INTO alias (address, goto, is_alias, alias_to, domain) VALUES ('user@example.com', 'user@test.com', 1, 'user@test.com', 'test.com');

2) INSERT INTO alias (address, goto, domain, islist)
     VALUES ('user@example.com', 'user@test.com', 'test.com', 1);

3) INSERT INTO alias (address, goto, domain, islist)
     VALUES ('user@example.com', 'user@test.com', 'example.com', 1);


Another update about this problem is:

If I execute "postmap -q 'user@example.com' mysql:/etc/postfix/mysql/virtual_alias_maps.cf" and I get empty result.

But if I execute manually the query of virtual_alias_maps.cf: "SELECT alias.goto FROM alias,domain WHERE alias.address='%s' AND alias.domain='%d' AND alias.domain=domain.domain AND alias.active=1 AND domain.backupmx=0 AND domain.active=1"

%s = user@example.com
%d = test.com

I get the correct "goto" = user@test.com

PD: My english is not good! I apologize about that and I hope you understand me!

Anyone can help me?

Thanks!
Best Regards,
    Cristian.

----

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

2

Re: The alias doesn't work since upgrade iRedMail-0.8.6 to iRedMail-0.9.4

cmastro84 wrote:

The methods I have used to create alias are:
1) INSERT INTO alias (address, goto, is_alias, alias_to, domain) VALUES ('user@example.com', 'user@test.com', 1, 'user@test.com', 'test.com');

This is correct.
Are both user@example.com and user@test.com hosted on your server?

3

Re: The alias doesn't work since upgrade iRedMail-0.8.6 to iRedMail-0.9.4

ZhangHuangbin wrote:
cmastro84 wrote:

The methods I have used to create alias are:
1) INSERT INTO alias (address, goto, is_alias, alias_to, domain) VALUES ('user@example.com', 'user@test.com', 1, 'user@test.com', 'test.com');

This is correct.
Are both user@example.com and user@test.com hosted on your server?


example.com and test.com are hosted on the same server

user@test.com is an user from test.com

user@example.com doesn't exist as user from example.com, because it is an alias. And if I try to create the user, I get this error: "Error: Mail address already exists, please choose another one."

4

Re: The alias doesn't work since upgrade iRedMail-0.8.6 to iRedMail-0.9.4

cmastro84 wrote:

If I execute "postmap -q 'user@example.com' mysql:/etc/postfix/mysql/virtual_alias_maps.cf" and I get empty result.

Could you please show us FULL output of command below:

postmap -v -q 'user@example.com' mysql:/etc/postfix/mysql/virtual_alias_maps.cf

Warning: we need the '-v' argument to turn on debug/verbose mode.

*) Please pay close attention to the SQL command displayed in output, try to run it manually, does the sql command return any result?

*) Please also show us output of SQL command below:

sql> USE vmail;
sql> SELECT * FROM alias WHERE address='user@example.com' LIMIT 1 \G