1

Topic: error while adding user to alias-mailinglist

======== Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.4
- Linux/BSD distribution name and version: CentOS release 6.7
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL 5.1
- Web server (Apache or Nginx): Apache 2.2
- Manage mail accounts with iRedAdmin-Pro? iRedAdmin-Pro-SQL-2.3.1
- Related log if you're reporting an issue:
====

Hello, we've an errore while adding user to alias-mailinglist as user only (not tryed as moderator).
We've attached the log from webserver.

Thanks Mattia

----

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

2

Re: error while adding user to alias-mailinglist

No log attached?

3

Re: error while adding user to alias-mailinglist

I have the same problem or an equal problem. I can add all addresses to an alias account but addresses from the same domain.

For example

myname@mydonain.com  -> to alias  myalias@mydonain.com doesn't work
myname@otherdonain.com  -> to alias  myalias@mydonain.com works

The logfiles seem to look okay and I get an 'success' message too. To which logfile do refer to? Anything else I can do?

Regards
J.

4

Re: error while adding user to alias-mailinglist

Any related error message/log?

5 (edited by BigJens 2016-02-05 03:07:50)

Re: error while adding user to alias-mailinglist

here is var/log/messages

Feb  4 19:56:19 pepper uwsgi: pepper.mailserver.net [pid: 29109|app: 0|req: 953/953] 91.89.239.221 () {52 vars in 1070 bytes} [Thu Feb  4 19:56:19 2016] GET /iredadmin/users/jens-consulting.net => generated 33858 bytes in 725 msecs (HTTP/1.1 200) 1 headers in 121 bytes (2 switches on core 0)
Feb  4 19:56:27 pepper uwsgi: pepper.mailserver.net [pid: 29109|app: 0|req: 954/954] 91.89.239.221 () {52 vars in 1057 bytes} [Thu Feb  4 19:56:26 2016] GET /iredadmin/aliases/jens-consulting.net => generated 30665 bytes in 673 msecs (HTTP/1.1 200) 1 headers in 121 bytes (2 switches on core 0)
Feb  4 19:56:31 pepper uwsgi: pepper.mailserver.net [pid: 29109|app: 0|req: 955/955] 91.89.239.221 () {52 vars in 1111 bytes} [Thu Feb  4 19:56:30 2016] GET /iredadmin/profile/alias/general/jens@jens-consulting.net => generated 19498 bytes in 686 msecs (HTTP/1.1 200) 1 headers in 121 bytes (2 switches on core 0)
Feb  4 19:56:35 pepper uwsgi: pepper.mailserver.net [pid: 29109|app: 0|req: 956/956] 91.89.239.221 () {60 vars in 1323 bytes} [Thu Feb  4 19:56:35 2016] POST /iredadmin/profile/alias/general/jens@jens-consulting.net => generated 0 bytes in 68 msecs (HTTP/1.1 303) 3 headers in 268 bytes (2 switches on core 0)
Feb  4 19:56:36 pepper uwsgi: pepper.mailserver.net [pid: 29109|app: 0|req: 957/957] 91.89.239.221 () {54 vars in 1191 bytes} [Thu Feb  4 19:56:35 2016] GET /iredadmin/profile/alias/general/jens@jens-consulting.net?msg=UPDATED => generated 19725 bytes in 688 msecs (HTTP/1.1 200) 1 headers in 121 bytes (2 switches on core 0)

And this is how the admin panel looks like: Screenshot admin panel

This only happens for me with one mailaddress (jens@jens-consulting.net used in this example), it doesn't happen with stan@laurel.net for example.

Any ideas?

TIA J.

6

Re: error while adding user to alias-mailinglist

There's no error message in pasted logs.

@BigJens: did you create jens@jens-consulting.ne manually during migration from old mail server, or with iRedAdmin-Pro?

7

Re: error while adding user to alias-mailinglist

Sorry for the delay, here is the log:

----
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X] Traceback (most recent call last):
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return self.handle()
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return self._delegate(fn, self.fvars, args)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return handle_class(cls)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return tocall(*args)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/controllers/decorators.py", line 61, in decorated
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return f(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return func(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/controllers/sql/alias.py", line 205, in POST
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     form=form)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return func(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/alias.py", line 352, in update
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     moderators_in_domain += stripped_members[i.username]
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X] KeyError: u'mail@address.com'
----

I've tried to change

"moderators_in_domain += stripped_members[i.username]"

with

"moderators_in_domain += stripped_moderators[i.username]"

but nothing has changed sad

Thanks, Mattia

8

Re: error while adding user to alias-mailinglist

mattia.bitservice wrote:

Sorry for the delay, here is the log:

----
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X] Traceback (most recent call last):
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 239, in process
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return self.handle()
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 230, in handle
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return self._delegate(fn, self.fvars, args)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 420, in _delegate
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return handle_class(cls)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/usr/lib/python2.6/site-packages/web/application.py", line 396, in handle_class
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return tocall(*args)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/controllers/decorators.py", line 61, in decorated
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return f(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return func(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/controllers/sql/alias.py", line 205, in POST
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     form=form)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/decorators.py", line 26, in proxyfunc
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     return func(*args, **kw)
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]   File "/var/www/iredadmin/libs/sqllib/alias.py", line 352, in update
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X]     moderators_in_domain += stripped_members[i.username]
[Wed Feb 03 14:42:02 2016] [error] [client X.X.X.X] KeyError: u'mail@address.com'
----

I've tried to change

"moderators_in_domain += stripped_members[i.username]"

with

"moderators_in_domain += stripped_moderators[i.username]"

but nothing has changed sad

Thanks, Mattia

This is correct change, did you restart Apache service to reload modified code? It's required.

9

Re: error while adding user to alias-mailinglist

Now that it looks like two different problems, I'm sorry that  I hijacked this topic here. Sorry guys! Should I open a new one?

ZhangHuangbin wrote:

@BigJens: did you create jens@jens-consulting.ne manually during migration from old mail server, or with iRedAdmin-Pro?

Yes! It was done manually during a migration.

10

Re: error while adding user to alias-mailinglist

BigJens wrote:

Sorry guys! Should I open a new one?

You should always create a new forum topic for your own issue.

BigJens wrote:

Yes! It was done manually during a migration.

Usually this issue was caused by improper migration, for example, missed some columns/values, or even some sql record. You can try to remove this account then re-create it.

11

Re: error while adding user to alias-mailinglist

ZhangHuangbin wrote:

This is correct change, did you restart Apache service to reload modified code? It's required.

After the restart it works! Great! big_smile