- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Mailing directly to host: Square brackets no long...
Operating System - HP-UX
1752273
Members
4891
Online
108786
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 07:29 AM
тАО06-04-2009 07:29 AM
In earlier versions of Sendmail you used to be able to enclose the destination hostname or IP in square brackets [ ] and this would bypass the MX lookup and send the message directly to the host. Ex. echo "testing" | mail testuser@[192.168.1.1]
This still works on a test system running Sendmail 8.9. However it does not work on 8.11.1 or 8.13.4, two other versions I'm testing with, instead it always forwards to the "Smart" relay host.
Does anybody know a way to bypass MX and Smart host and send directly to a host using more recent Sendmail versions?
Thanks.
This still works on a test system running Sendmail 8.9. However it does not work on 8.11.1 or 8.13.4, two other versions I'm testing with, instead it always forwards to the "Smart" relay host.
Does anybody know a way to bypass MX and Smart host and send directly to a host using more recent Sendmail versions?
Thanks.
Solved! Go to Solution.
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 08:21 AM
тАО06-04-2009 08:21 AM
Solution
I have 2 servers on the same subnet running v8.11.1 and I can do this here are the details:
$ what /usr/sbin/sendmail
/usr/sbin/sendmail:
Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,
including Sendmail, Inc., and the Regents of the
University of California. All rights reserved.
version.c 8.11.1 (Berkeley) - Revision 1.5 - 2003/05/05
$ echo test | /usr/sbin/sendmail -v dummy@[X.Y.66.71]
dummy@[X.Y.66.71]... Connecting to [X.Y.66.71] via esmtp...
220 destination.mydomain.com ESMTP Sendmail 8.11.1 (Revision 1.5) /8.9.3; Thu, 4 Jun 2009 09:14:14 -0700 (PDT)
>>> EHLO source.mydomain.com
250-destination.mydomain.com Hello source.mydomain.com [X.Y.66.72], pleased to meet you
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
>>> MAIL From: SIZE=5
250 2.1.0... Sender ok
>>> RCPT To:
250 2.1.5... Recipient ok
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 n54GEEs25547 Message accepted for delivery
dummy@[X.Y.66.71]... Sent (n54GEEs25547 Message accepted for delivery)
Closing connection to [X.Y.66.71]
>>> QUIT
221 2.0.0 destination.mydomain.com closing connection
(sorry about the obliteration of hostnames and IP addresses but this is the actual transcript of mail exchange)
$ what /usr/sbin/sendmail
/usr/sbin/sendmail:
Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,
including Sendmail, Inc., and the Regents of the
University of California. All rights reserved.
version.c 8.11.1 (Berkeley) - Revision 1.5 - 2003/05/05
$ echo test | /usr/sbin/sendmail -v dummy@[X.Y.66.71]
dummy@[X.Y.66.71]... Connecting to [X.Y.66.71] via esmtp...
220 destination.mydomain.com ESMTP Sendmail 8.11.1 (Revision 1.5) /8.9.3; Thu, 4 Jun 2009 09:14:14 -0700 (PDT)
>>> EHLO source.mydomain.com
250-destination.mydomain.com Hello source.mydomain.com [X.Y.66.72], pleased to meet you
250-ENHANCEDSTATUSCODES
250-8BITMIME
250-SIZE
250-DSN
250-ONEX
250-ETRN
250-XUSR
250 HELP
>>> MAIL From:
250 2.1.0
>>> RCPT To:
250 2.1.5
>>> DATA
354 Enter mail, end with "." on a line by itself
>>> .
250 2.0.0 n54GEEs25547 Message accepted for delivery
dummy@[X.Y.66.71]... Sent (n54GEEs25547 Message accepted for delivery)
Closing connection to [X.Y.66.71]
>>> QUIT
221 2.0.0 destination.mydomain.com closing connection
(sorry about the obliteration of hostnames and IP addresses but this is the actual transcript of mail exchange)
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 08:33 AM
тАО06-04-2009 08:33 AM
Re: Mailing directly to host: Square brackets no longer work?
Cool! Thank you.
That tells me it must be a configuration issue and not the Sendmail version itself since when I do the same thing on the same version it forces it to the Smart host.
Any ideas what or where that configuration setting might be? I've looked through the .cf file but didn't see anything that appears to control this behavior.
$ what /usr/sbin/sendmail
/usr/sbin/sendmail:
$Revision: 92453-07 linker linker crt0.o B.11.16.01 030415 $
Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,
including Sendmail, Inc., and the Regents of the
University of California. All rights reserved.
version.c 8.11.1 (Berkeley) - 01 December 2006 (PHNE_35485)
$ echo test | /usr/sbin/sendmail -v testuser@[x.x.25.115]
testuser@[x.x.25.115]... Connecting to systemalertsrelay.x.org. via esmtp...
That tells me it must be a configuration issue and not the Sendmail version itself since when I do the same thing on the same version it forces it to the Smart host.
Any ideas what or where that configuration setting might be? I've looked through the .cf file but didn't see anything that appears to control this behavior.
$ what /usr/sbin/sendmail
/usr/sbin/sendmail:
$Revision: 92453-07 linker linker crt0.o B.11.16.01 030415 $
Copyright (c) 1998 HEWLETT PACKARD COMPANY and its licensors,
including Sendmail, Inc., and the Regents of the
University of California. All rights reserved.
version.c 8.11.1 (Berkeley) - 01 December 2006 (PHNE_35485)
$ echo test | /usr/sbin/sendmail -v testuser@[x.x.25.115]
testuser@[x.x.25.115]... Connecting to systemalertsrelay.x.org. via esmtp...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-04-2009 08:49 AM
тАО06-04-2009 08:49 AM
Re: Mailing directly to host: Square brackets no longer work?
if you are traversing through a firewall, the firewall rules might be directing traffic to port 25, directly to the mail server. I have a DS defined in my sendmail.cf but when I use the square brackets it does not use the relay server.
One thing I noticed, it might be by design, if I put the hostname instead of the ip address in the brackets, it connects to the destination but I get a "relaying refused" message, even though the hostname I put there resolves directly to the IP{ address I used while sending the message successfully. So, the square brackets might be something more than a directive to bypass the relay. Not a big sendmail fan here, to be perfectly honest.
One thing I noticed, it might be by design, if I put the hostname instead of the ip address in the brackets, it connects to the destination but I get a "relaying refused" message, even though the hostname I put there resolves directly to the IP{ address I used while sending the message successfully. So, the square brackets might be something more than a directive to bypass the relay. Not a big sendmail fan here, to be perfectly honest.
________________________________
UNIX because I majored in cryptology...
UNIX because I majored in cryptology...
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP