abcdzz wrote:============ Required information ====
- iRedMail version (check /etc/iredmail-release): 0.9.8
- Linux/BSD distribution name and version: Ubuntu 16.04.4 LTS
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): PGSQL
- Web server (Apache or Nginx): Apache
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====
Hello,
Upgrade from 0.9.7 to 0.9.8 went perfect except the last step.
"Amavisd: Add new SQL column maddr.email_raw to store mail address without address extension"
I have removed "already exists" errors from log, because I have started script for the second time.
root@mail:~/iRedmail_0.9.9_upd# su - postgres
postgres@mail:~$ psql -U amavisd -d amavisd
psql (9.5.12)
Type "help" for help.
amavisd=>
amavisd=> sql> \i /home/mailserv/iRedmail_0.9.9_upd/amavisd.pgsql
psql:/home/mailserv/iRedmail_0.9.9_upd/amavisd.pgsql:3: ERROR: invalid input syntax for type bytea
psql:/home/mailserv/iRedmail_0.9.9_upd/amavisd.pgsql:7: ERROR: invalid input syntax for type bytea
What I can do with these "invalid input syntax for type bytea" errors? Do they affect on my e-mail server?
P.S. there is small typo in PostgreSQL command: "psql -d vmail < /root/iredmail.mysql"
hi dwbotsch,
my iremail system environment is same as you(postgresql+ubuntu16.04), recently i upgrade from 0.9.7 to 0.9.8.
bug I didn't have the same problem.
if you backup sql database before you upgrade. Recover it, and try again.
if you not backup sql database, can you show current `msgs` table SQL structure ? use below command:
```
su - postgres
psql -U amavisd -d amavisd
\d msgs;
```
below, is `msgs` table SQL structure in 0.9.7 version:
```
amavisd=> \d msgs;
Table "public.msgs"
Column | Type | Modifiers
---------------+--------------------------+-------------------------------
partition_tag | integer | not null default 0
mail_id | bytea | not null
secret_id | bytea | default ''::bytea
am_id | character varying(20) | not null
time_num | integer | not null
time_iso | timestamp with time zone | not null
sid | integer | not null
policy | character varying(255) | default ''::character varying
client_addr | character varying(255) | default ''::character varying
size | integer | not null
originating | character(1) | not null default ' '::bpchar
content | character(1) |
quar_type | character(1) |
quar_loc | character varying(255) | default ''::character varying
dsn_sent | character(1) |
spam_level | real |
message_id | character varying(255) | default ''::character varying
from_addr | character varying(255) | default ''::character varying
subject | character varying(255) | default ''::character varying
host | character varying(255) | not null
Indexes:
"msgs_pkey" PRIMARY KEY, btree (partition_tag, mail_id)
"msgs_idx_content" btree (content)
"msgs_idx_mail_id" btree (mail_id)
"msgs_idx_mess_id" btree (message_id)
"msgs_idx_quar_type" btree (quar_type)
"msgs_idx_sid" btree (sid)
"msgs_idx_spam_level" btree (spam_level)
"msgs_idx_time_iso" btree (time_iso)
"msgs_idx_time_num" btree (time_num)
Check constraints:
"msgs_sid_check" CHECK (sid >= 0)
"msgs_size_check" CHECK (size >= 0)
"msgs_time_num_check" CHECK (time_num >= 0)
```