Mailserv 5.5

115 views
Skip to first unread message

Daniel

unread,
Feb 2, 2015, 9:02:51 AM2/2/15
to mail...@googlegroups.com
Hi,

last Year i installed OpenBSD 5.5 with Mailserv -devel. My problem ist that the Dashboard shows red php, Nginx and Memcached. I can send and receive mails, can create domains but when i want to create a new user comes the following message:

Request Failed (code 500, Internal Error)

What can i do?

Thanks

David Gnojek

unread,
Feb 16, 2015, 6:33:41 AM2/16/15
to mail...@googlegroups.com
Hi Daniel,
my apologize for a delay.

 + the php, nginx "LEDS" has been fixed in this patch https://github.com/mailserv/mailserv/commit/e65560484343634b714f6372598d8bfc106e1182
memcache LED I removed from dashboard.
Download and replace these two files: admin/lib/mailserver.rb and admin/app/views/dashboard/_process_stats.html.erb from current 5.5-devel branch.

+ about the second issue. what shows log when you create new user: /var/mailserv/admin/log/production.log. 
how about mysql database is ok? check with #mysqlcheck  -c --all-databases


Cheers
David

--
You received this message because you are subscribed to the Google Groups "mailserv" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mailserv+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Daniel

unread,
Feb 25, 2015, 1:10:35 PM2/25/15
to mail...@googlegroups.com
Hi, thanks for your answer.

production.log shows:
Processing UsersController#create (for 79.208.95.54 at 2015-02-25 19:05:46) [POST]
  Parameters: {"authenticity_token"=>"[FILTERED]", "controller"=>"users", "action"=>"create", "domain_id"=>"8", "commit"=>"Create", "record"=>{"password1_confirmation"=>"[FILTERED]", "fullname"=>"test", "name"=>"test", "quota"=>"1024", "password1"=>"[FILTERED]"}, "eid"=>"65d59ae24bea67220f4314a0d0e5705e", "_"=>""}
  Domain Load (1.7ms)   SELECT * FROM `domains` WHERE (`domains`.`id` = 8) 
  SQL (0.6ms)   BEGIN
  User Load (13.6ms)   SELECT `users`.id FROM `users` WHERE (LOWER(`users`.`name`) = BINARY 'test' AND `users`.domain_id = 8) LIMIT 1
  CACHE (0.0ms)   SELECT * FROM `domains` WHERE (`domains`.`id` = 8) 
  CACHE (0.0ms)   SELECT `users`.id FROM `users` WHERE (LOWER(`users`.`name`) = BINARY 'test' AND `users`.domain_id = 8) LIMIT 1
  SQL (1.3ms)   SELECT count(*) AS count_all FROM `users` 
  User Create (5.2ms)   INSERT INTO `users` (`email`, `home`, `name`, `fullname`, `priority`, `domain_id`, `password`, `policy_id`, `created_at`, `quota`, `updated_at`) VALUES('te...@xxx.de', '/var/mailserv/mail/xxx.de/test/home', 'test', 'test', 7, 8, '*********l', 1, '2015-02-25 19:05:46', 1024, '2015-02-25 19:05:46')
  SQL (0.1ms)   BEGIN
  WebmailUser Create (0.0ms)   Mysql::Error: Column 'alias' cannot be null: INSERT INTO `users` (`user_id`, `last_login`, `alias`, `created`, `mail_host`, `preferences`, `language`, `username`) VALUES(NULL, '2015-02-25 19:05:46', NULL, '2015-02-25 19:05:46', 'localhost', 'a:2:{s:16:\"message_sort_col\";s:4:\"date\";s:18:\"message_sort_order\";s:4:\"DESC\";}', 'en_US', 'te...@xxx.de')
  SQL (0.3ms)   ROLLBACK
  SQL (12.2ms)   ROLLBACK

