Foros del Web » Programando para Internet » PHP »

MRBS + Postfix

Estas en el tema de MRBS + Postfix en el foro de PHP en Foros del Web. Hola! Estuve buscando el siguiente problema y no encuentro la solucion: Estoy configurando el MRBS de pruebas en mi equipo local, y este funciona ok ...
  #1 (permalink)  
Antiguo 16/03/2011, 07:17
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Pregunta MRBS + Postfix

Hola! Estuve buscando el siguiente problema y no encuentro la solucion:
Estoy configurando el MRBS de pruebas en mi equipo local, y este funciona ok en todos los sentidos
- tomar usuarios del LDAP
- dar privilegios admin a ciertos usuarios
- hago reservas (que solo el admin puede aprovar)

pero me falta algo; que no he conseguido hacer andar: La opcion sendmail. la configuracion parecia simple (instale el posfix y envio desde mi equipo correos dentro nuestra red interna y ese llega bien como [email protected]) pero si lo hago por la aplicacion no lo hace...

Código:
/**********************************************
* Configuración de correo
**********************************************/
// WHO TO EMAIL
// ------------
// The following settings determine who should be emailed when a booking is made,
// edited or deleted (though the latter two events depend on the "When" settings below).
// Set to TRUE or FALSE as required
// (Note:  the email addresses for the room and area administrators are set from the
// edit_area_room.php page in MRBS)

$mail_settings['admin_on_bookings']      = TRUE;  // the addresses defined by $mail_settings['recipients'] below
$mail_settings['area_admin_on_bookings'] = TRUE;  // the area administrator
$mail_settings['room_admin_on_bookings'] = TRUE;  // the room administrator
$mail_settings['booker']                 = TRUE;  // the person making the booking
$mail_settings['book_admin_on_approval'] = TRUE;  // the booking administrator when booking approval is enabled
                                                   // (which is the MRBS admin, but this setting allows MRBS
                                                   // to be extended to have separate booking approvers)     

// WHEN TO EMAIL
// -------------
// These settings determine when an email should be sent.
// Set to TRUE or FALSE as required
//
// (Note:  (a) the variables $mail_settings['admin_on_delete'] and
// $mail_settings['admin_all'], which were used in MRBS versions 1.4.5 and
// before are now deprecated.   They are still supported for reasons of backward
// compatibility, but they may be withdrawn in the future.  (b)  the default 
// value of $mail_settings['on_new'] is TRUE for compatibility with MRBS 1.4.5
// and before, where there was no explicit config setting, but mails were always sent
// for new bookings if there was somebody to send them to)

$mail_settings['on_new']    = TRUE;   // when an entry is created
$mail_settings['on_change'] = TRUE;  // when an entry is changed
$mail_settings['on_delete'] = TRUE;  // when an entry is deleted

// WHAT TO EMAIL
// -------------
// These settings determine what should be included in the email
// Set to TRUE or FALSE as required

$mail_settings['details']   = TRUE; // Set to TRUE if you want full booking details;
                                     // otherwise you just get a link to the entry
$mail_settings['html']      = FALSE; // Set to true if you want HTML mail
$mail_settings['icalendar'] = FALSE; // Set to TRUE to include iCalendar details
                                     // which can be imported into a calendar.  (Note:
                                     // iCalendar details will not be sent for areas
                                     // that use periods as there isn't a mapping between
                                     // periods and time of day, so the calendar would not
                                     // be able to import the booking)

// HOW TO EMAIL - CHARACTER SET AND LANGUAGE
// -----------------------------------------
// You can override the charset used in emails if you like, but be sure
// the charset you choose can handle all the characters in the translation
// and that anyone may use in a booking description
//$mail_charset = "iso-8859-1";
// Set the language used for emails (choose an available lang.* file).

$mail_settings['admin_lang'] = 'en';   // Default is 'en'.

