Skip to content
This repository has been archived by the owner on Oct 22, 2024. It is now read-only.

Updated "moving from Postfix (& Postfixadmin)" #68

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

jphovila
Copy link

@jphovila jphovila commented Feb 9, 2022

The example "Moving from Postfix (& Postfixadmin)" was outdated and did not work properly.

The example "Moving from Postfix (& Postfixadmin)" was outdated and did not work properly.
The example "Moving from Postfix (& Postfixadmin)" was outdated and did not work properly.
query_alias SELECT destination FROM alias WHERE email=$1;
query_credentials SELECT username, password FROM mailbox WHERE username=$1;
query_domain SELECT domain FROM domain WHERE domain=$1;
query_alias SELECT IF(goto=address, 'vmail', goto) from alias WHERE address=$1 AND active='1';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't this be SELECT CASE goto = address THEN 'vmail' else goto for postgres?

@omar-polo
Copy link
Contributor

Hello @jphovila, sorry for the delay. Admittedly I don't know much about postfixadmin, but I've left a comment on a bit of sql that I don't think it's quite right for postgresql. MySQL has an IF function, while postgresql is closer to the standard and has the CASE expression.

If it makes sense to you, i'll be happy to merge this in the new repositories for table-postgres and table-mysql, as this repository was restructured and splitted in sub-repos.

Thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants