LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Problems with outgoing sendmail (https://www.linuxquestions.org/questions/linux-newbie-8/problems-with-outgoing-sendmail-637327/)

sarsaeol 04-23-2008 12:20 PM

Problems with outgoing sendmail
 
hi all:

very new to the linux world and even newer to LQ. I have recently been setting up my first web/email server with apache and sendmail. My current issue is with sendmail not handling outgoing messages properly (or rather, sendmail not understanding my novice configuration.)

yesterday i had the problem of the localhost (127.0.0.1) refusing connections for outgoing mail. which i remedied by commenting out

daemon_options ('port=smtp, addr=127.0.0.1, name=mta')dnl

in the sendmail.mc...

this allowed me to send mails to external servers and it worked... for a few hours. Then i tried to enable masquerading so mail would not appear to come from user@localhost.localdomain. (i have now learned that this is the not the best way to do this) i edited the following lines:

local_domain ('localhost.localdomain')dnl --> local_domain ('my url')dnl (which i think was an incorrect edit)

uncommented masquerade options to make them active:

masquerade_as ('mydomain.com')dnl
feature (masquerade_envelope)dnl
feature (masquerade_entire_domain)dnl
masquerade_domain (localhost.localdomain)dnl

now i did not make any edits to the values in parentheses so im sure this is why masquerading did not work for me.. help on that will be appreciated as well.

however, after i tested masq and it failed i returned sendmail.mc to it's original config and outgoing test messages do not get received by the external address. however i checked maillog and:

Apr 22 19:03:35 localhost sendmail[23470]: m3N23VX5023468: to=<recipient1@gmail.com>, ctladdr=<user@localhost.localdomain> (501/0), delay=00:00:04, xdelay=00:00:04, mailer=esmtp, pri=150479, relay=gmail-smtp-in.l.google.com. [209.85.133.114], dsn=2.0.0, stat=Sent (OK 1208928821 b37si10590989ana.23)
Apr 22 19:03:37 localhost sendmail[23470]: m3N23VX5023468: to=<recipient2@gnaps.com>, ctladdr=<user@localhost.localdomain> (501/0), delay=00:00:06, xdelay=00:00:02, mailer=esmtp, pri=150479, relay=postoffice.xxxxx.com. [xxx.xxx.x.xx], dsn=2.0.0, stat=Sent (m3N5WZ0J003955 Message accepted for delivery)
Apr 23 04:02:10 localhost sendmail[24848]: m3NB23ES024848: from=root, size=72835, class=0, nrcpts=1, msgid=<200804231102.m3NB23ES024848@localhost.localdomain>, relay=root@localhost
Apr 23 04:02:10 localhost sendmail[25128]: m3NB2AOS025128: from=<root@localhost.localdomain>, size=73115, class=0, nrcpts=1, msgid=<200804231102.m3NB23ES024848@localhost.localdomain>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]

so it seems that sendmail IS sending the messages correctly, and i know some servers reject mail coming from localhost.localdomain.. but these same recipient addresses worked only a few hours before i started messing with masquerading. thus, i'm utterly confused.

any help with masquerading or this outgoing mail issue will be greatly appreciated. thank you in advance


SaRS AeOL

Systematic Arsenal Running Society, the Algorithm Eats Oc48 Lines

sarsaeol 04-23-2008 05:55 PM

anybody wanna help me?

cmnorton 04-24-2008 04:39 PM

Possible Answer For One Problem
 
It is just my opinion, but I would tackle your problems by taking one at a time.

Basically, I use sendmail in a very restricted way, so I am not sure how much help I can be.

I have a masquerade_as statement, and it looks like this:

MASQUERADE_AS(`town.arlington.ma.us')dnl

I did not have the feature sub-statements.

I have found "the bat book", O'Reilly's sendmail, to be quite valuable, and was well worth the price. I would suggest investing in it.

sarsaeol 04-24-2008 09:14 PM

Thank you, having a bit of trouble keeping it all straight in this crazy world. i'm still doing my homework and greatly appreciate the book recommendation, which i now have next to me opened to page 19 (i love the los angeles library.) ONWARD!



-SaRS AeOL


All times are GMT -5. The time now is 03:54 AM.