subject: newbie config smtp-cli & postfix
date: Oct 9/2009

I want to  mail from Linux logged in user accounts to the internet
and more importantly from Korn shell scripts to the internet.
so scripts running by cron could email error situations to people at home.
I do not want to receive any email from the internet to linux logged on users
via postfix. (postfix mail between users logged on to the RH linux works OK)
I use Thunderbird for my email from internet.

Previously I installed postfix (postfix-2.3.3-2.x86_64.rpm),
changed config file /etc/postfix/main.cf to 'relayhost = smtp.webfaction.com'
and tried to send using 'mail' (got errs you can see on website as below)

I was told that smtp-cli is a simpler way for what I want to do
so I installed smtp-cli 2.6 & ran following tests
& got following messages in /var/log/postfix

test1--> smtp-cli --from uvsoft4 --to o...@uvsoftware.ca --subject "test1" \
                 --body-plain "test1 oct 9 11:24"

Oct  9 11:30:31 uvsoft4 postfix/smtp[7230]:
connect to mx7.webfaction.com[174.133.156.178]:
No route to host (port 25)

Oct  9 11:30:31 uvsoft4 postfix/smtp[7230]: C3B9C46962:
to=<o...@uvsoftware.ca>, relay=none, delay=6.2,
delays=0.07/0.01/6.1/0, dsn=4.4.1, status=deferred
(connect to mx7.webfaction.com[174.133.156.178]:
No route to host)

Note - I am only showing 2 most significant lines of /var/log/maillog
      (broken on multiple lines for ease of reading)
    - see all lines at the URLs listed further below

Since I saw 'no route to host port 25', I changed /etc/postfix/main.cf to:
relayhost = [smtp.webfaction.com]:587, reran & got following:

test2--> smtp-cli --from uvsoft4 --to o...@uvsoftware.ca --subject "test2" \
                 --body-plain "test2 oct 9 12:40"

Oct  9 12:42:05 uvsoft4 postfix/smtp[10496]: ECF0546964:
to=<o...@uvsoftware.ca>, relay=smtp.webfaction.com[74.55.86.74]:587,
delay=0.62, delays=0.07/0.01/0.4/0.14, dsn=5.7.1,
status=bounced (host smtp.webfaction.com[74.55.86.74] said: 554 5.7.1
<65-38-39-25.dhcp465.dsl.ucc-net.ca[65.38.39.25]>: Client host rejected:
Access denied (in reply to RCPT TO command))

Oct  9 12:42:05 uvsoft4 postfix/local[10504]: A63F046967:
to=<uvso...@uvsoft4.localdomain>, relay=local, delay=0.06,
delays=0.02/0.01/0/0.02, dsn=5.1.1, status=bounced
(unknown user: "uvsoft4")

See complete maillog's (test1=maillog5_smtpcli & test2=maillog6_smtpcli)
on my website as follows:

www.uvsoftware.ca/postfix/smtpcli_test1    <-- command line for smtp-cli
www.uvsoftware.ca/postfix/maillog5_smtpcli <-- /var/log/maillog Oct 9 test1
www.uvsoftware.ca/postfix/maillog6_smtpcli <-- /var/log/maillog Oct 9 test2
www.uvsoftware.ca/postfix/main.cf          <-- my postfix config file
www.uvsoftware.ca/postfix/maillog1,2,3,4 <-- old tests using mail vs smtp-cli

I am using a router to get to the internet & my ISP
- router gateway adress to the internet is 192.168.0.1
- my linux Red Hat computer is 192.168.0.4

For each test I did following:
1. service postfix stop
2. > /var/log/maillog
3. service postfix start
4. smtp-cli ...           <-- see complete command above
5. service postfix stop
6. capture /var/log/maillog & assign test# (maillog1,2,3,4,5,etc)

Note - somebody on postfix user list said I might need SASL library
- BUT I can't find a recent rpm for my RHEL 5 x86_64 ?
I found cyrus-sasl-2.1.1.19-14.x86_64.rpm but hesitant to try it ?

Hope you can help me with this problem

Thanks, Owen

Reply via email to