- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Change SMTP Port for outgoing mail
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
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
Community
Resources
Forums
Blogs
- 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-19-2009 05:51 AM
06-19-2009 05:51 AM
My unix is configured to connect to my Exchenge server relay.
Problem - the administrator of exchange, change the port 25 to 2525 and my unix server cant reach that port.
telnet 10.0.0.1 25
Trying...
telnet: Unable to connect to remote host: Connection refused
telnet 10.0.0.1 2525
Trying...
Connected to zeus Escape character is '^]'.
220 zeus Microsoft ESMTP MAIL Service, Version: 6.0.3790.1830 ready at Fri, 19 Jun 2009 10:50:22 -0300
Can I change the unix sendmail.cf to send all mails to port 2525 instead of 25?
Thanks.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2009 06:05 AM
06-19-2009 06:05 AM
Solutionhttp://www.sendmail.org/faq/section3
How do I send using an alternate port?
The port used for outgoing SMTP connections can be changed via the respective *_MAILER_ARGS macros for the various SMTP mailers. In a default configuration, sendmail uses either the relay mailer (for e.g. SMART_HOST when no mailer is specified) or the esmtp mailer (when sending directly to the MX of the recipient domain).
So, if you want all outgoing SMTP connections to use port 2525, you can use this in your .mc file:
define(`RELAY_MAILER_ARGS', `TCP $h 2525') define(`ESMTP_MAILER_ARGS', `TCP $h 2525')
If you want to use an alternate port only for specific destinations, change (e.g.) only the RELAY_MAILER_ARGS, and make sure the relay mailer is not used for anything else. E.g. you can have sendmail use port 2525 only when sending to your domain with this in your .mc file:
FEATURE(`mailertable') define(`confRELAY_MAILER', `esmtp') define(`RELAY_MAILER_ARGS', `TCP $h 2525')
and then in your mailertable:
yourdomain.com relay:mail.yourdomain.com
This will force sendmail to use port 2525 for connections to yourdomain.com. Of course, change 2525 to whatever alternate port number you wish to use.
These are changes to the sendmail.mc file, which has a different filename in HP-UX.
http://www.hpux.ws/buildmail.hpux.text
That script identifies the file names.
SEP
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2009 08:35 AM
06-19-2009 08:35 AM
Re: Change SMTP Port for outgoing mail
define(`RELAY_MAILER_ARGS', `TCP $h 2525')
define(`ESMTP_MAILER_ARGS', `TCP $h 2525')
When I start sendmail this errors occurs:
/etc/mail/sendmail.cf: line 13: unknown configuration line "define(`RELAY_MAILER_ARGS', `TCP h 2525')"
/etc/mail/sendmail.cf: line 14: unknown configuration line "define(`ESMTP_MAILER_ARGS', `TCP h 2525')"
554 5.0.0 /etc/mail/sendmail.cf: line 13: unknown configuration line "define(`RELAY_MAILER_ARGS', `TCP h 2525')"
554 5.0.0 /etc/mail/sendmail.cf: line 14: unknown configuration line "define(`ESMTP_MAILER_ARGS', `TCP h 2525')"
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2009 08:56 AM
06-19-2009 08:56 AM
Re: Change SMTP Port for outgoing mail
> [...] in sendmail.cf
"mc" and "cf" are spelled differently for a
reason.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-19-2009 09:05 AM
06-19-2009 09:05 AM
Re: Change SMTP Port for outgoing mail
Change /etc/services
smtp 2525/tcp # Simple Mail Transfer Protocol
Change /etc/mail/sendmail.cf
ClientPortOptions=Port=2525,Address=10.0.2.24
Restart sendmail and now its working
Thanks.