Hello Edgar,
Thank you very much, I couldn't locate where the problem was. The problem is 
solved with %{dest.user}Yes I mixed a user base table and an alias table but I 
just followed examples on the 
sitehttps://www.openbsd.org/opensmtpd/faq/example1.html#smtpd

Thank you for your suggestions. You're telling me to write
listen on lobut I havelisten on 127.0.0.1 port 10024 tag CLAM_IN # Inbound 
Emails Clamav
listen on 127.0.0.1 port 10028 tag DKIM_IN # Inbound Emails dkimproxylisten on 
127.0.0.1
listen on 127.0.0.1 port 10026 tag CLAM_OUT # Outbound Emails Clamav
listen on 127.0.0.1 port 10030 tag DKIM_OUT # Outbound Emails dkimproxy
But I think in my configuration I need the tags and lo is the same as 
127.0.0.1, what's the difference ?

 The same forlisten on egressI wrotelisten on 10.255.89.250 port 25 tls pki 
smtp.mydomain.org auth-optional <passwords>
listen on 10.255.89.250 port 587 tls-require pki smtp.mydomain.org auth 
<passwords>I really need to write the port and the policy, no ?
Have a nice day

    Le Dimanche 21 août 2016 18h06, Edgar Pettijohn <ed...@pettijohn-web.com> a 
écrit :
 
 

 On 16-08-21 07:54:12, Mik J wrote:
> Hello,
> This is my configuration
> table domains file:/etc/mail/domaines
> table aliases file:/etc/mail/aliases
> table users file:/etc/mail/users
> table courriels file:/etc/mail/courriels
> table passwords file:/etc/mail/passwords
> table clients file:/etc/mail/clients
> 
> max-message-size 50M
> 
> pki smtp.mydomain.org certificate "/etc/ssl/certs/smtp.mydomain.org.crt"
> pki smtp.mydomain.org key "/etc/ssl/private/smtp.mydomain.org.key"
> 
> #################
> # INBOUND MAILS #
> #################
> listen on 127.0.0.1 port 10024 tag CLAM_IN # Inbound Emails Clamav
> listen on 127.0.0.1 port 10028 tag DKIM_IN # Inbound Emails dkimproxy
>

Try this:
 
> accept tagged CLAM_IN for domain <domains> virtual <users> deliver to maildir 
> "/var/mail/vmail/%{rcpt.domain}/%{rcpt.user}/Maildir"
                                                                                
                                  ^^^^
%{dest.user}
                  
If not look below ...
 
> accept tagged CLAM_IN for local alias <aliases> deliver to maildir 
> "/var/mail/vmail/%{rcpt.domain}/%{rcpt.user}/Maildir"
> accept tagged DKIM_IN for any relay via smtp://127.0.0.1:10023
> accept from local for domain <domains> relay via smtp://127.0.0.1:10027
> accept from source <clients> for domain <domains> relay via 
> smtp://127.0.0.1:10027
> accept from any sender !<courriels> for domain <domains> relay via 
> smtp://127.0.0.1:10027
> 
> ##################
> # OUTBOUND MAILS #
> ##################
> listen on 127.0.0.1
> listen on 127.0.0.1 port 10026 tag CLAM_OUT # Outbound Emails Clamav
> listen on 127.0.0.1 port 10030 tag DKIM_OUT # Outbound Emails dkimproxy
> listen on 10.255.89.250 port 25 tls pki smtp.mydomain.org auth-optional 
> <passwords>
> listen on 10.255.89.250 port 587 tls-require pki smtp.mydomain.org auth 
> <passwords>
> 
> accept tagged CLAM_OUT for any relay via smtp://127.0.0.1:10029
> accept tagged DKIM_OUT for any relay
> accept from local for any relay via smtp://127.0.0.1:10025
> accept from source <clients> for any relay via smtp://127.0.0.1:10025
> 
> # cat /etc/mail/courriels
> @mydomain.org
> 
> # cat /etc/mail/users
> i...@mydomain.org u...@mydomain.org
> u...@mydomain.org vmail

You are mixing a userbase table with an alias table.  Try something a little 
simpler without all the redirection.

smtpd.conf

table users passwd:/etc/mail/vusers.db
table aliases db:/etc/mail/aliases.db

listen on lo0
listen on egress

accept from any for domain "example.com" userbase <users> alias <aliases> 
deliver to maildir

/etc/mail/vusers
user:<password>:5000:5000::/var/vmail:/sbin/nologin

/etc/mail/aliases
user:    user1

> 
> 
> Logs
> Aug 21 09:38:04 mysmtp smtpd[1986]: smtp-in: New session efae73fbac2080c1 
> from host mail-x-x.google.com [x.x.218.49]
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-in: Started TLS on session 
> efae73fbac2080c1: version=TLSv1.2, cipher=ECDHE-RSA-AES128-GCM-SHA256, 
> bits=128
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-in: Accepted message ab0439bc on 
> session efae73fbac2080c1: from=<personal...@gmail.com>, 
> to=<i...@mydomain.org>, size=2627, ndest=1, proto=ESMTP
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-out: Connecting to 
> smtp://127.0.0.1:10027 (localhost) on session efae7405008428c6...
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-out: Connected on session 
> efae7405008428c6
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-in: New session efae74061f50e98f 
> from host localhost [127.0.0.1]
> Aug 21 09:38:05 mysmtp smtpd[1986]: smtp-in: Closing session efae73fbac2080c1
> Aug 21 09:38:06 mysmtp dkimproxy.in[31732]: DKIM verify - pass; 
> message-id=<cadhp5pama3zszzlr_tgpe2cp-5ym1btppxfu4jiockvcxuz...@mail.gmail.com>,
>  signer=<@gmail.com>, from=<personal...@gmail.com>
> Aug 21 09:38:06 mysmtp smtpd[1986]: smtp-in: Accepted message afeec3df on 
> session efae74061f50e98f: from=<personal...@gmail.com>, 
> to=<i...@mydomain.org>, size=2929, ndest=1, proto=ESMTP
> Aug 21 09:38:06 mysmtp smtpd[1986]: relay: Ok for ab0439bc92880b67: 
> session=efae7405008428c6, from=<personal...@gmail.com>, 
> to=<i...@mydomain.org>, rcpt=<->, source=127.0.0.1, relay=127.0.0.1 
> (localhost), delay=1s, stat=250 2.0.0: afeec3df Message accepted for delivery
> Aug 21 09:38:10 mysmtp smtpd[1986]: smtp-out: Connecting to 
> smtp://127.0.0.1:10023 (localhost) on session efae740ed271d955...
> Aug 21 09:38:10 mysmtp smtpd[1986]: smtp-out: Connected on session 
> efae740ed271d955
> Aug 21 09:38:10 mysmtp clamsmtpd: 100018: accepted connection from: 127.0.0.1
> Aug 21 09:38:10 mysmtp smtpd[1986]: smtp-in: New session efae740f284c98fc 
> from host localhost [127.0.0.1]
> Aug 21 09:38:10 mysmtp smtpd[1986]: smtp-in: Accepted message d2dd91a7 on 
> session efae740f284c98fc: from=<personal...@gmail.com>, 
> to=<i...@mydomain.org>, size=3169, ndest=1, proto=ESMTP
> Aug 21 09:38:10 mysmtp clamsmtpd: 100018: from=personal...@gmail.com, 
> to=i...@mydomain.org, status=CLEAN
> Aug 21 09:38:10 mysmtp smtpd[1986]: relay: Ok for afeec3df2f83edba: 
> session=efae740ed271d955, from=<personal...@gmail.com>, 
> to=<i...@mydomain.org>, rcpt=<->, source=127.0.0.1, relay=127.0.0.1 
> (localhost), delay=5s, stat=250 2.0.0: d2dd91a7 Message accepted for delivery
> Aug 21 09:38:10 mysmtp smtpd[1986]: delivery: Ok for d2dd91a7a2457a23: 
> from=<personal...@gmail.com>, to=<u...@mydomain.org>, 
> rcpt=<i...@mydomain.org>, user=vmail, method=maildir, delay=0s, stat=Delivered
> Aug 21 09:38:16 mysmtp smtpd[1986]: smtp-in: Closing session efae74061f50e98f
> Aug 21 09:38:16 mysmtp smtpd[1986]: smtp-out: Closing session 
> efae7405008428c6: 1 message sent.
> Aug 21 09:38:20 mysmtp smtpd[1986]: smtp-in: Closing session efae740f284c98fc
> Aug 21 09:38:20 mysmtp smtpd[1986]: smtp-out: Closing session 
> efae740ed271d955: 1 message sent.
> 
> In these logs I seeAug 21 09:38:10 mysmtp smtpd[1986]: delivery: Ok for 
> d2dd91a7a2457a23: from=<personal...@gmail.com>, to=<u...@mydomain.org>, 
> rcpt=<i...@mydomain.org>, user=vmail, method=maildir, delay=0s, stat=Delivered
> But then the mail is received in its own mailbox
> # cat 
> /var/mail/vmail/mydomain.org/info/Maildir/new/1471765090.2083.smtp.mydomain.org
> Return-Path: personaladd@gmail.comDelivered-To: i...@mydomain.org...
> Received: by mail-x-x.google.com with SMTP id l203so114910462oib.1
> ?????????????? for <i...@mydomain.org>; Sun, 21 Aug 2016 00:38:05 -0700 (PDT)
> Regards
> 
>  
> 
>    Le Dimanche 21 ao??t 2016 1h14, Edgar Pettijohn <ed...@pettijohn-web.com> 
>a ??crit :
>  
>  
> 
>  I think you're entire smtpd.conf would be useful as well as logs.
> 
> Sent from my iPhone
> On Aug 20, 2016, at 5:57 PM, Mik J <mikyde...@yahoo.fr> wrote:
> 
> 
> Hello,
> I want to use some kind of alias addresses like mails sent to 
> i...@mydomain.org would arrive in u...@mydomain.org. Both are on my mail 
> server.
> # cat /etc/mail/usersi...@mydomain.org user@mydomain.orgu...@mydomain.org 
> vmail
> In my smtpd.conftable users file:/etc/mail/usersaccept tagged CLAM_IN for 
> domain <domains> virtual <users> deliver to maildir 
> "/var/mail/vmail/%{rcpt.domain}/%{rcpt.user}/Maildir"
> NB: This is the first rule
> When I send a mail to i...@mydomain.org it doesn't arrive in 
> u...@mydomain.org it arrives in its own mailbox.
> I don't really understand why
> Does this configuration seem correct or did I miss something ?
> 
> 
> 
>  
>  

-- 
Edgar Pettijohn

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



 
  

Reply via email to