[Valvula] About not having variable detection/support -- Re: Help with setup...

Francis Brosnan Blázquez francis.brosnan en aspl.es
Lun Jun 12 22:20:27 CEST 2017


Hi Jim,

About this specific error (not having support for variable detection
at postfix configuration), there has to be something pending to be
updated in your system.

If you run "-l" command you should get something like this:


        # valvulad -l  francis en aspl.es -d -o
        I: file /etc/valvula/valvula.conf loaded, ok
        I: server configuration is valid..
        I: Loading local domains configuration..
        I: Processing variable declaration: $postfix = /etc/postfix
        I: Updated $postfix -> /etc/postfix : virtual_alias_maps =
        mysql:/etc/postfix/mysql-aliases.cf
        I: Working with postfix declaration:
        mysql:/etc/postfix/mysql-aliases.cf (from /etc/postfix/main.cf)
        I: Found postfix mysql configuration,
        opening: /etc/postfix/mysql-aliases.cf
        I: Declaration found: (virtual_alias_maps) [user] ->
        [pf_user_4sdf23535]
        I: Declaration found: (virtual_alias_maps) [password] -> [xxxxx]


...so the output let's you know it is finding variables and they are
getting replaced the way they are printed.

Check with "rpm -qa | grep -i valvula" to ensure to have all packages
upgraded (or the lastest source code installed replacing previous
compilation; don't know if you are using source code or packages).

Best Regards,



El lun, 12-06-2017 a las 07:16 -0400, Jim Bassett escribió:

> Hi Francis.
> 
> 
> 
> # valvulad --version
> 1.0.8.b330
> 
> 
> valvulad -l jim en datamantic.com
> ERROR: jim en datamantic.com is not a local domain nor a local address
> 
> 
> # valvulad -l jim en datamantic.com
> ERROR: jim en datamantic.com is not a local domain nor a local address
> [root en oak ~]# valvulad -l jim en datamantic.com -o -d
> I: file /etc/valvula/valvula.conf loaded, ok
> I: server configuration is valid..
> I: Loading local domains configuration..
> I: Working with postfix declaration: proxy:mysql:
> $config_directory/mysql_virtual_alias_maps.cf
> (from /etc/postfix/main.cf)
> I: Found postfix mysql configuration,
> opening: $config_directory/mysql_virtual_alias_maps.cf..
> E: Unable to open file $config_directory/mysql_virtual_alias_maps.cf,
> errno=2
> I: Working with postfix declaration: proxy:mysql:
> $config_directory/mysql_virtual_domains_maps.cf
> (from /etc/postfix/main.cf)
> I: Found postfix mysql configuration,
> opening: $config_directory/mysql_virtual_domains_maps.cf..
> E: Unable to open
> file $config_directory/mysql_virtual_domains_maps.cf, errno=2
> I: Working with postfix declaration: proxy:mysql:
> $config_directory/mysql_virtual_mailbox_maps.cf
> (from /etc/postfix/main.cf)
> I: Found postfix mysql configuration,
> opening: $config_directory/mysql_virtual_mailbox_maps.cf..
> E: Unable to open
> file $config_directory/mysql_virtual_mailbox_maps.cf, errno=2
> I: Registering localhost..
> I: Registering oak.datamantic.com..
> 
> 
> 
> 
> > On Jun 12, 2017, at 5:06 AM, Francis Brosnan Blázquez
> > <francis.brosnan en aspl.es> wrote:
> > 
> > 
> > 
> > Hi Jim,
> > 
> > I've added support to allow handling variables while parsing postfix
> > configuration files. This way, valvula now should be able to support
> > your case.
> > 
> > If you are installing with packages, try to update with packages
> > already published. If you are compiling sources, get latest revision
> > from https://github.com/asples/valvula
> > 
> > 
> > After installing, you should see version:
> > 
> > >> valvulad --version
> > 1.0.8.b330
> > 
> > ...and after that, it should detect your account with:
> > 
> > >> valvulad -l jim en datamantic.com
> > 
> > Please, let me know your results,
> > Best Regards,
> > 
> > 
> > El dom, 11-06-2017 a las 13:09 -0400, Jim Bassett escribió:
> > 
> > > Hi Francis. Thanks again! You are very nice to help me (and on a
> > > Sunday!)
> > > 
> > > 
> > > > On Jun 11, 2017, at 12:28 PM, Francis Brosnan Blázquez
> > > > <francis.brosnan en aspl.es> wrote: 
> > > > 
> > > > Could you describe your mysql postfix setup? It should be easy
> > > > to show
> > > > it by running:
> > > > 
> > > > >> grep mysql /etc/postfix/main.cf
> > > > 
> > > > ...and then running "cat " over some of the
> > > > mysql:your-file-to-map-mail-accounts, something like:
> > > > 
> > > > >> cat  /etc/postfix/mysql-aliases.cf
> > > > 
> > > > I need to see how your mysql configuration maps your accounts
> > > > (remove
> > > > or XXXX's users, passwords an database, but leave variables and
> > > > mysql
> > > > query).
> > > > 
> > > > With this information I can see what's going on (I think).
> > > > 
> > > 
> > > 
> > > 
> > > 
> > > 
> > > #grep mysql /etc/postfix/main.cf
> > > virtual_alias_maps = proxy:mysql:
> > > $config_directory/mysql_virtual_alias_maps.cf
> > > virtual_mailbox_domains = proxy:mysql:
> > > $config_directory/mysql_virtual_domains_maps.cf
> > > virtual_mailbox_maps = proxy:mysql:
> > > $config_directory/mysql_virtual_mailbox_maps.cf
> > > 
> > > # cat /etc/postfix/mysql_virtual_alias_maps.cf
> > > user = xxxxx
> > > password = xxxxx
> > > hosts = localhost
> > > dbname = xxxxx
> > > table = alias
> > > select_field = goto
> > > where_field = address
> > > additional_conditions = and active = '1'
> > > #query = SELECT goto FROM alias WHERE address='%s' AND active =
> > > ‘1'
> > > 
> > > 
> > > 
> > > 
> > > # cat /etc/postfix/mysql_virtual_domains_maps.cf
> > > user = xxxxx
> > > password = xxxxx
> > > hosts = localhost
> > > dbname = xxxxx
> > > table = domain
> > > select_field = domain
> > > where_field = domain
> > > additional_conditions = and backupmx = '0' and active = '1'
> > > #query = SELECT domain FROM domain WHERE domain='%s' AND backupmx
> > > = '0' AND active = ‘1'
> > > 
> > > 
> > > # cat /etc/postfix/mysql_virtual_mailbox_maps.cf
> > > user = xxxxx
> > > password = xxxxx
> > > hosts = localhost
> > > dbname = xxxxx
> > > table = mailbox
> > > select_field = CONCAT(domain,'/',maildir)
> > > where_field = username
> > > 
> > > 
> > > 
> > > 
> > > # valvulad -l jim en datamantic.com -o -d
> > > I: file /etc/valvula/valvula.conf loaded, ok
> > > I: server configuration is valid..
> > > I: Loading local domains configuration..
> > > I: Working with postfix declaration: proxy:mysql:
> > > $config_directory/mysql_virtual_alias_maps.cf
> > > (from /etc/postfix/main.cf)
> > > I: Found postfix mysql configuration,
> > > opening: $config_directory/mysql_virtual_alias_maps.cf..
> > > E: Unable to open
> > > file $config_directory/mysql_virtual_alias_maps.cf, errno=2
> > > I: Working with postfix declaration: proxy:mysql:
> > > $config_directory/mysql_virtual_domains_maps.cf
> > > (from /etc/postfix/main.cf)
> > > I: Found postfix mysql configuration,
> > > opening: $config_directory/mysql_virtual_domains_maps.cf..
> > > E: Unable to open
> > > file $config_directory/mysql_virtual_domains_maps.cf, errno=2
> > > I: Working with postfix declaration: proxy:mysql:
> > > $config_directory/mysql_virtual_mailbox_maps.cf
> > > (from /etc/postfix/main.cf)
> > > I: Found postfix mysql configuration,
> > > opening: $config_directory/mysql_virtual_mailbox_maps.cf..
> > > E: Unable to open
> > > file $config_directory/mysql_virtual_mailbox_maps.cf, errno=2
> > > I: Registering localhost..
> > > I: Registering oak.datamantic.com..
> > > ERROR: jim en datamantic.com is not a local domain nor a local
> > > address
> > > 
> > > 
> > > 
> > > 
> > > $config_directory is defined near the top of /etc/postfix/main.cf
> > > as 
> > > 
> > > 
> > > $config_directory = /etc/postfix 
> > > 
> > > 
> > > but it looks like valvula is literally trying to open files like 
> > > 
> > > 
> > > $config_directory/mysql_virtual_alias_maps.cf.  
> > > 
> > > 
> > > instead of expanding $config_directory into /etc/postfix? Maybe
> > > that is the problem?
> > > 
> > > 
> > 
> > 
> > -- 
> > Francis Brosnan Blázquez  -  ASPL
> > http://www.asplhosting.com/
> > http://www.aspl.es/
> > https://twitter.com/aspl_es
> > https://twitter.com/asplhosting
> > https://twitter.com/francisbrosnanb
> > https://es.linkedin.com/in/francis-brosnan-blázquez-1353a218
> > 
> > 91 134 14 22 - 91 134 14 45 - 91 116 07 57
> > Av. Juan Carlos I 13, 2ºC, Torre Garena
> > 28806 - Alcalá de Henares (España)
> > 
> > AVISO LEGAL
> >  
> > En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
> > diciembre, de Protección de Datos de Carácter Personal, le informamos de
> > que sus datos de carácter personal, recogidos de fuentes accesibles al
> > público o datos que usted nos ha facilitado previamente, proceden de
> > bases de datos propiedad de Advanced Software Production Line, S.L.
> > (ASPL).
> >  
> > ASPL garantiza que los datos serán tratados con la finalidad de mantener
> > las oportunas relaciones comerciales o promocionales con usted o la
> > entidad que usted representa. No obstante, usted puede ejercitar sus
> > derechos de acceso, rectificación, cancelación y oposición dispuestos en
> > la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
> > Protección Datos, Av. Juan Carlos I 13, 2ºC, Alcalá de Henares
> > (Madrid).
> 
> 
> 

-- 
Francis Brosnan Blázquez  -  ASPL
http://www.asplhosting.com/
http://www.aspl.es/
https://twitter.com/aspl_es
https://twitter.com/asplhosting
https://twitter.com/francisbrosnanb
https://es.linkedin.com/in/francis-brosnan-blázquez-1353a218

91 134 14 22 - 91 134 14 45 - 91 116 07 57
Av. Juan Carlos I 13, 2ºC, Torre Garena
28806 - Alcalá de Henares (España)

AVISO LEGAL
 
En virtud de lo dispuesto en la Ley Orgánica 15/1999, de 13 de
diciembre, de Protección de Datos de Carácter Personal, le informamos de
que sus datos de carácter personal, recogidos de fuentes accesibles al
público o datos que usted nos ha facilitado previamente, proceden de
bases de datos propiedad de Advanced Software Production Line, S.L.
(ASPL).
 
ASPL garantiza que los datos serán tratados con la finalidad de mantener
las oportunas relaciones comerciales o promocionales con usted o la
entidad que usted representa. No obstante, usted puede ejercitar sus
derechos de acceso, rectificación, cancelación y oposición dispuestos en
la mencionada Ley Orgánica, notificándolo por escrito a ASPL -
Protección Datos, Av. Juan Carlos I 13, 2ºC, Alcalá de Henares
(Madrid).
------------ próxima parte ------------
Se ha borrado un adjunto en formato HTML...
URL: <http://lists.aspl.es/pipermail/valvula/attachments/20170612/df041e95/attachment.html>


Más información sobre la lista de distribución Valvula