// HOW TO EMAIL - ADDRESSES
// ------------------------
// The email addresses of the MRBS administrator are set in the config file, and
// those of the room and area administrators are set though the edit_area_room.php
// in MRBS.    But if you have set $mail_settings['booker'] above to TRUE, MRBS will
// need the email addresses of ordinary users.   If you are using the "db" 
// authentication method then MRBS will be able to get them from the users table.  But
// if you are using any other authentication scheme then the following settings allow
// you to specify a domain name that will be appended to the username to produce a
// valid email address (eg "@domain.com").

$mail_settings['domain'] = '@correo.domain.com.uy';

// If you use $mail_settings['domain'] above and username returned by mrbs contains extra
// strings appended like domain name ('username.domain'), you need to provide
// this extra string here so that it will be removed from the username.

$mail_settings['username_suffix'] = 'root';

// HOW TO EMAIL - BACKEND
// ----------------------
// Set the name of the backend used to transport your mails. Either 'mail',
// 'smtp' or 'sendmail'. Default is 'mail'. See INSTALL for more details.
//$mail_settings['admin_backend'] = 'mail';

$mail_settings['admin_backend'] = 'sendmail';

/*******************
* Sendmail settings
********************/

// Set the path of the Sendmail program (only used with "sendmail" backend).
// Default is '/usr/bin/sendmail'
$sendmail_settings['path'] = '/usr/bin/sendmail';
// Set additional Sendmail parameters (only used with "sendmail" backend).
// (example "-t -i"). Default is ''
$sendmail_settings['args'] = ' -t -i';

/*******************
* SMTP settings
********************/

// These settings are only used with the "smtp" backend"

//$smtp_settings['host'] = 'localhost';  // SMTP server
//$smtp_settings['port'] = 25;           // SMTP port number
//$smtp_settings['path'] = '/usr/bin/sendmail'; // Un invento a ver que sale
//$smtp_settings['auth'] = true;        // Whether to use SMTP authentication
?>
mi php.ini

Código:
[mail function]
; For Win32 only.
; http://php.net/smtp
SMTP = localhost
; http://php.net/smtp-port
smtp_port = 25

; For Win32 only.
; http://php.net/sendmail-from
;sendmail_from = [email protected]

; For Unix only.  You may supply arguments as well (default: "sendmail -t -i").
; http://php.net/sendmail-path

sendmail_path = /usr/bin/sendmail -t -i
si me pueden dar una mano excelente: si necesitan mas datos pidanme... la verdad no se que hacer.

Muchas gracias.
  #2 (permalink)  
Antiguo 16/03/2011, 08:11
Avatar de enlinea777  
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 15 años, 10 meses
Puntos: 127
Respuesta: MRBS + Postfix

bueno yo tenia ese problema en ubuntu 10.4
pero lo soluciones quitando el Postfix completamente con Synaptic y reinstale desde 0.
son eso se soluciono ya que el problema no sabia cual era.
sendmail viene dentro del paquete de Postfix.
  #3 (permalink)  
Antiguo 17/03/2011, 06:34
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: MRBS + Postfix

Cita:
Iniciado por enlinea777 Ver Mensaje
bueno yo tenia ese problema en ubuntu 10.4
pero lo soluciones quitando el Postfix completamente con Synaptic y reinstale desde 0.
son eso se soluciono ya que el problema no sabia cual era.
sendmail viene dentro del paquete de Postfix.
Gracias @enlinea777 hice lo que me dijiste pero de todas formas no tuve un efecto positivo (sude como loco para poner como estaba el postfix)... de todas formas no actua, no funciona de manera correca.
Acerca de postfix: despues de deshintalarlo (y reinstalarlo) no me mandaba correos... entonces luego le instale el sendmail (que es lo que interesa en si).
entonces si podia hacer:
Código:
:~$ sendmail [email protected] 
hola mundo!
.
s:~$
y este obedece (más le valia), en fin cuando uso el MRBS... la consula queda guardada hasta que el admin se loguee como tal pero no le llega el correo como deberia de llegar. Es lo unico que me faltaria para que el MRBS me funcione de 10... si me dan unos pasitos o tienen alguna consulta. A las ordenes

