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
accept tagged CLAM_IN for domain <domains> virtual <users> deliver to maildir
"/var/mail/vmail/%{rcpt.domain}/%{rcpt.user}/Maildir"
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
[email protected] [email protected]
[email protected] vmail
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=<[email protected]>, to=<[email protected]>,
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=<[email protected]>
Aug 21 09:38:06 mysmtp smtpd[1986]: smtp-in: Accepted message afeec3df on
session efae74061f50e98f: from=<[email protected]>, to=<[email protected]>,
size=2929, ndest=1, proto=ESMTP
Aug 21 09:38:06 mysmtp smtpd[1986]: relay: Ok for ab0439bc92880b67:
session=efae7405008428c6, from=<[email protected]>, to=<[email protected]>,
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=<[email protected]>, to=<[email protected]>,
size=3169, ndest=1, proto=ESMTP
Aug 21 09:38:10 mysmtp clamsmtpd: 100018: [email protected],
[email protected], status=CLEAN
Aug 21 09:38:10 mysmtp smtpd[1986]: relay: Ok for afeec3df2f83edba:
session=efae740ed271d955, from=<[email protected]>, to=<[email protected]>,
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=<[email protected]>, to=<[email protected]>, rcpt=<[email protected]>,
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=<[email protected]>, to=<[email protected]>,
rcpt=<[email protected]>, 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: [email protected]: [email protected]...
Received: by mail-x-x.google.com with SMTP id l203so114910462oib.1
for <[email protected]>; Sun, 21 Aug 2016 00:38:05 -0700 (PDT)
Regards
Le Dimanche 21 août 2016 1h14, Edgar Pettijohn <[email protected]> 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 <[email protected]> wrote:
Hello,
I want to use some kind of alias addresses like mails sent to [email protected]
would arrive in [email protected]. Both are on my mail server.
# cat /etc/mail/[email protected] [email protected][email protected] 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 [email protected] it doesn't arrive in [email protected]
it arrives in its own mailbox.
I don't really understand why
Does this configuration seem correct or did I miss something ?