LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Sendmail - Can receive external, no local mail though (https://www.linuxquestions.org/questions/linux-software-2/sendmail-can-receive-external-no-local-mail-though-384256/)

macdonalder 11-18-2005 02:29 AM

Sendmail - Can receive external, no local mail though
 
I've got kind of a unique case here so I'll do my best to lay it out as thoroughly as I can.

I have Sendmail 8.13 setup on a RedHat ES4 box and I can recieve mail from outside my network (for instance I can send mail from my hotmail account to my local account) but I can't send any internal mail (I can't send mail from my local account to root using 'mail' from the shell).

Here's what I get from...

/var/log/maillog...
Code:

Nov 18 03:11:29 localhost sm-msp-queue[30333]: jAI7xirL030264: to=root, ctladdr=root (0/0), delay=00:11:45, xdelay=00:00:00, mailer=relay, pri=120029, relay=[127.0.0.1] [127.0.0.1], dsn=4.0.0, stat=Deferred: Connection refused by [127.0.0.1]
/etc/hosts
Code:

127.0.0.1      localhost.localdomain  pegasus localhost
/etc/mail/access
Code:

localhost.localdomain          RELAY
localhost                      RELAY
127.0.0.1                      RELAY

Now here's where things get sticky. My ISP insists on infringing on my ability to host an email server so they've hosed all traffic on port 25 save their own. As a result, I've had to switch to port 26. I've been using rollernet in my domain's MX record to receive mail and forward it to me on port 26 and it's been working very well. I don't use the server to send mail outside the computer yet, but I have plans on getting smtp auth working so that I can send via my ISP's server eventually.

To get Sendmail to listen on port 26 I went like this in my sendmail.mc

Code:

DAEMON_OPTIONS(`Port=26, Name=MTA')dnl
I'm starting to think that was my mistake. Could sendmail, for some reason, be sending local mail to itself for distribution, but trying to connect to itself on 127.0.0.1:25? Seeing as there's nothing listening on 25 I could see how that might fail.

Any direction on this issue would be great. The end goal here is to work is to I'm receiving mail on 26 and local mail gets received and sent to it's proper mailbox.

Thanks in advance.

macdonalder 11-18-2005 02:38 AM

Ahhh well it would seem as though I've answered part of my problem... changing the listening port the way I am *isn't* the right way to do that.

For kicks and giggles I dnl'ed that line and behold, local mail works!

So now, what would be the right way to change the sendmail port?

macdonalder 11-18-2005 03:04 AM

Hah, you've got to love when you answer your own questions.

Went like this...

Code:

DAEMON_OPTIONS(`Port=25, Name=MTA')dnl
DAEMON_OPTIONS(`Port=26, Name=MTA')dnl

... and things are breezy. I'm going to stick with this.

I suppose if anyone feels like chiming in on possible problems I may encounter with this method (security or otherwise) that's be great, otherwise you can probably file this under 'brain fart'.

Cheers,

Chris


All times are GMT -5. The time now is 09:01 AM.