Última edición por marcelolemos; 17/03/2011 a las 06:37 Razón: omiti info
  #4 (permalink)  
Antiguo 14/06/2011, 04:34
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: MRBS + Postfix

Después de mucho tiempo opté por tomar la reinstalación de la aplicación: ya que estoy dando por hecho que mi postfix esta funcionando OK.

Código PHP:
$mail_settings['domain'] = '@midominio';
$mail_settings['username_suffix'] = 'marcelo.lemos';
$mail_settings['admin_backend'] = 'smtp';
$smtp_settings['host'] = 'localhost';  // SMTP server
$smtp_settings['port'] = 25;           // SMTP port number
$sendmail_settings['path'] = '/usr/sbin/sendmail';
$sendmail_settings['args'] = '-t -i';
$mrbs_admin_email "marcelo.lemos@midominio";
$mail_settings['from'] = 'mrbs@midominio;
$mail_settings['
recipients'] = 'marcelo.lemos@midominio';
$mrbs_company = "micompania";
$mail_settings['
treat_cc_as_to] = TRUE
y funciona!: envía avisando que hago una reserva, y también para avisar que el administrador acepta dicha reserva. pero el hecho es que cuando rechazo el pedido de reserva, y/o lo edito (como administrador). Voy a adjuntar el log de correo: no deje de notar la parte señalada en rojo... que me puede estar faltando??

nota:el server (wiki2) aparte del mrbs tiene instalado una wiki (de ahí el nombre) y el correo en el funciona.


Jun 13 08:48:14 wiki2 postfix/smtpd[17936]: connect from localhost[127.0.0.1]
Jun 13 08:48:14 wiki2 postfix/smtpd[17936]: AD683115C6: client=localhost[127.0.0.1]
Jun 13 08:48:14 wiki2 postfix/cleanup[17943]: AD683115C6: message-id=<20110613114814.AD683115C6@wiki>
Jun 13 08:48:14 wiki2 postfix/smtpd[17936]: disconnect from localhost[127.0.0.1]
Jun 13 08:48:14 wiki2 postfix/qmgr[3121]: AD683115C6: from=<mrbs@midominio>, size=3267, nrcpt=2 (queue active)
Jun 13 08:48:16 wiki2 postfix/smtp[17944]: AD683115C6: to=<marcelo.lemos@midominio>, relay=correo.midominio[10.xxx.xxx.52]:25, delay=1.7, delays=0.22/0.19/1.1/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BDBBB138366)
Jun 13 08:48:16 wiki2 postfix/smtp[17944]: AD683115C6: to=<testmantis@midominio>, relay=correo.midominio[10.xxx.xxx.52]:25, delay=1.7, delays=0.22/0.19/1.1/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BDBBB138366)
Jun 13 08:48:16 wiki2 postfix/qmgr[3121]: AD683115C6: removed
Jun 13 08:48:47 wiki2 postfix/smtpd[17936]: connect from localhost[127.0.0.1]
Jun 13 08:48:47 wiki2 postfix/smtpd[17936]: 52903115C6: client=localhost[127.0.0.1]
Jun 13 08:48:47 wiki2 postfix/cleanup[17943]: 52903115C6: message-id=<20110613114847.52903115C6@wiki>
Jun 13 08:48:47 wiki2 postfix/qmgr[3121]: 52903115C6: from=<@midominio>, size=3242, nrcpt=2 (queue active)
Jun 13 08:48:47 wiki2 postfix/smtpd[17936]: disconnect from localhost[127.0.0.1]
Jun 13 08:48:48 wiki2 postfix/smtp[17944]: 52903115C6: to=<marcelo.lemos@midominio>, relay=correo.midominio[10.xxx.xxx.52]:25, delay=1.1, delays=0.1/0/0.76/0.19, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BED28138376)
Jun 13 08:48:48 wiki2 postfix/smtp[17944]: 52903115C6: to=<testmantis@midominio>, relay=correo.midominio[10.xxx.xxx.52]:25, delay=1.1, delays=0.1/0/0.76/0.19, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as BED28138376)
Jun 13 08:48:48 wiki2 postfix/qmgr[3121]: 52903115C6: removed

