Saturday, May 10, 2008

Sendmail for GMX communication

I configured the system to send the emails with the WAV attachments to an GMX email address.
Thats my sendmail.mc:

root@home-nas:~# cat /etc/mail/sendmail.mc
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`setup debian Linux')dnl
OSTYPE(`linux')dnl
dnl# DOMAIN(`debian-mta')dnl
dnl#
define(`confPRIVACY_FLAGS', `authwarnings,novrfy,noexpn,restrictqrun')dnl
define(`SMART_HOST',`mail.gmx.net')dnl
define(`confTO_IDENT', `0')dnl
define(`confCW_FILE', `-o /etc/mail/local-host-names')dnl
define(`confBIND_OPTS', `WorkAroundBrokenAAAA')dnl
define(`confNO_RCPT_ACTION', `add-to-undisclosed')dnl
define(`confPRIVACY_FLAGS', `authwarnings,noexpn,novrfy')dnl
define(`confLOG_LEVEL',15)dnl
FEATURE(`genericstable')dnl
FEATURE(`generics_entire_domain')dnl
FEATURE(`relay_hosts_only')dnl
FEATURE(`authinfo',`hash -o /etc/mail/auth/client-info')dnl
FEATURE(`use_cw_file')dnl
FEATURE(`access_db', `hash -T /etc/mail/access')dnl
FEATURE(`local_procmail',`',`procmail -t -Y -a $h -d $u')dnl
FEATURE(`redirect')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`always_add_domain',`gmx.net')dnl
EXPOSED_USER(`root')dnl
GENERICS_DOMAIN(`home-nas.lab.test')dnl
MASQUERADE_AS(`asterisk1.local')dnl
MASQUERADE_DOMAIN(`lab.test')dnl
LOCAL_DOMAIN(`localhost.localdomain')dnl
MAILER(local)dnl
MAILER(smtp)dnl
MAILER(procmail)dnl
root@home-nas:~#


My submit.mc:

root@home-nas:~# cat /etc/mail/submit.mc
divert(-1)dnl
#-----------------------------------------------------------------------------
# $Sendmail: submit.mc,v 8.13.8 2006-09-30 07:18:48 cowboy Exp $
#
# Copyright (c) 2000-2005 Richard Nelson. All Rights Reserved.
#
# cf/debian/submit.mc. Generated from submit.mc.in by configure.
#
# submit.mc prototype config file for building Sendmail 8.13.8
#
# Note: the .in file supports 8.7.6 - 9.0.0, but the generated
# file is customized to the version noted above.
#
# This file is used to configure Sendmail for use with Debian systems.
#
# If you modify this file, you will have to regenerate /etc/mail/submit.cf
# by running this file through the m4 preprocessor via one of the following:
# * `sendmailconfig`
# * `make`
# * `m4 /etc/mail/submit.mc > /etc/mail/submit.cf`
# The first two options are preferred as they will also update other files
# that depend upon the contents of this file.
#
# The best documentation for this .mc file is:
# /usr/share/doc/sendmail-doc/cf.README.gz
#
#-----------------------------------------------------------------------------
divert(0)dnl
#
# Copyright (c) 2000-2002 Richard Nelson. All Rights Reserved.
#
# This file is used to configure Sendmail for use with Debian systems.
#
define(`_USE_ETC_MAIL_')dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`$Id: submit.mc, v 8.13.8-2 2006-09-30 07:18:48 cowboy Exp $')
OSTYPE(`debian')dnl
DOMAIN(`debian-msp')dnl
dnl #
dnl #---------------------------------------------------------------------
dnl # Masquerading information, if needed, should go here
dnl # You likely will not need this, as the MTA will do it
dnl #---------------------------------------------------------------------
dnl MASQUERADE_AS()dnl
dnl FEATURE(`masquerade_envelope')dnl
dnl #
dnl #---------------------------------------------------------------------
dnl # The real reason we're here: the FEATURE(msp)
dnl #---------------------------------------------------------------------
FEATURE(`msp', `[127.0.0.1]', `MSA')dnl
dnl #
dnl #---------------------------------------------------------------------
dnl # Some minor cleanup from FEATURE(msp)
dnl #---------------------------------------------------------------------
dnl #
dnl #---------------------------------------------------------------------
root@home-nas:~#


My client-info:

root@home-nas:~# cat /etc/mail/auth/client-info
Authinfo:mail.gmx.net "U:yaya@gmx.net" "I:yaya@gmx.net" "P:xxx" "R:gmx.net" "M:CRAM-MD5"
root@home-nas:~#


My access:

root@home-nas:~# cat /etc/mail/access
localhost.localdomain RELAY
localhost RELAY
127.0.0.1 RELAY
home-nas.lab.test RELAY

root@home-nas:~#


As mentioned before, I don't claim this to be an optimized configuration, but it works. Comments welcome.