Configuring opensmtpd to send local mails via smarthost

2015-11-25 Thread tomaszdrozdz
Hello everyone.

This time I have problem regarding configuring opensmtpd to send emails from 
local host via my internet mail account.

I have an email account.
I login to it like that:
- I go to poczta.interia.pl
- I enter my email account: tomaszdro...@interia.eu
- I enter password.

Parameters for email client are provided here:
http://info.poczta.interia.pl/pomoc/artykuly,1276750,parametry-do-konfiguracji-programow-pocztowych
 
and I use them to configure my thunderbird.

I wont mail only from my local host to be send via this mail account.
So I do:

1)
 /etc/opensmtpd/
-rw-r-.   1 smtpd smtpd   51 Nov 18 16:07 secrets_for_relay_via
-rw-r-.   1 smtpd smtpd  12K Nov 18 16:07 secrets_for_relay_via.db
-rw-r--r--.   1 root  root   552 Nov 20 15:04 smtpd.conf

secrets_for_relay_via:
tomaszdrozdz_interia_eu:tomaszdrozdz:my_password

makemap secrets_for_relay_via

smtpd.conf:
listen on lo
table secrets_for_relay_via db:/etc/opensmtpd/secrets_for_relay_via.db
accept from local for any relay via 
secure+auth://tomaszdrozdz_interia...@poczta.interia.pl auth 

expire 4h

2)
But I can't sand mail

mailx -v -s "111" tomaszdro...@interia.eu
aaa
EOT
<<< 220 se-gips ESMTP OpenSMTPD
>>> EHLO localhost
<<< 250-se-gips Hello localhost [local], pleased to meet you
<<< 250-8BITMIME
<<< 250-ENHANCEDSTATUSCODES
<<< 250-SIZE 36700160
<<< 250 HELP
>>> MAIL FROM:  
<<< 250 2.0.0: Ok
>>> RCPT TO: 
<<< 250 2.1.5 Destination address valid: Recipient ok
>>> DATA
<<< 354 Enter mail, end with "." on a line by itself
>>> .
<<< 250 2.0.0: c98a78ac Message accepted for delivery
>>> QUIT
<<< 221 2.0.0: Bye

3)
A)
smtpctl show queue

85c504ab74f51fae|local|mta|auth|tomek@se-gips|tomaszdro...@interia.eu|tomaszdro...@interia.eu|1448455016|1448800616|1448455016|0|invalid||

B)
smtpctl show message 85c504ab74f51fae
Received: from localhost (se-gips [local])
by se-gips (OpenSMTPD) with ESMTPA id 85c504ab
for ;
Wed, 25 Nov 2015 12:36:56 + (UTC)
From: tomek 
Message-Id: <6594427050626022671.enqueue@se-gips>
Date: Wed, 25 Nov 2015 13:36:56 +0100
To: tomaszdro...@interia.eu
Subject: 111
User-Agent: Heirloom mailx 12.5 7/5/10
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

aaa

C)smtpctl show envelope 85c504ab74f51fae
version: 2
tag: local
type: mta
smtpname: se-gips
helo: localhost
hostname: se-gips
errorline: Network error on destination MXs
sockaddr: local
sender: tomek@se-gips
rcpt: tomaszdro...@interia.eu
dest: tomaszdro...@interia.eu
ctime: 1448455016
last-try: 0
last-bounce: 0
expire: 345600
retry: 1
flags: authenticated
dsn-notify: 0
esc-class: 4
esc-code: 0
mta-relay: secure+auth://tomaszdrozdz_interia...@poczta.interia.pl
mta-relay-auth: secrets_for_relay_via
mta-relay-flags: tls


D)
tail -f /var/log/maillog

Nov 25 13:36:56 se-gips smtpd[6795]: smtp-in: session 431d387c68f6bc3a: 
connection from host se-gips [local] established
Nov 25 13:36:56 se-gips smtpd[6795]: smtp-in: session 431d387c68f6bc3a: 
msgid=85c504ab, status=Ok, from=, to=, 
size=456, ndest=1, proto=ESMTP
Nov 25 13:36:56 se-gips smtpd[6795]: smtp-in: session 431d387c68f6bc3a: 
connection from host se-gips [local] closed (client sent QUIT)
Nov 25 13:36:56 se-gips smtpd[6795]: smtp-out: session 431d36973983: 
connecting to tls://217.74.64.236:25 (poczta.interia.pl)
Nov 25 13:36:57 se-gips smtpd[6795]: smtp-out: session 431d36973983: TLS 
started version=TLSv1/SSLv3 (), cipher=ECDHE-RSA-AES256-SHA, bits=256
Nov 25 13:36:57 se-gips smtpd[6795]: smtp-out: session 431d36973983: server 
certificate verification succeeded
Nov 25 13:36:58 se-gips smtpd[6795]: smtp-out: session 431d36973983: error: 
AUTH rejected: 535 5.7.8 Error: authentication failed:
Nov 25 13:36:58 se-gips smtpd[6795]: smtp-out: routing: Disabling route [] <-> 
217.74.64.236 (poczta.interia.pl) for 15s
Nov 25 13:36:59 se-gips smtpd[6795]: smtp-out: routing: No valid route for 
[connector:[]->[relay:poczta.interia.pl,starttls,smtps,auth=secrets_for_relay_via:tomaszdrozdz_interia_eu,mx],0x0]
Nov 25 13:37:07 se-gips smtpd[6795]: smtp-out: session : 
evpid=85c504ab74f51fae, status=TempFail, from=, 
to=, rcpt=<->, source=-, relay=poczta.interia.pl, 
delay=11s, stat=Network error on destination MXs
Nov 25 13:37:13 se-gips smtpd[6795]: smtp-out: routing: Enabling route [] <-> 
217.74.64.236 (poczta.interia.pl)



Please help. 

-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org



Re: Configuring opensmtpd to send local mails via smarthost

2015-11-25 Thread Giovanni Bechis
On 11/25/15 13:41, tomaszdro...@interia.eu wrote:
[...]
I have something like this:

> secrets_for_relay_via:
> tomaszdrozdz_interia_eu:tomaszdrozdz:my_password
> 
label tomaszdro...@interia.eu:password

> makemap secrets_for_relay_via
> 
> smtpd.conf:
> listen on lo
> table secrets_for_relay_via db:/etc/opensmtpd/secrets_for_relay_via.db
> accept from local for any relay via 
> secure+auth://tomaszdrozdz_interia...@poczta.interia.pl auth 
> 
> expire 4h
> 
accept from local for any relay via secure+auth://la...@poczta.interia.pl auth 


 Cheers
   Giovanni


-- 
You received this mail because you are subscribed to misc@opensmtpd.org
To unsubscribe, send a mail to: misc+unsubscr...@opensmtpd.org