Última edición por marcelolemos; 14/06/2011 a las 04:37 Razón: detalles en el php
  #5 (permalink)  
Antiguo 14/06/2011, 09:13
Avatar de enlinea777  
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 15 años, 10 meses
Puntos: 127
Respuesta: MRBS + Postfix

Hombre te falta el correo de donde envias
Código PHP:
$mail_settings['domain'] = '@midominio'
  #6 (permalink)  
Antiguo 14/06/2011, 10:03
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: MRBS + Postfix

Cita:
Iniciado por enlinea777 Ver Mensaje
Hombre te falta el correo de donde envias
Código PHP:
$mail_settings['domain'] = '@midominio'
... pero lo tengo definido en el inicio... ¿ no?
  #7 (permalink)  
Antiguo 15/06/2011, 15:07
Avatar de enlinea777  
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 15 años, 10 meses
Puntos: 127
Respuesta: MRBS + Postfix

pero es invalido sin no tiene una cuenta:

[email protected]
  #8 (permalink)  
Antiguo 16/06/2011, 06:15
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: MRBS + Postfix

el correo me llego haciendo eso que tu decis (incluso lo puse mal y me dicuenta luego)

¿cual es el problema? que al escribir el domain con una cuenta: cada vez que el mrbs va a enviar un correo a el usuario que valla a hacer la reserva lo pone así usuario@[email protected]... obviamente eso queda mal.

en definitiva:

cuando puse como dice enlinea77 si envia el correo de rechazo

paso de from=<@midominio> a from=<cuenta@midominio>

pero los demas no lo hace bien

paso de from=<usuario@midominio> a from=<otracuenta@cuenta@midominio>

La verdad si alguien me puede dar una mano barbaro: yo de php no se nada.
  #9 (permalink)  
Antiguo 16/06/2011, 07:27
Avatar de enlinea777  
Fecha de Ingreso: mayo-2008
Ubicación: frente al pc
Mensajes: 1.830
Antigüedad: 15 años, 10 meses
Puntos: 127
Respuesta: MRBS + Postfix

ya provaste con
Código PHP:
$mail_settings['domain'] = 'midominio.com'
sin @
  #10 (permalink)  
Antiguo 16/06/2011, 07:36
Avatar de marcelolemos  
Fecha de Ingreso: febrero-2011
Ubicación: Montevideo
Mensajes: 6
Antigüedad: 13 años, 1 mes
Puntos: 0
Respuesta: MRBS + Postfix

gracias! pero ya descubri el error:

esta linea no era necesaria:

$mail_settings['username_suffix'] = 'marcelo.lemos'

  #11 (permalink)  
Antiguo 30/06/2011, 15:45
 
Fecha de Ingreso: octubre-2007
Mensajes: 2
Antigüedad: 16 años, 5 meses
Puntos: 0
Respuesta: MRBS + Postfix

Cita:
Iniciado por marcelolemos Ver Mensaje
gracias! pero ya descubri el error:

esta linea no era necesaria:

$mail_settings['username_suffix'] = 'marcelo.lemos'

Estimados, no puedo hacer que funciones el MRBS, alguien puede dar una explicaión mas detallada, ficheros a editar y configuracion para usar smtp.
Saludos desde el sur del mundo.

Etiquetas: postfix
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta

SíEste tema le ha gustado a 1 personas




La zona horaria es GMT -6. Ahora son las 10:46.