Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Supression of CNAME expansion in sendmail

792 views
Skip to first unread message

Alexander Yegorov

unread,
May 30, 2012, 10:33:57 AM5/30/12
to
Hi Sendmail community,

I have a necessity to supress expansion of CNAME record as domain portion of email address. Example:
domain.com IN CNAME ghs.some.other.domain.net.

As a result, when I am sending out using ema...@domain.com as from field, my MTA rewrites it through canonify ruleset (Canonify2 ruleset) to ema...@ghs.some.other.domain.net.

Need to supress that action.
After readings of sendmail book 4-th edition, no default mechanisms were found.

I have composed interim hack using additional class and addition into Canonify2 ruleset:


# file containing names of hosts,which should not be canonicalized at Canonify2 by $[ $]
F{skipcanonify}/etc/mail/skipcanonify

SCanonofy2=96
.....
# Domains, which are present in skipcanonify will not be canonified on purpose
R$* $| $* < @ $={skipcanonify} > $* $: $2 < @ $3 > $4
.....

cat /etc/mail/skipcanonify
domain.com




Still, it would be nice to know if there is some built in solution?
Would you please advise?

Kees Theunissen

unread,
May 30, 2012, 2:05:33 PM5/30/12
to
Put a line near the top of your sendmail.mc file reading:
define(`confDONT_EXPAND_CNAMES',`True')dnl

But be aware that external servers still might expand the CNAME if:
a: you relay the message through an external server, or
b: you receive mail from external senders.

Servers used by external senders -and the configuration of those
servers- is completely out of your control so you can't rely on this
setting. To be safe the receiving server should be prepared to
accept mail for the expanded CNAME.


Regards,

Kees.

--
Kees Theunissen.

Alexander Yegorov

unread,
May 31, 2012, 10:49:29 AM5/31/12
to
среда, 30 мая 2012 г., 21:05:33 UTC+3 пользователь Kees Theunissen написал:
Thank you for quick advise, Kees.
I realized that receiving server also should be aware about CNAM suppresion.
Message has been deleted

l.soma...@gmail.com

unread,
Mar 24, 2014, 4:00:50 PM3/24/14
to
Hi Kees,

I need help from you. I have one linux domain.
Domain name is actaul.domain.net and i have created the Cname as soma.sekhar.net.
When i sent mail from my out look to mai...@actaul.domain.net the mails are delivering to the server.
but when i sent a mail to mai...@soma.sekhar.net (it is cname) the mails are bouncing back to my from mail id.
in the linux maillog i am able to see the below error?
dsn=5.1.1, stat=User unknown
DSN: User unknown

Can you please help me. how to configure the sendmailconfiguration for the cname mails.

Kees Theunissen

unread,
Mar 24, 2014, 9:04:06 PM3/24/14
to
l.soma...@gmail.com wrote:

> Hi Kees,
>
> I need help from you. I have one linux domain.
> Domain name is actaul.domain.net and i have created the Cname as soma.sekhar.net.
> When i sent mail from my out look to mai...@actaul.domain.net the mails are delivering to the server.
> but when i sent a mail to mai...@soma.sekhar.net (it is cname) the mails are bouncing back to my from mail id.
> in the linux maillog i am able to see the below error?
> dsn=5.1.1, stat=User unknown
> DSN: User unknown
>
> Can you please help me. how to configure the sendmailconfiguration for the cname mails.
>

The CNAME you mentioned doesn't seem to exist:

~$ dig soma.sekhar.net

; <<>> DiG 9.9.4-P2 <<>> soma.sekhar.net
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 4241
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 1

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;soma.sekhar.net. IN A

;; AUTHORITY SECTION:
sekhar.net. 3241 IN SOA ns03.domaincontrol.com. dns.jomax.net.
2013012900 28800 7200 604800 3600

;; Query time: 10 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Tue Mar 25 01:59:43 CET 2014
;; MSG SIZE rcvd: 112


So I guess you should start fixing that.

l.soma...@gmail.com

unread,
Mar 25, 2014, 3:18:28 PM3/25/14
to
Hi Kees,

Yes. Your are correct. soma.sekhar.net is an example. as per security reasons i have not provided the actual cname what i used. here my issue is,
The sendmail is not able to receive the mails with cname.
I have 2 scenarios.
1. Sending a mail to the actual DNS name- It is working now.
2. Sending a mail with Cname to the same server(point1). it is failing.
Can i know the configurations in the sendmail.cf or sendmail.mc/
how to configure the cname?
0 new messages