Open other ports for sending mail

I am using mailx to sending out mail, but the mail server is not using SMTP port 25. how can i configure to use other port insted of 25 port.

I have tried to modify the line in /etc/mail/sendmail.cf to change the port. But failed. below is the line that i modified.
O DaemonPortOptions=Port=2825, Name=MSA, M=E

Please help. thanks!:slight_smile:

Well, basically that the right approach, did you restart sendmail afterwards ? Here's an article that suggests another solution. Note : I haven't tested this.

Thanks for your reply.

I have restarted the sendmail process after modified the snedmail.cf, but still found failed.

from your provided link solution, there is no sendmail.mc file.

Would you please help to solve my problem, thanks!

The location of the mc or m4 files is dependent on distribution or OS, what OS are you using?

I am using Solaris 10:
Kernel version: SunOS 5.10 Generic_137111-01

I found a sendmail.mc file in the directory /etc/mail/cf/cf. But this file only contained few lines.

Below is the file content:
divert(0)dnl
VERSIONID(`@(#)sendmail.mc 1.11 (Sun) 06/21/04')
OSTYPE(`solaris8')dnl
DOMAIN(`solaris-generic')dnl
define(`confFALLBACK_SMARTHOST', `mailhost$?m.$m$.')dnl
MAILER(`local')dnl
MAILER(`smtp')dnl
DAEMON_OPTIONS(`Port=8925,Addr=127.0.0.1, Name=MTA')

LOCAL_NET_CONFIG
R$* < @ $* .$m. > $* $#esmtp $@ $2.$m $: $1 < @ $2.$m. > $3

Thanks!!

I full configuration macros are in /usr/lib/mail/cf.

For a basic introduction see here: Building a sendmail Configuration File (System Administration Guide, Volume 3) - Sun Microsystems