Have you correctly set up the SQL control files for Postfix properly ? PostFixAdmin doesn't do anything with email, it only sets the database contents. For Postfix to work properly, you need to configure all the relevant maps and MySQL command files to suit.
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
It is those last two that handle alias domains - by doing the appropriate join in MySQL and returning the results to Postfix. Postfix itself is totally dumb and knows nothing about the contents of the database - just working from the results returned by the SQL query.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
query = SELECT domain FROM domain WHERE domain='%s'
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1
a) I add to second query (I've seen that it's missing)
AND active = 1
but nothing…
b) Using your querys:
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_dominios_virtuales_mysql.cf
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
got a relay denied: NOQUEUE: reject: RCPT from mail-qw0-f46.google.com: 554 5.7.1 <info@pablorodriguezgonzalez.com>: Relay access denied; from=<boinker@gmail.com> to=<info@pablorodriguezgonzalez.com> proto=ESMTP helo=<mail-qw0-f46.google.com>
c) Using your querys:
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_dominios_virtuales_mysql.cf
I've got a relay denied too :-(
I think b) is correct but, nothing, any other hint?
Sorry…and thanks, of course.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
You need ALL of those query files and map statements. Each handles a DIFFERENT part of the setup.
I suggest you go back to the documentation and setup the SQL files correctly - if you have that wrong, then there are may be other elements missing as well.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Anonymous
-
2010-09-01
Thank you again!
But wih my query files, mail works perfectly… :-(
My only problem is alias domain not working.
I can send, receive, create mailbox alias, etc without any problem, when I'm using your querys, is when postfix fails :-/
Thanks again.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Like I've already said, alias domains use DIFFERENT QUERIES.
You can have virtual mailboxes and aliases working fine without setting up the elements required for alias domains, but without all the right elements you will not get everything working. I have 6 query files on my system - three are :
mysql_virtual_alias_maps.cf
mysql_virtual_domains_maps.cf
mysql_virtual_mailbox_maps.cf
which make the normal mailboxes and aliases work.
I have another three :
mysql_virtual_alias_domain_catchall_maps.cf
mysql_virtual_alias_domain_mailbox_maps.cf
mysql_virtual_alias_domain_maps.cf
which handle alias domains.
And you can see that relay_recipient_maps, virtual_alias_maps, and virtual_mailbox_maps all refer to the extra queries.
Taking virtual_mailbox_maps : you can see that it uses the query in mysql_virtual_mailbox_maps.cf PLUS it uses the query in mysql_virtual_alias_domain_mailbox_maps.cf. The first of these finds mailboxes in "normal" domains, the second finds mailboxes in "alias" domains. Miss either of them out and that part of the system won't work.
Hi guys.
I've seen that in:
https://sourceforge.net/projects/postfixadmin/forums/forum/676076/topic/3768529
there's problem with alias domains.
But I've a different problem, because my mail isn't delivered. The log:
<marialuisa.delarosa@escolagalegadecoaching.es>: Recipient address rejected: User unknown in virtual mailbox table; from=<boinker@gmail.com> to=<marialuisa.delarosa@escolagalegadecoaching.es>
I've created correctly an alias from escolagalegadecoaching.com to escolagalegadecoaching.es. I can see it in phpmyadmin.
What's the reason for not to work alias domains?
Thanks in advance.
Have you correctly set up the SQL control files for Postfix properly ? PostFixAdmin doesn't do anything with email, it only sets the database contents. For Postfix to work properly, you need to configure all the relevant maps and MySQL command files to suit.
For example, in my main.cf I have :
relay_recipient_maps =
mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
The query parts of those are respectively :
query = SELECT goto FROM alias WHERE address='%s' AND active = '1'
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
It is those last two that handle alias domains - by doing the appropriate join in MySQL and returning the results to Postfix. Postfix itself is totally dumb and knows nothing about the contents of the database - just working from the results returned by the SQL query.
Thank you for your response :-)
I've that in main.conf:
virtual_alias_maps = mysql:/etc/postfix/mysql/mapas_alias_virtuales_mysql.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql/mapas_dominios_virtuales_mysql.cf
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
and the querys in every file:
query = SELECT goto FROM alias WHERE address='%s' AND active = 1
query = SELECT domain FROM domain WHERE domain='%s'
query = SELECT maildir FROM mailbox WHERE username='%s' AND active = 1
a) I add to second query (I've seen that it's missing)
AND active = 1
but nothing…
b) Using your querys:
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_dominios_virtuales_mysql.cf
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
got a relay denied: NOQUEUE: reject: RCPT from mail-qw0-f46.google.com: 554 5.7.1 <info@pablorodriguezgonzalez.com>: Relay access denied; from=<boinker@gmail.com> to=<info@pablorodriguezgonzalez.com> proto=ESMTP helo=<mail-qw0-f46.google.com>
c) Using your querys:
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
query = SELECT goto FROM alias,alias_domain WHERE alias_domain.alias_domain = '%d' and alias.address = CONCAT('@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active='1'
in /etc/postfix/mysql/mapas_dominios_virtuales_mysql.cf
I've got a relay denied too :-(
I think b) is correct but, nothing, any other hint?
Sorry…and thanks, of course.
You need ALL of those query files and map statements. Each handles a DIFFERENT part of the setup.
I suggest you go back to the documentation and setup the SQL files correctly - if you have that wrong, then there are may be other elements missing as well.
Thank you again!
But wih my query files, mail works perfectly… :-(
My only problem is alias domain not working.
I can send, receive, create mailbox alias, etc without any problem, when I'm using your querys, is when postfix fails :-/
Thanks again.
> But wih my query files, mail works perfectly
I didn't say it doesn't
> My only problem is alias domain not working
Like I've already said, alias domains use DIFFERENT QUERIES.
You can have virtual mailboxes and aliases working fine without setting up the elements required for alias domains, but without all the right elements you will not get everything working. I have 6 query files on my system - three are :
mysql_virtual_alias_maps.cf
mysql_virtual_domains_maps.cf
mysql_virtual_mailbox_maps.cf
which make the normal mailboxes and aliases work.
I have another three :
mysql_virtual_alias_domain_catchall_maps.cf
mysql_virtual_alias_domain_mailbox_maps.cf
mysql_virtual_alias_domain_maps.cf
which handle alias domains.
Then in Postfix config, there are :
relay_recipient_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_alias_maps = mysql:/etc/postfix/sql/mysql_virtual_alias_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_catchall_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/sql/mysql_virtual_domains_maps.cf
virtual_mailbox_maps = mysql:/etc/postfix/sql/mysql_virtual_mailbox_maps.cf,
mysql:/etc/postfix/sql/mysql_virtual_alias_domain_mailbox_maps.cf
And you can see that relay_recipient_maps, virtual_alias_maps, and virtual_mailbox_maps all refer to the extra queries.
Taking virtual_mailbox_maps : you can see that it uses the query in mysql_virtual_mailbox_maps.cf PLUS it uses the query in mysql_virtual_alias_domain_mailbox_maps.cf. The first of these finds mailboxes in "normal" domains, the second finds mailboxes in "alias" domains. Miss either of them out and that part of the system won't work.
From your post, it appears you've configured :
virtual_mailbox_maps = mysql:/etc/postfix/mysql/mapas_mailbox_virtuales_mysql.cf
So you have only configured ONE query for each function. You need BOTH queries for both functions to work.
All this is explained in the documents for PostFixAdmin. On my Debian system they are in POSTFIX_CONF.txt.gz in /usr/share/doc/postfixadmin/DOCUMENTS
Thank you very much for your great explanation.
I understand now :-)
I'll look at it, thank you again!