Re: My smtp server can't send emails to another ones (550 Invalid recipient)

2019-09-13 Thread marcio_silva

On 09/13/2019 09:01 PM, Edgar Pettijohn wrote:

Need to add rules to match authenticated users.

match auth from any for any action ...
match auth from any for domain  action ...


Thanks Edgar, it solved the issue!

It was the modification based on your suggestion:

helo-src
action relay_to_inet_subm   relay 
   \

helo-src
action relay_to_inet_subms  relay 
   \
helo-src 


action relay_to_local   relay

#   host 
smtp+tls://la...@smtp.libreware.info:25 \

#   auth

# local
match for   local   \
  from  local   \
action  deliver_to_local
match for   any \
  from  local   \
  tag   lmtp_local  \
action  relay_to_local

# inet
match auth  \
  from  any \
  for   any \
  tag   smtp_server_starttls\
action  relay_to_inet_smtp
match auth  \
  from  any \
  for   any \
  tag   smtp_submission_starttls\
action  relay_to_inet_subm
match auth  \
  from  any \
  for   any \
  tag   smtps_submission\
action  relay_to_inet_subms
match auth  \
  from  any \
  for   domain \
action  deliver_to_inet



Test - mar...@libreware.info -> marcio_si...@risup.net

* Account '/var/mail/marcio': Connecting to SMTP server: 
smtp.libreware.info:587...

*** smtp.libreware.info:587: connection failed (No route to host).
[22:35:00] SMTP< 220 dusseldorf.libreware.info ESMTP OpenSMTPD
[22:35:00] ESMTP> EHLO smtp.libreware.info
[22:35:00] ESMTP< 250-dusseldorf.libreware.info Hello 
smtp.libreware.info [public_ipv4], pleased to meet you

[22:35:00] ESMTP< 250-8BITMIME
[22:35:00] ESMTP< 250-ENHANCEDSTATUSCODES
[22:35:00] ESMTP< 250-SIZE 36700160
[22:35:00] ESMTP< 250-DSN
[22:35:00] ESMTP< 250-STARTTLS
[22:35:00] ESMTP< 250 HELP
[22:35:00] ESMTP> STARTTLS
[22:35:00] ESMTP< 220 2.0.0: Ready to start TLS
[22:35:01] ESMTP> EHLO smtp.libreware.info
[22:35:01] ESMTP< 250-dusseldorf.libreware.info Hello 
smtp.libreware.info [public_ipv4], pleased to meet you

[22:35:01] ESMTP< 250-8BITMIME
[22:35:01] ESMTP< 250-ENHANCEDSTATUSCODES
[22:35:01] ESMTP< 250-SIZE 36700160
[22:35:01] ESMTP< 250-DSN
[22:35:01] ESMTP< 250-AUTH PLAIN LOGIN
[22:35:01] ESMTP< 250 HELP
[22:35:01] ESMTP> [AUTH PLAIN]
[22:35:01] ESMTP< 235 2.0.0: Authentication succeeded
[22:35:02] ESMTP> MAIL FROM: SIZE=991
[22:35:02] SMTP< 250 2.0.0: Ok
[22:35:02] SMTP> RCPT TO:
[22:35:02] SMTP< 250 2.1.5 Destination address valid: Recipient ok
[22:35:02] SMTP> DATA
[22:35:02] SMTP< 354 Enter mail, end with "." on a line by itself
[22:35:02] SMTP> . (EOM)
[22:35:03] SMTP< 250 2.0.0: 5b99ecf6 Message accepted for delivery
* Mail sent successfully.
[22:35:03] SMTP> QUIT
[22:35:03] SMTP< 221 2.0.0: Bye



Re: My smtp server can't send emails to another ones (550 Invalid recipient)

