• Goltratec Blog

  • Tipico problema al enviar a hotmail, yahoo, gmail, etc.

25th July 2007

Tipico problema al enviar a hotmail, yahoo, gmail, etc.

El tipico de bateig… bateig envia correos nombrecorreo@bateig.com , el SPF del receptor mira la ip del dominio, como no coinciden lo rechazan.

Como solucion o bien se cambia el registro mx del dominio a la ip donde esta el servidor (con lo que tiene que ser fija) o bien se configura el servidor de correo interno para que lo reenvie a traves del servidor de correo de la maquina donde esté alojado el dominio.

Mas info sobre SPF

posted in Redes | 0 Comments

21st July 2007

Funciones especiales Neoreport (gestor de informes)

Gestor de reportes gratuito y perfecto para vuestras aplicaciones (sean del tamaño que sean)  .net (2.0). Podeis descargarlo aquí.

Special functions are special string that you can insert into some text properties such as Label text, OleDb DataSource connection string or Image ImageFile to get some dynamic values.

This is the list of supported functions.

Report related functions

{@ReportPath}

The report path.
This can be useful if used into a connection string or an image path to indicate a relative path to a .mdb or a picture file.

i.e.:

Image1.ImageFile = "{@ReportPath}imagesmypicture.jpg"
{@PageCount}

The total number of pages of the generated report.
This can be used with {@PageNumber} to write the current page info:

i.e.:

Label1.Text = "Page {@PageNumber} of {@PageCount}"
{@PageNumber}

The current page number.
This can be used with {@PageCount} to write the current page info:

i.e.:

Label1.Text = "Page {@PageNumber} of {@PageCount}"
{@RecordCount}

The total number of record in the generated report.
This can be used similarly to {@PageCount} and {@PageNumber} to write the current record info:

i.e.:

Label1.Text = "Article {@RecordNumber} of {@RecordCount}"
{@RecordNumber}

The current record number in the generated report.
This can be used similarly to {@PageCount} and {@PageNumber} to write the current record info:

i.e.:

Label1.Text = "Article {@RecordNumber} of {@RecordCount}"

Data related functions

These functions If used into a GroupSection them are executed ont the records included into the group by the property GroupFieldList.
If used into others sections it does the sum for all the records in the report.

These functions have the following syntax:

{@() }

where

is the function name, i.e. COUNT or SUM
is the field against which the function is executed.
is an optional list of options separated by spaces.

The option syntax is

()

where

can be

f

for the format
The format used to write the data. This can be i.e. 0.00 if you want a number formatted with 2 decimal digits.

n

for the null text
The null text is the text to be printed if the data into the field is Null.

Examples

{@SUM(UnitPrice)}

Prints the sum of the field UnitPrice using the current settings for numbers.

{@SUM(UnitPrice) f(0.00)}

Prints the sum of the field UnitPrice with 2 decimal digits.

