1

I have the following setup:

My Ubuntu (14.04) server gets a host name from DHCP (real.host.de) and there is a DNS alias (alias.host.de) that points to this host name.

Now I want to configure sendmail in a fashion that uses the alias name for the sender address.

 

When I'm using the following command to send an E-Mail using sendmail...

 echo -e "Subject:A Test\nFrom:[email protected]\nNO TEXT" | sendmail -f [email protected] -v [email protected]

...the recipient receives an E-Mail from [email protected].

 

Excerpt from sendmail.mc:

dnl # Masquerading options
FEATURE(`always_add_domain')dnl
MASQUERADE_AS(`alias.host.de')dnl
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl

dnl # Default Mailer setup
MAILER_DEFINITIONS
MAILER(`local')dnl
MAILER(`smtp')dnl

define(`confCW_FILE', `/etc/mail/local-host-names')dnl
define(`confDOMAIN_NAME', `alias.host.de')dnl

local-host-names does include the domain name and /etc/hosts does not. However, adding the domain name to /etc/hosts/ did not seem to change anything.

sendmail -bt -d0.1 </dev/null shows:

Version 8.14.4
 Compiled with: DNSMAP LDAPMAP LDAP_REFERRALS LOG MAP_REGEX MATCHGECOS
                MILTER MIME7TO8 MIME8TO7 NAMED_BIND NETINET NETINET6 NETUNIX
                NEWDB NIS NISPLUS PIPELINING SASLv2 SCANF SOCKETMAP STARTTLS
                TCPWRAPPERS USERDB USE_LDAP_INIT XDEBUG

============ SYSTEM IDENTITY (after readcf) ============
      (short domain name) $w = real
  (canonical domain name) $j = alias.host.de
         (subdomain name) $m = host.DE
              (node name) $k = alias
========================================================

ADDRESS TEST MODE (ruleset 3 NOT automatically invoked)
Enter <ruleset> <address>

 

Do you have any suggestions to correct the settings?

0

You must log in to answer this question.

Browse other questions tagged .