Re: AW: hello! ... and first question

2018-05-30 Thread Damiano Venturin
On 22/05/18 21:52, Damiano Venturin wrote:
> On 22/05/18 06:48, Michael Taubert wrote:
>>
>> Hi Dam!
>>
>>  
>>
> Hello!
>>
>> Did you try to add „example—com“ to your virtual Domains table? E.g.
>> https://www.opensmtpd.org/faq/example1.html

Let me change the angle a little.

What's the best practice to follow for naming the users when a server
uses multiple domains?

I tried again with u...@example.com which matches the local user
u...@example.com but I get this error which disappears if I remove the
"@" from the local username.

smtpd event=failed-command command="RCPT TO:
NOTIFY=FAILURE,DELAY" result="550 Invalid recipient"

I'm insisting on this because I would like my users to be able to use
"u...@example.com" to login both against IMAP and SMTP avoiding
situations like "user-example--com"

What can I do?



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



Re: AW: hello! ... and first question

2018-05-22 Thread Damiano Venturin
On 22/05/18 06:48, Michael Taubert wrote:
>
> Hi Dam!
>
>  
>
Hello!
>
> Did you try to add „example—com“ to your virtual Domains table? E.g.
> https://www.opensmtpd.org/faq/example1.html
>
>  
>

ehm I'm not sure what to answer ...  yes I've added example.com but I
didn't not add example--com

The thought of adding example--com never crossed my mind. I'll try and
report.

Dam


AW: hello! ... and first question

2018-05-21 Thread Michael Taubert
Hi Dam!

Did you try to add „example—com“ to your virtual Domains table? E.g. 
https://www.opensmtpd.org/faq/example1.html

Best regards,
Michael

Von: Damiano Venturin
Gesendet: Dienstag, 22. Mai 2018 01:16
An: misc@opensmtpd.org
Betreff: hello! ... and first question

Hello, this is Dam

I'm in the process of freeing myself from Gmail and I'm trying to
configure my debian vm as a mailserver using OpenSMTPD.

Back in the days I was used to run my own mailserver with Postfix (then
I don't know what happened to me and I moved to 3rd party services) but
this is my first time with OpenSMTPD so I'm really trying to learn how
to configure it properly.

So far so good I've to say. Chess Griffin's guide has been of great help.

There is one thing that I've noticed: if the local user contains @ in
the name, OpenSTMD can't route an incoming email properly. I'm not sure
if this something expected or a bug or if I'm missing something.

So this is the scenario:

d...@venturin.net sends an email to u...@example.com (123.123.123.123)
which is is mapped on the server as user@example--com.

So this is what you see in my /etc/opensmtd/vuser:

u...@example.com:             user@example--com


As you can see from the log below, the incoming email is accepted, goes
through clamsmtp filtering process (listening on 127.0.0.1:10025)

smtpd[2794]: b22a8aceadaec265 smtp event=connected
address=209.35.192.171 host=mail-pf1-f171.google.com
smtpd[2794]: b22a8aceadaec265 smtp event=message msgid=9c2da050
from= to= size=2847 ndest=1 proto=ESMTP
smtpd[2794]: b22a8aceadaec265 smtp event=closed reason=quit
smtpd[2794]: b22a8ad7d4f8e7b8 mta event=connecting
address=smtp://127.0.0.1:10025 host=localhost
smtpd[2794]: b22a8ad7d4f8e7b8 mta event=connected
smtpd[2794]: b22a8ad89531da2b smtp event=connected address=127.0.0.1
host=localhost
smtpd[2794]: b22a8ad89531da2b smtp event=message msgid=9a2845eb
from= to= size=3043 ndest=1 proto=ESMTP

I think that now OpenSMTPD tries to send back a receipt to the email
server which has sent the email. Am I right?

Accordingly to the configuration, the message is sent again to clamsmtp
which is listening on 127.0.0.1:10027

smtpd[2794]: b22a8ae0d78126ae mta event=connecting
address=smtp://127.0.0.1:10027 host=localhost
smtpd[2794]: b22a8ad7d4f8e7b8 mta event=delivery evpid=9c2da05070285532
from= to= rcpt=<-> source=127.0.0.1
relay=
127.0.0.1 (localhost) delay=11s result=Ok stat=250 2.0.0: 9a2845eb
Message accepted for delivery
smtpd[2794]: b22a8ae0d78126ae mta event=connected

But then something happens: all of the sudden the recipient is no more
u...@example.com but user@example--com (which is the name of the real
local user)

smtpd[2794]: b22a8ae11170b5b4 smtp event=connected address=127.0.0.1
host=localhost
smtpd[2794]: b22a8ae11170b5b4 smtp event=message msgid=f33aeeec
from= to= size=3243 ndest=1 proto=ESMTP
smtpd[2794]: b22a8ae0d78126ae mta event=delivery evpid=9a2845eb454ddf26
from= to=rcpt=
source=127.0.0.1 relay=127.0.0.1 (localhost) delay=5s result=Ok stat=250
2.0.0: f33aeeec Message accepted for delivery
smtpd[2794]: b22a8ad89531da2b smtp event=closed reason=quit
smtpd[2794]: b22a8ad7d4f8e7b8 mta event=closed reason=quit messages=1
smtpd[2794]: smtp-out: Failed to resolve MX for [relay:example--com]:
Domain does not exist

Of course the domain example--com is not found

smtpd[2794]:  mta event=delivery evpid=f33aeeecc889f968
from= to= rcpt=<-> source=-
relay=example--
info delay=5s result=PermFail stat=Domain does not exist
smtpd[2794]: b22a8aeac0c27769 smtp event=connected address=local
host=localhost
smtpd[2794]: b22a8aeac0c27769 smtp event=message msgid=57f4cae9 from=<>
to= size=4459 ndest=1 proto=ESMTP
smtpd[2794]: b22a8aeac0c27769 smtp event=closed reason=quit
smtpd[2794]: b22a8ae11170b5b4 smtp event=message msgid=e121e32c from=<>
to= size=4660 ndest=1 proto=ESMTP
smtpd[2794]: b22a8ae0d78126ae mta event=delivery evpid=57f4cae9a970f282
from=<> to= rcpt=<-> source=127.0.0.1 relay=127.0.0.1 (loc
alhost) delay=1s result=Ok stat=250 2.0.0: e121e32c Message accepted for
delivery
smtpd[2794]: b22a8ae11170b5b4 smtp event=closed reason=quit
smtpd[2794]: b22a8ae0d78126ae mta event=closed reason=quit messages=2
smtpd[2794]: b22a8af88282d316 mta event=connecting
address=smtp+tls://66.102.1.27:25 host=wb-in-f27.1e100.net
smtpd[2794]: b22a8af88282d316 mta event=connected
smtpd[2794]: b22a8af88282d316 mta event=starttls
ciphers=version=TLSv1.2, cipher=ECDHE-RSA-AES128-GCM-SHA256, bits=128
smtpd[2794]: smtp-out: Server certificate verification succeeded on
session b22a8af88282d316
smtpd[2794]: b22a8af88282d316 mta event=delivery evpid=e121e32cb085713e
from=<> to= rcpt=<->