postfixadmin / postfixadmin

PostfixAdmin - web based virtual user administration interface for Postfix mail servers
https://postfixadmin.github.io/postfixadmin
Other
1.06k stars 289 forks source link

Error creating email account #241

Closed Neurozone closed 5 years ago

Neurozone commented 5 years ago

Invalid query: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: 'now() + interval 0 day' for column postfixadmin.mailbox.password_expiry at row 1 caused by INSERT INTO mailbox (username,local_part,domain,maildir,password,name,quota,active,phone,email_other,token,token_validity,created,modified,password_expiry) VALUES (:username,:local_part,:domain,:maildir,:password,:name,:quota,:active,:phone,:email_other,:token,:token_validity,now(),now(),:password_expiry),

Centos 7.6 php 7.3 Mariadb 10.3.12

so it create only aliases, not mailboxes/email account

Neurozone commented 5 years ago

after changing it to:

$values['password_expiry'] = date('Y-m-d H:i:s', strtotime("now + 3 years"));

seems working with mariadb

DavidGoodwin commented 5 years ago

Yeah, I've changed the code to do something like this now - see https://github.com/postfixadmin/postfixadmin/commit/9cc04df973f3146bd954b1d4fef9d8c7018e8eb2

Sorry for not spotting your ticket - I should have referenced it in the commit but hadn't remembered/realised it was here.

Liionboy commented 1 year ago

Hello,

I have the same problem now:

Invalid query: SQLSTATE[22007]: Invalid datetime format: 1292 Incorrect datetime value: '29402-09-04 15:33' for column postfixadmin.mailbox.password_expiry at row 1 caused by INSERT INTO mailbox (username,local_part,domain,maildir,password,name,quota,active,phone,email_other,token,token_validity,created,modified,password_expiry) VALUES (:username,:local_part,:domain,:maildir,:password,:name,:quota,:active,:phone,:email_other,:token,:token_validity,now(),now(),:password_expiry) Error: Creating the mailbox checkmk@orasys-it-solutions.net failed!

DavidGoodwin commented 1 year ago

@Liionboy what version of PostfixAdmin are you using?

Liionboy commented 1 year ago

I fixed after i see on Domain List was at Pass Expired 999999 not 9999