Is it possible to specify a null sender in From line of access database with 'relay_mail_from' feature of sendmail.mc
Issue
- We would like to relay a mail with null sender (MAIL FROM: <>).
- We tried to achieve it by using "FEATURE(
relay_mail_from',domain')" and /etc/mail/access, but we couldn't. - diff of sendmail.mc
@@ -99,7 +99,8 @@
dnl #
FEATURE(local_procmail, `', `procmail -t -Y -a $h -d $u')dnl
FEATURE(`access_db', `hash -T<TMPF> -o /etc/mail/access.db')dnl
-FEATURE(`blacklist_recipients')dnl
+FEATURE(`relay_mail_from', `domain')dnl
+dnl FEATURE(`blacklist_recipients')dnl
EXPOSED_USER(`root')dnl
dnl #
dnl # For using Cyrus-IMAPd as POP3/IMAP server through LMTP delivery uncomment
@@ -113,7 +114,7 @@
dnl # 127.0.0.1 and not on any other network devices. Remove the loopback
dnl # address restriction to accept email from the internet or intranet.
dnl #
-DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
+dnl DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
dnl #
dnl # The following causes sendmail to additionally listen to port 587 for
dnl # mail from MUAs that authenticate. Roaming users who can't reach their
- diff of /etc/mail/access
@@ -7,6 +7,8 @@
# cyrus-sasl-plain package installed.
#
# By default we allow relaying from localhost...
-Connect:localhost.localdomain RELAY
-Connect:localhost RELAY
-Connect:127.0.0.1 RELAY
+#Connect:localhost.localdomain RELAY
+#Connect:localhost RELAY
+#Connect:127.0.0.1 RELAY
+From:<> RELAY
+From:test@example.com RELAY
- But, null sender is not relayed.
# telnet 192.168.122.1 25
Trying 192.168.122.1...
Connected to testmta (192.168.122.1).
Escape character is '^]'.
220 testmta ESMTP Sendmail 8.14.4/8.14.4; Tue, 22 Oct 2013 13:19:48 +0900
HELO localhost
250 testmta Hello testclient [192.168.122.2], pleased to meet you
MAIL FROM:<>
250 2.1.0 <>... Sender ok
RCPT TO:test@example.com
550 5.7.1 test@example.com... Relaying denied <==== failure
Environment
Red Hat Enterprise Linux 6.3
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
