LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   sendmail basic understanding of operation needed for configuration (https://www.linuxquestions.org/questions/linux-newbie-8/sendmail-basic-understanding-of-operation-needed-for-configuration-4175461969/)

burkecabaniss 05-14-2013 04:03 PM

sendmail basic understanding of operation needed for configuration
 
I process sendmail messages without error as shown by a log below. But I don't understand the basic process and don't receive the mail in my Internet mailbox. In fc13 my script worked, in fc18 it doesn't.

I send TBird e-mails through imap.ipage.com and port 143 using a password. I find nothing in my sendmail configuration for this. Should I have ? If so which file ? As you recognize, I do not know whether sendmail on my machine can publish directo to the recipient over the Internet or not.

I have read all threads with sendmail in the title, and still have the basic question above. Sorry. I do not need SSL security. I do not want to relay or receive mail, or publish anywhere but to Internet addresses with DNS elsewhere. I understand that my mail is spooled to localhost but do not know if that is a precursor to the Internet delivery or is an alternative because my configuration is incomplete.

31697 <<< To:burke@bsacompany.com
31697 <<< From:burketest
31697 <<< subject: RC=22; FIRST Error Message Added information.
31697 <<< .
31697 === CONNECT [127.0.0.1]
31697 <<< 220 bsamain01.bsa.com ESMTP Sendmail 8.14.7/8.14.7; Tue, 14 May 2013 15:09:35 -0500
31697 >>> EHLO bsamain01.bsa.com
31697 <<< 250-bsamain01.bsa.com Hello localhost [127.0.0.1], pleased to meet you
31697 <<< 250-ENHANCEDSTATUSCODES
31697 <<< 250-PIPELINING
31697 <<< 250-8BITMIME
31697 <<< 250-SIZE
31697 <<< 250-DSN
31697 <<< 250-ETRN
31697 <<< 250-AUTH GSSAPI DIGEST-MD5 CRAM-MD5
31697 <<< 250-DELIVERBY
31697 <<< 250 HELP
31697 >>> MAIL From:<root@bsamain01.bsa.com> SIZE=95 AUTH=root@bsamain01.bsa.com
31697 <<< 250 2.1.0 <root@bsamain01.bsa.com>... Sender ok
31697 >>> RCPT To:<burke@bsacompany.com>
31697 >>> DATA
31697 <<< 250 2.1.5 <burke@bsacompany.com>... Recipient ok
31697 <<< 354 Enter mail, end with "." on a line by itself
31697 >>> Received: (from root@localhost)
31697 >>> by bsamain01.bsa.com (8.14.7/8.14.4/Submit) id r4EK9YBZ031697;
31697 >>> Tue, 14 May 2013 15:09:34 -0500
31697 >>> Date: Tue, 14 May 2013 15:09:34 -0500
31697 >>> Message-Id: <201305142009.r4EK9YBZ031697@bsamain01.bsa.com>
31697 >>> To:burke@bsacompany.com
31697 >>> From:burketest@bsamain01.bsa.com
31697 >>> subject: RC=22; FIRST Error Message Added information.
31697 >>>
31697 >>> .
31697 <<< 250 2.0.0 r4EK9Z3a031698 Message accepted for delivery
31697 >>> QUIT
31697 <<< 221 2.0.0 bsamain01.bsa.com closing connection

business_kid 05-15-2013 11:11 AM

Basic, basic operation is that sendmail hogs port 25, which is the smtp port. It does smtp, and that only.
Mail out: other things send to 127.0.0.1:25 and sendmail picks it up and deals with it.
Mail in: Lands on port 25, sendmail has a look and decides it's mail for here, and gives it to whatever MDA (Mail Delivery Agent) is set up. Check sendmail.conf.

Usual gotcha: If you're on an isp, they don't like you running servers and don't accept mail from other networks if it's not sent to their network. Otherwi9se, they would relay spam. So yourlocalnet.com will be rejected or dropped by isp.com.

Handy test: Save an email as email.txt. Set up debug mode. To deliver it, use
cat email.txt |127.0.0.1:25 and watch what happens.

Z038 05-15-2013 11:49 AM

business kid, what should happen when you run "cat email.txt |127.0.0.1:25"? I get an error, permission denied or command not found when piping to 127.0.0.1:25, depending on if I'm a regular user or root. If I use redirection instead, "cat email.txt > 127.0.0.1:25", the command completes, but I don't see any output or messages anywhere.

business_kid 05-15-2013 02:28 PM

have you a file 127.0.0.1:25? That's what the '>' does. | gives it a pipe.

The fact that you don't have logs of it as a luser means you don't have permission. Go figure. There'll be as group - mail, or something. Join that. That probably writes in /var/something. Can you touch a file there?

Z038 05-15-2013 02:41 PM

I checked /var/log/maillog, and there are no error messages there. No error messages in syslog either.

I created a file called email.txt. As root:

Code:

# cat email.txt |127.0.0.1:25
bash: 127.0.0.1:25: command not found


business_kid 05-16-2013 03:24 AM

The file is unwanted, sorry for confusion, delete it.
cat email.txt > 127.0.0.1:25 might well make a file, which is unwanted.

cat email.txt |127.0.0.1:25 pipes it to that address that sendmail monitors

With the file there, cat email.txt | 127.0.0.1:25 sends email.txt as data to the program 127.0.0.1:25 :-/. Except it's not marked executable, so it barfed.

Delete the file 127.0.0.1:25 any time it appears


All times are GMT -5. The time now is 05:43 PM.