Results 1 to 1 of 1
Hi guys I have two local SMTP servers, one is running on port 25 and the other is running on port 2525. When i use heirloom mailx to send out ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 05-05-2009 #1
- Join Date
- May 2009
Using /usr/sbin/sendmail to deliver message to local SMTP server
I have two local SMTP servers, one is running on port 25 and the other is running on port 2525.
When i use heirloom mailx to send out email, it uses the local SMTP server on port 25. However, i wanted mailx to use local SMTP server on port 2525 instead. So, i edited the system wide configuration file /etc/mail.rc and added in the line "set smtp=127.0.0.1:2525". So now mailx is successfully able to use smtp server on port 2525 instead of smtp server on port 25 to deliver emails.
I also know mailx, when executed, calls the sendmail binary /usr/sbin/sendmail. So now, i want to use the sendmail binary directly to deliver mails, to smtp server on port 2525. However, whenever i invoke sendmail, sendmail will deliver email directly to smtp server on port 25. I want sendmail to deliver email directly to smtp server on port 2525. How do I do that? what config files for sendmail do i have to modify? What command line arguments do i have to pass to sendmail? I know mailx is able to call sendmail and tell sendmail to use local smtp server at port 2525 by adding the above entry to /etc/mail.rc. However, I wish to invoke sendmail directly, instead of allowing mailx to call sendmail. How do i configure sendmail or what command line arguments can i pass to sendmail so that it will contact the local smtp server at port 2525 instead of the local smtp server at port 25???
Thank you very much.