How to insert myhostname in postfix virtual via mysql
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm searching for a way to insert the content of the postfix configuration variable "myhostname" (dynamically) into a mysql query.
- See http://www.postfix.org/mysql_table.5.html
Currently I have
query = SELECT destination FROM virtual_aliases WHERE source='%s'
I want to extend it like that
query = SELECT destination FROM virtual_aliases WHERE hostname='$mydestination' AND source='%s'
where $mydestination
should not be static (I could insert it into the .cf file, but I want to have it dynamically to share the same .cf file between multiple servers).
mysql postfix
add a comment |Â
up vote
0
down vote
favorite
I'm searching for a way to insert the content of the postfix configuration variable "myhostname" (dynamically) into a mysql query.
- See http://www.postfix.org/mysql_table.5.html
Currently I have
query = SELECT destination FROM virtual_aliases WHERE source='%s'
I want to extend it like that
query = SELECT destination FROM virtual_aliases WHERE hostname='$mydestination' AND source='%s'
where $mydestination
should not be static (I could insert it into the .cf file, but I want to have it dynamically to share the same .cf file between multiple servers).
mysql postfix
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm searching for a way to insert the content of the postfix configuration variable "myhostname" (dynamically) into a mysql query.
- See http://www.postfix.org/mysql_table.5.html
Currently I have
query = SELECT destination FROM virtual_aliases WHERE source='%s'
I want to extend it like that
query = SELECT destination FROM virtual_aliases WHERE hostname='$mydestination' AND source='%s'
where $mydestination
should not be static (I could insert it into the .cf file, but I want to have it dynamically to share the same .cf file between multiple servers).
mysql postfix
I'm searching for a way to insert the content of the postfix configuration variable "myhostname" (dynamically) into a mysql query.
- See http://www.postfix.org/mysql_table.5.html
Currently I have
query = SELECT destination FROM virtual_aliases WHERE source='%s'
I want to extend it like that
query = SELECT destination FROM virtual_aliases WHERE hostname='$mydestination' AND source='%s'
where $mydestination
should not be static (I could insert it into the .cf file, but I want to have it dynamically to share the same .cf file between multiple servers).
mysql postfix
edited Jul 5 at 9:44
slmâ¦
233k65479651
233k65479651
asked Jul 5 at 7:16
Schubi Duah
213
213
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f453542%2fhow-to-insert-myhostname-in-postfix-virtual-via-mysql%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password