2019-09-13 Thread Edgar Pettijohn
On Fri, Sep 13, 2019 at 08:04:12PM -0300, marcio_silva wrote:
> Hi all,
> 
> I am using Hyperbola distro with the following packages:
> 
> * opensmtpd 6.4.2p1
> * dkimproxy 1.4.1
> 
> I have installed a mail server to send and receive emails with my own domain
> with the following configurations:
> 
> * "smtp.libreware.info" as server
> * "libreware.info" as email address
> * "dusseldorf.libreware.info" as PTR in IPv4
> * "smtp.libreware.info" as PTR in IPv6
> 
> Features that works well:
> 
> * Accessing to port 587 SMTP+TLS
> * Receiving from itself and from another smtp servers around internet (eg.
> riseup.net emails)
> * Sending emails to itself and another @libreware.info users
> 
> Issues:
> 
> * Port 25 to send emails has not been tested
> * Localhost network has not been tested
> * Accessing to port 465 (SMTPS) is not working
> * Sending email to another smtp servers (eg. f...@libreware.info ->
> b...@example.com) is not working by generating 550 error (550 Invalid
> recipient)
> 
> 
> 
> smtpd.conf:
> 
> ## This is the smtpd server system-wide configuration file.
> ## See smtpd.conf(5), aliases(5) and table(5) for more information.
> 
> ca smtp.libreware.info cert
> '/etc/letsencrypt/archive/libreware.info/chain1.pem'
> 
> bounce warn-interval  '4h'
> 
> mta max-deferred  100
> 
> pki smtp.libreware.info cert
> '/etc/letsencrypt/archive/libreware.info/fullchain1.pem'
> pki smtp.libreware.info dhe   auto
> pki smtp.libreware.info key
> '/etc/letsencrypt/archive/libreware.info/privkey1.pem'
> 
> queue compression
> queue ttl '4d'
> 
> smtp ciphers  
> 'HIGH:AES128:!aNULL:!kDH:!kPSK:!NULL:!kRSA:!kRSAPSK:SHA:SHA256:SHA384:!TLSv1'
> smtp max-message-size '35M'
> smtp sub-addr-delim   '+'
> 
> table aliases '/etc/smtpd/tables.d/aliases.conf'
> table credentials '/etc/smtpd/tables.d/credentials.conf'
> table domains '/etc/smtpd/tables.d/domains.conf'
> table hostnames_inet  '/etc/smtpd/tables.d/hostnames.conf'
> table virtuals'/etc/smtpd/tables.d/virtuals.conf'
> 
> 
> 
> action deliver_to_inetmaildir 
> '/var/mail/%{user.username}/inbox'  \
>   alias   
> action deliver_to_local   maildir 
> '/var/mail/%{user.username}/inbox'  \
>   virtual 
> action relay_to_inet_smtp relay
>   helo-src
> action relay_to_inet_subm relay   
> \
>   helo-src
> \
>   host
> smtp+tls://la...@smtp.libreware.info:25 \
>   auth
> action relay_to_inet_submsrelay   
> \
>   helo-src
> \
>   host
> smtp+tls://la...@smtp.libreware.info:25 \
>   auth
> action relay_to_local relay
> 
> listen on lo  port   24   \
>   tag lmtp_local
> listen on eth0auth-optional  
> \
>   ca  smtp.libreware.info \
>   hostnames   \
>   mask-src\
>   pki smtp.libreware.info \
>   port   25   \
>   tag smtp_server_starttls\
>   tls-require
> listen on eth0auth   
> \
>   ca  smtp.libreware.info \
>   hostnames   \
>   mask-src\
>   pki smtp.libreware.info \
>   port  465   \
>   smtps   \
>   tag smtps_submission
> listen on eth0auth   
> \
>   ca  smtp.libreware.info \
>   hostnames   \
>   mask-src\
>   pki smtp.libreware.info \
>   port  587   \
>   tag smtp_submission_starttls\
>   

My smtp server can't send emails to another ones (550 Invalid recipient)

2019-09-13 Thread marcio_silva

Hi all,

I am using Hyperbola distro with the following packages:

* opensmtpd 6.4.2p1
* dkimproxy 1.4.1

I have installed a mail server to send and receive emails with my own 
domain with the following configurations:


* "smtp.libreware.info" as server
* "libreware.info" as email address
* "dusseldorf.libreware.info" as PTR in IPv4
* "smtp.libreware.info" as PTR in IPv6

Features that works well:

* Accessing to port 587 SMTP+TLS
* Receiving from itself and from another smtp servers around internet 
(eg. riseup.net emails)

* Sending emails to itself and another @libreware.info users

Issues:

* Port 25 to send emails has not been tested
* Localhost network has not been tested
* Accessing to port 465 (SMTPS) is not working
* Sending email to another smtp servers (eg. f...@libreware.info -> 
b...@example.com) is not working by generating 550 error (550 Invalid 
recipient)




smtpd.conf:

## This is the smtpd server system-wide configuration file.
## See smtpd.conf(5), aliases(5) and table(5) for more information.

ca smtp.libreware.info cert 
'/etc/letsencrypt/archive/libreware.info/chain1.pem'


bounce warn-interval'4h'

mta max-deferred100

pki smtp.libreware.info cert 
'/etc/letsencrypt/archive/libreware.info/fullchain1.pem'

pki smtp.libreware.info dhe auto
pki smtp.libreware.info key 
'/etc/letsencrypt/archive/libreware.info/privkey1.pem'


queue compression
queue ttl   '4d'

smtp ciphers		 
'HIGH:AES128:!aNULL:!kDH:!kPSK:!NULL:!kRSA:!kRSAPSK:SHA:SHA256:SHA384:!TLSv1'

smtp max-message-size   '35M'
smtp sub-addr-delim '+'

table aliases   '/etc/smtpd/tables.d/aliases.conf'
table credentials   '/etc/smtpd/tables.d/credentials.conf'
table domains   '/etc/smtpd/tables.d/domains.conf'
table hostnames_inet'/etc/smtpd/tables.d/hostnames.conf'
table virtuals  '/etc/smtpd/tables.d/virtuals.conf'



action deliver_to_inet  maildir 
'/var/mail/%{user.username}/inbox'  \
alias   
action deliver_to_local maildir 
'/var/mail/%{user.username}/inbox'  \
virtual 
action relay_to_inet_smtp   relay
helo-src
action relay_to_inet_subm   relay   
\
helo-src
  \
host
smtp+tls://la...@smtp.libreware.info:25 \
auth
action relay_to_inet_subms  relay   
\
helo-src
  \
host
smtp+tls://la...@smtp.libreware.info:25 \
auth
action relay_to_local   relay

listen on loport   24   \
tag lmtp_local
listen on eth0  auth-optional\
ca  smtp.libreware.info \
hostnames \
mask-src\
pki smtp.libreware.info \
port   25   \
tag smtp_server_starttls\
tls-require
listen on eth0  auth \
ca  smtp.libreware.info \
hostnames \
mask-src\
pki smtp.libreware.info \
port  465   \
smtps   \
tag smtps_submission
listen on eth0  auth \
ca  smtp.libreware.info \
hostnames \
mask-src\
pki smtp.libreware.info \
port  587   \
tag smtp_submission_starttls\
tls-require

match for   domain   \
  from  any \
action  deliver_to_inet
match for   local   \