ActiveRecord::StatementInvalid (Mysql::Error: Column 'alias' cannot be null: INSERT INTO `users` (`user_id`, `last_login`, `alias`, `created`, `mail_host`, `preferences`, `language`, `username`) VALUES(NULL, '2015-02-25 19:05:46', NULL, '2015-02-25 19:05:46', 'localhost', 'a:2:{s:16:\"message_sort_col\";s:4:\"date\";s:18:\"message_sort_order\";s:4:\"DESC\";}', 'en_US', 'te...@xxx.de')):
  app/models/user.rb:31:in `after_create'

David Gnojek

unread,
Mar 12, 2015, 10:32:35 AM3/12/15
to mail...@googlegroups.com
Hi Daniel,

thanks for logs,
the "alias" field in INSERT INTO SQL looks wrong. srange,  it was used in previous versions but not in 5.5 or higher.

I was able to simulate the error when alias was enabled in this script /var/mailserv/admin/app/models/user.rb which handle users administration.
To fix it, find and comment or disable this row" :alias        => self.fullname,:"
.....
  def after_create
    WebmailUser.create!(
      :username     => self.email,
      :last_login   => Time.new.strftime("%F %T"),
   # :alias        => self.fullname,
      :created      => Time.new.strftime("%F %T"),
      :language     => "en_US",
....

finally restart mailserv a wait a while until services are back and running.
#god restart mailserv

Cheers
David



Daniel

unread,
Mar 13, 2015, 9:16:50 AM3/13/15
to mail...@googlegroups.com
Hi David,

the line :alias ... is already disabled. What else can i do?

The Mailserv was a migration from Mailserv 4.8. Is this the Problem? Everything else is working fine. 

Daniel

unread,
Apr 10, 2015, 3:50:19 AM4/10/15
to mail...@googlegroups.com
Hello,

can anyone help me? I still have this problem and i need more accounts.

Cheers
Daniel 

David Gnojek

unread,
Apr 24, 2015, 11:55:44 AM4/24/15
to mail...@googlegroups.com
how did you make the migration. I have not tried to upgrade from 4.8 to the latest version.
btw what showed the database check?

--

Daniel

unread,
Apr 25, 2015, 3:34:40 AM4/25/15
to mail...@googlegroups.com
Hi David,

# mysqlcheck  -c --all-databases 
mail.administrators                                OK
mail.admins                                        OK
mail.backups                                       OK
mail.domains                                       OK
mail.forwardings                                   OK
mail.greylists                                     OK
mail.hostconfigs                                   OK
mail.licenses                                      OK
mail.routings                                      OK
mail.schema_migrations                             OK
mail.sessions                                      OK
mail.system_migrations                             OK
mail.userpref                                      OK
mail.users                                         OK
mail.whitelists                                    OK
mysql.columns_priv                                 OK
mysql.db                                           OK
mysql.event                                        OK
mysql.func                                         OK
mysql.general_log
Error    : You can't use locks with log tables.
status   : OK
mysql.help_category                                OK
mysql.help_keyword                                 OK
mysql.help_relation                                OK
mysql.help_topic                                   OK
mysql.host                                         OK
mysql.ndb_binlog_index                             OK
mysql.plugin                                       OK
mysql.proc                                         OK
mysql.procs_priv                                   OK
mysql.servers                                      OK
mysql.slow_log
Error    : You can't use locks with log tables.
status   : OK
mysql.tables_priv                                  OK
mysql.time_zone                                    OK
mysql.time_zone_leap_second                        OK
mysql.time_zone_name                               OK
mysql.time_zone_transition                         OK
mysql.time_zone_transition_type                    OK
mysql.user                                         OK
spamcontrol.awl                                    OK
spamcontrol.bayes_expire                           OK
spamcontrol.bayes_global_vars                      OK
spamcontrol.bayes_seen                             OK
spamcontrol.bayes_token                            OK
spamcontrol.bayes_vars                             OK
sqlgrey.config                                     OK
sqlgrey.connect                                    OK
sqlgrey.domain_awl                                 OK
sqlgrey.from_awl                                   OK
sqlgrey.optin_domain                               OK
sqlgrey.optin_email                                OK
sqlgrey.optout_domain                              OK
sqlgrey.optout_email                               OK
webmail.cache                                      OK
webmail.cache_index                                OK
webmail.cache_messages                             OK
webmail.cache_shared                               OK
webmail.cache_thread                               OK
webmail.contactgroupmembers                        OK
webmail.contactgroups                              OK
webmail.contacts                                   OK
webmail.dictionary                                 OK
webmail.identities                                 OK
webmail.messages                                   OK
webmail.searches                                   OK
webmail.session                                    OK
webmail.system                                     OK
webmail.users                                      OK



Thank you

Daniel

Daniel

unread,
May 5, 2015, 3:39:14 PM5/5/15
to mail...@googlegroups.com
Hi,

i got it. The following steps are working:

# mysql
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.1.73 OpenBSD port: mysql-server-5.1.73v0
Copyright (c) 2000, 2013, Oracle and/or its affiliates. All rights reserved.
Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
mysql> use webmail
Database changed
mysql> ALTER TABLE users DROP COLUMN alias;
Query OK, 16 rows affected (0.03 sec)
Records: 16  Duplicates: 0  Warnings: 0
mysql> quit
Bye

Thanks !!

David Gnojek

unread,
May 29, 2015, 7:07:40 AM5/29/15
to mail...@googlegroups.com
Hi Daniel,

cool you solved it :-) just I though the trouble should be in mail DB instead of webmail DB.
Cheers
David

--
Reply all
Reply to author
Forward
0 new messages