Comments (5)
@crazy-max works fine now. Thanks and great job 👍
from docker.
@willbrowningme Is there a db migration to change tables collation to utf8mb4_unicode_ci
?
from docker.
@crazy-max hmm I do seem to remember this error. I don't think I did any migration, you can try adding charset utf8
after each variable though like this:
DELIMITER $$
USE `anonaddy_database`$$
DROP PROCEDURE IF EXISTS `check_access`$$
CREATE PROCEDURE `check_access`(alias_email VARCHAR(254) charset utf8)
BEGIN
DECLARE no_alias_exists int(1);
DECLARE alias_action varchar(7) charset utf8;
DECLARE username_action varchar(7) charset utf8;
DECLARE additional_username_action varchar(7) charset utf8;
DECLARE domain_action varchar(7) charset utf8;
DECLARE alias_domain varchar(254) charset utf8;
SET alias_domain = SUBSTRING_INDEX(alias_email, '@', -1);
# We only want to carry out the checks if it is a full RCPT TO address without any + extension
IF LOCATE('+',alias_email) = 0 THEN
SET no_alias_exists = CASE WHEN NOT EXISTS(SELECT NULL FROM aliases WHERE email = alias_email) THEN 1 ELSE 0 END;
# If there is an alias, check if it is deactivated or deleted
IF NOT no_alias_exists THEN
SET alias_action = (SELECT
IF(deleted_at IS NULL,
'DISCARD',
'REJECT')
FROM
aliases
WHERE
email = alias_email
AND (active = 0
OR deleted_at IS NOT NULL));
END IF;
# If the alias is deactivated or deleted then increment its blocked count and return the alias_action
IF alias_action IN('DISCARD','REJECT') THEN
UPDATE
aliases
SET
emails_blocked = emails_blocked + 1
WHERE
email = alias_email;
SELECT alias_action;
ELSE
SELECT
(
SELECT
CASE
WHEN no_alias_exists
AND catch_all = 0 THEN "REJECT"
ELSE NULL
END
FROM
users
WHERE
alias_domain IN ( CONCAT(username, '.example.com')) ),
(
SELECT
CASE
WHEN no_alias_exists
AND catch_all = 0 THEN "REJECT"
WHEN active = 0 THEN "DISCARD"
ELSE NULL
END
FROM
additional_usernames
WHERE
alias_domain IN ( CONCAT(username, '.example.com')) ),
(
SELECT
CASE
WHEN no_alias_exists
AND catch_all = 0 THEN "REJECT"
WHEN active = 0 THEN "DISCARD"
ELSE NULL
END
FROM
domains
WHERE
domain = alias_domain) INTO username_action, additional_username_action, domain_action;
# If all actions are NULL then we can return 'DUNNO' which will prevent Postfix from trying substrings of the alias
IF username_action IS NULL AND additional_username_action IS NULL AND domain_action IS NULL THEN
SELECT 'DUNNO';
ELSEIF username_action IN('DISCARD','REJECT') THEN
SELECT username_action;
ELSEIF additional_username_action IN('DISCARD','REJECT') THEN
SELECT additional_username_action;
ELSE
SELECT domain_action;
END IF;
END IF;
ELSE
# This means the alias must have a + extension so we will ignore it
SELECT NULL;
END IF;
END$$
DELIMITER ;
That should fix the issue.
from docker.
Had the same issue. Recreating the procedure like @willbrowningme suggested fixed it for me.
from docker.
@0xL33t @Atherel Can you test with anonaddy/anonaddy:pr-62
? Thanks.
from docker.
Related Issues (20)
- Disable sender's host check on Helo
- Update to latest version after rebranding to addy HOT 2
- The value of CNAME changes in the error. HOT 1
- Suddenly not receiving mails anymore HOT 3
- Unable to connect to 127.0.0.1:25 HOT 1
- Second domain no DKIM signing HOT 5
- I cant send reply/send email from aliases HOT 3
- Update to v1.x HOT 6
- catch-all behavior related to ANONADDY_ALL_DOMAINS
- ViewClearCommand.php line 59: Error bootloop
- Unable to sign emails as integrated GPG doesn't allow GPG keys without passphrases HOT 1
- Update on portainer HOT 4
- warning: cannot get RSA certificate from file "/home/USER/anonaddy/TLS.key": disabling TLS support HOT 1
- Emails from certain senders not being forwarded HOT 19
- "This email was sent to ..." notice NOT removed HOT 2
- Flooded by "end-of-input while reading request from tlsmgr socket: Broken pipe" HOT 6
- Emails encrypted with Addy.io cannot be decrypted by open-keychain HOT 2
- View [mail.reset_password] not found. HOT 7
- Possible issues with Docker setup HOT 9
- Header about spoofed or improperly forwarded mail, `X-AnonAddy-Authentication-Results` looks fine HOT 8
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from docker.