{@SUM(UnitPrice) f(#,##0.00)}

Prints the sum of the field UnitPrice with thousand separator and 2 decimal digits.

{@FIELD(UnitPrice) f(0.00) n(*Price not available*)}

Prints the content of the field UnitPrice with 2 decimal digits and prints “*Price not available*” if the UnitPrice is Null .

{@FIELD(UnitPrice) n(*Price not available*)}

Prints the content of the field UnitPrice or “*Price not available*” if the UnitPrice is Null .

Supported functions

{@AVG()}

Compute the average of the field.

{@COUNT()}

Compute the count of the record in the group.

{@FIELD()}

Return the value of the field.

{@MAX()}

Return the max value for the field into the group.

{@MIN()}

Return the min value for the field into the group.

{@NR_FIELD()}

Return value of the field in the next record.

{@SUM()}

Return the sum of the value of the field into the group.

posted in Programacion | 0 Comments

14th July 2007

Configurar Nagios 2.x

http://nagios.linuxbaja.org/?q=node/15

posted in General | 0 Comments

12th July 2007

Asterisk y Linksys

For small- and medium-sized businesses, going all-VoIP is not an easy decision.

Fortunately, the switch-over, which can result in substantial savings and add bold new capabilities to tired old office phone systems, can be done in baby-steps: Purchase an Internet Protocol (IP) based phone system, but keep the PSTN lines, for now.

It is indeed possible to integrate VoIP into an existing office analog system, keeping current phone services intact while routing costly toll calls out over IP. Until recently, though, the hardware needed for such integration was difficult to use and expensive.

There are two ways to route calls between VoIP and the PSTN: subscribe to an Internet Telephony Service Provider (ITSP) or keep the PSTN lines and purchase equipment to make the conversion.

Keeping the PSTN lines requires VoIP gateways to convert the PSTN signal to a VoIP signal. For analog lines, these gateways need a Foreign Exchange Office (FXO) port.

Until recently, most reasonably priced VoIP gateways had only one or two FXO ports - enough ports for home use, but too few for small businesses and remote offices.

The average price for a four FXO port VoIP gateway was $400-$500, until Linksys released the SPA400.

The Linksys SPA400 is an attractive low-cost ($295) four FXO port solution that costs $100 less than its peers.

The official position from Linksys is that the SPA400 will only work with the Linksys SPA9000, but in this article, we explain how to configure the SPA400 to work with the Open Source PBX Asterisk. We also have a related configuration for the CommuniGate Pro Internet Communication System.

This article covers the SPA400 with firmware version 1.0.0.3 and Asterisk version 1.2.7.1. The configuration for new product versions may differ, so check the Voxilla Forums for updated information.

Configuring the SPA400

Connect to the SPA400 via the Web interface. The default username is Admin (case sensitive) and no password.

Setup->Basic Setup

  • Go to the Basic Setup screen.
  • Setup the Fixed IP Address information for the SPA400. Do not use Dynamic IP Addresses – the Asterisk server must find the SPA400 and register with it.
Linksys SPA400 Setup->Basic Setup Tab

SPA400 Setup;Basic Setup Tab
  • Setup the SPA400 DNS and NTP information.
  • Click Save Settings.

Configuring the SPA400

Setup->SPA9000 Interface

  • Go to the SPA9000 Interface configuration page.
  • Change the User ID to spa400.
  • Leave the SPA9000 Address set to Discover Automatically. For added security, once the SPA400 is working with the Asterisk server this value can be changed to match the server information.
Linksys SPA400 Configuration Screen

Linksys SPA400 Setup->SPA9000 Interface Tab
  • Click Save Settings.

Configuring Asterisk

Connect to the Asterisk server.

sip.conf Settings

The SPA400 needs the account name to match the value specified in the SPA400 User ID configuration field. The entry in sip.conf should look like the following:

[general]
register= spa400@192.168.1.109/spa400

Substitute spa400 for the value entered in the SPA400 User ID field and replace 192.168.1.109 with the actual IP address of the SPA400.

Then create a SIP entry for the SPA400.

user: the SPA400 User ID field value
host: the IP address of the SPA400
context: the context that should handle inbound calls from the SPA400

It should look like the following:

[spa400]
type=friend
user=spa400
host=192.168.1.109
dtmfmode=rfc2833
canreinvite=no
context=from-trunk
insecure=very

Configuring Asterisk

extensions.conf Settings

Configure your dial-out routing to utilize the spa400.

A generic dial-out route (dial 9 to get a SPA400 FXO trunk) would look like:

[general]
DIAL_OUT = 9
DIALOUTIDS = 2/
OUTCID_2 =
OUTMAXCHAINS_2 = 4
OUTPREFIX_2 =
OUT_2 = SIP/spa400

Inbound routing is more complex, but could look something like this (forward all calls to extension 200):

[from-trunk]
include => from-pstn

[from-pstn]
include=> from-pstn-custom

[from-pstn-custom]
exten=>spa400,1,Goto(ext-local,200,1)

Conclusion

The configuration is now ready for testing.

Testing should include testing both inbound and outbound calls.

If you need additional help with this configuration, help is available at the Voxilla Forum - Asterisk Users Group.

posted in Redes | 0 Comments

4th July 2007

COPIAS DE SEGURIDAD ONLINE

Los ficheros que se suben al servidor backup deben ocupar el minimo espacio posible. Para ello es necesario usar una herramienta de compresión que admita su uso por consola para poder programar el trabajo. Tras mirar varias he optado por 7zip, por varios motivos.

- Es opensource
- No me da problemas con caracteres como el subrayado (rar los da)
- No hace cosas raras en windows como el caso del tar.

La linea de comandos es bien sencilla:
7z.exe a prueba @lista.lst

Donde a es el parametro que hace qeu se cree el fichero, prueba es el nombre del fichero que se va a crear y @lista.lst es un fichero llamado “lista.lst” que contiene c:\*.* (en caso qeu quisieramos copiar c al completo).

La prueba se ha hecho con una copia de sqlserver qeu ocupaba 244mb. Una vez comprimida a pasado a ocupar 14mb.

Acto seguido a la compresión del directorio procedemos a la subida del fichero por ssh. Esto lo realizamos mediante WINSCP.

Desde consola cargariamos winscp3.exe con los siguientes parametros.

winscp3.exe /console /script=scriptEjemplo.txt /log=ficherolog.txt

El fichero scriptEjemplo.txt contiene lo siguiente.

option batch continue
option synchdelete on
open servicio
cd /home/servicio/copias
lcd z:\sincronizar
synchronize remote
close
exit

donde lcd es el directorio local que queremos sincronizar… batch continue hara que cuando se produzca cualquier error este se ignore
La sesión “servicio” la hemos creado previamente con winscp y hemos conectado por lo menos una vez para almacenar la clave rsa que nos proporciona el servidor.

Para finalizar el proceso ahora debemo proceder al envio del fichero log del winscp para comprobar qeu todo a ido correctamente. Para ello usamos SENDEMAIL que permite el envio de mails desde consola. La sintaxis probada es:

sendemail -f direccion_remitente -t direcicon_destinatario -cc direccion_destinatario_copia -u asunto -m Mensaje -s servidor_correo -xu usuarioCorreo -xp contraseñaCorreo -a fichero_log

posted in Redes | 0 Comments

2nd July 2007

Fecha e Idioma en Sql Server

Si el idioma por defecto en sqlserver 2000 no es en castellano podemos encontrarnos con problemas a la hora de hacer consultas del tipo fecha=’26/06/2007′ and ‘28/06/2007′ ya que en caso de tener idioma ingles la consulta que va a intentar hacer realmente es ‘06/26/2007′ ….

Para cambiar el idioma por defecto de un usuario podemos ejecutar:

sp_defaultlanguage  @loginame = 'sa', @language = 'spanish'

De esta forma, todo lo que ejecutemos con sa tomara el idioma español.

posted in Sql Server | 0 Comments