Sendmail

From John Freier
Jump to: navigation, search

Sendmail is the SMTP server for fedora 10, I think it came packaged with it...but not for sure if I installed it earlier.

To get sendmail to listing a multiply ports edit sendmail.cf

/etc/mail/sendmail.cf


Article [1]

Basically you add an option line to your sendmail.cf file. The option is called "DaemonPortOptions". This option that came out in Sendmail 8.10, it let's sendmail listen on multiple ports without having to run a separate sendmail instance for each port. When the DaemonPortOptions is put in your sendmail.cf (or added it to your master sendmail.mc), the sendmail daemon listens on the ports specified. i.e. And exact line

O DaemonPortOptions=Name=MSA
O DaemonPortOptions=Name=FredMail, Addr=134.5.175.4, Port=580, Modifiers=bh

Some examples if you want to make the changes to your master /etc/mail/sendmail.cf :

O DaemonPortOptions=Name=FredMail, Addr=134.5.175.5, Port=580, Modifiers=bh
O DaemonPortOptions=Name=quickiemart.com, Addr=smtp.quickiemart.com
O DaemonPortOptions=Name=MTA, Addr=134.5.175.5, Port=smtp, Modifiers=bh
O DaemonPortOptions=Port=580, Name=MSA, M=E

Configuration options: DaemonPortOptions=Name=name, Modifiers=modifiers, Family=family, Address=addr, Port=port, Listen=listen, SndBufSize=size, RcvBufSizesize

The example below shows the lines required to modify your master sendmail.mc so you can have a good template for your mail server.

Remember to recompile you sendmail.mc if you modify it: m4 sendmail.mc > /etc/sendmail.cf

   *
     Some examples if you want to make the changes to your master /etc/mail/sendmail.mc :
     DAEMON_OPTIONS(`Name=FredMail, Addr=134.5.175.5, Port=580, Modifiers=bh')
     DAEMON_OPTIONS(`Name=quickiemart.com, Addr=smtp.quickiemart.com')
     DAEMON_OPTIONS(`Name=MTA, Addr=134.5.175.5, Port=smtp, Modifiers=bh')
     DAEMON_OPTIONS(`Port=580, Name=MSA, M=E')


When you are done making your changes do not forget to restart your mail server:

/etc/mail/sendmail stop
/etc/mail/sendmail start


For my machine with @sourc.com The below line will tell sendmail to listen on another port besides, 25, and having the addr=192.168.1.101 will allow it to lisenting to other addresses beside localhost.

O DaemonPortOptions=Port=940,Addr=192.168.1.101,Name=SourcMail,Modifiers=bh




Add domain to Host file

If having permission problems be sure to add domain to host file.

/etc/mail/local-host-names

add in domain "sourc.com"