Wednesday, June 24, 2009

Cómo enviar correos desde SCO Unixware

En teoría habría que configurarlo desde scoadmin mail, pero en la versión 7.1.4 con maintenace pack 4 la versión de sendmail no funciona desde scoadmin y hay que ejecutar a mano el comando /etc/mail/manage_sendmail

La configuración que tenemos que obtener es la siguiente:

Sendmail configuration information...
Machine name: hostname.domain.local

DOMAIN name: domain.local
UUCP connections: NOT SET
Alternate names: hostname hostname.domain.local
Is there a UUCP gateway on the net? n
Is there a smart mailhost on the net? n
Masquerade as a different host? newdomain.com
Use NIS aliases with sendmail? NOT SET

Lo que nos generará el fichero /etc/mail/cf/cf/sco.uw714.mc con el siguiente contenido:

divert(-1)
#
# This is a generic configuration file for SCO OpenServer 6.
# It has support for local and SMTP mail only. If you want to
# customize it, copy it to a name appropriate for your environment
# and do the modifications there.
#
divert(0)dnl
VERSIONID(`@(#)opensrc:src/sendmail/patches/cf/cf/sco.uw714.mc /main/uw714mp/2')dnl
OSTYPE(sco.uw714)dnl
DOMAIN(generic)dnl
define(`confDONT_BLAME_SENDMAIL',`groupwritabledirpathsafe,linkedaliasfileinwritabledir')dnl
FEATURE(`access_db',`hash -T -o /etc/mail/access.db')dnl
FEATURE(`use_cw_file')dnl
define(`confDOMAIN_NAME',`domain.local')dnl
define(`LOCAL_NAME',`hostname.domain.local')dnl
FEATURE(`masquerade_entire_domain')dnl
MASQUERADE_DOMAIN(`hostname.domain.local')dnl
FEATURE(`masquerade_envelope')dnl
MASQUERADE_AS(`newdomain.com')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl


Después de generar el fichero /etc/mail/sendmail.cf hay que editarlo y comentar la línea en la que pone C{E}root y dejarla así:

#C{E}root

Además hay que reinicar el servicio de sendmail:

/etc/init.d/sendmail stop/etc/init.d/sendmail start
Y para mandar un correo igual que con Openserver:

mail -s "Asunto" usuario@dominio.com

Donde el fichero aparece en el cuerpo del mensaje.