1 (edited by extrasensi 2023-04-21 18:50:03)

Topic: InternalError(1364,"Field 'local_part' doesn't have a default value")

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release): 1.6.2 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? downloadable installer
- Linux/BSD distribution name and version: Ubuntu 20.04.6 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro? No
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hi there!

After adding a new user in admin panel I get an error "InternalError(1364, "Field 'local_part' doesn't have a default value")". Field 'local_part'  have varchar(255) type. How can I fix this error?

If creating bulk users using script create_mail_user_SQL.sh I have no errors.



UPD:  by default I didn't have this column 'local_part' in the table "mailbox". After adding it, the error described above began to appear. The solution was to query the database:
ALTER TABLE `mailbox` CHANGE `local_part` `local_part` VARCHAR(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL;

----

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

2

Re: InternalError(1364,"Field 'local_part' doesn't have a default value")

SQL column "mailbox.local_part" was dropped since iRedMail-0.9.8.