On 6/20/25 11:00, I wrote:
Good morning, OpenSMTPd has handed me a letter (and the previously
detained email) for the first time since the creation of the world!
Unfortunately, I still get letters addressed to [email protected] only.
Aliases are accepted too, but never delivered to me:
mda delivery evpid=… from=<[email protected]> to=<[email protected]>
rcpt=<[email protected]> user=uolys delay=… result=TempFail stat=Error
(temporary failure: "")
mda delivery evpid=… from=<[email protected]> to=<[email protected]>
rcpt=<[email protected]> user=uolys delay=… result=TempFail stat=Error
(temporary failure: "")
mda delivery evpid=… from=<[email protected]>
to=<[email protected]> rcpt=<[email protected]> user=uolys delay=…
result=TempFail stat=Error (temporary failure: "")
Sala.online.lt is a real hostname here for my SMTP and IMAP. Where On.lt
and some other domains (virtual hosts) are hosted. Uolys is my username
here, and Vladas is my real name. OpenSMTPd accepts incoming mail and
sends it to remote MX servers properly, in the right order (smtp to mda
or smtp to mta).
Why local aliases do not work? And how does MDA of OpenSMTPd decide to
deliver email to my real name, which is disabled from Sendmail alias
list (to avoid routing loop)?
root: uolys
postmaster: uolys
dmarc: uolys
info: uolys
…
vladas: uolys
# uolys: [email protected]
Interestingly, MDA reads the alias table and picks the recipient
correctly (user=uolys).
I had found a seemingly logical way to expand alias before LMTP passes
email to the Cyrus dispatcher:
match for rcpt-to <aliases> action "cyrus"
“Configuration OK”, but email is not delivered by any of these options:
action "cyrus" lmtp "/var/cyrus/socket/lmtp"
action "cyrus" lmtp "/var/cyrus/socket/lmtp" virtual <virtuals>
action "cyrus" lmtp "/var/cyrus/socket/lmtp" rcpt-to virtual <virtuals>
action "cyrus" lmtp "/var/cyrus/socket/lmtp" rcpt-to alias <aliases>
action "cyrus" lmtp "/var/cyrus/socket/lmtp" alias <aliases>
Where <virtuals> are just a list of a few real user: name@domain
(disabled in alias table).
The configuration (smtpd.conf) of the current semi-functional mail
server is as follows:
listen on 0.0.0.0
listen on ::
pki sala key "/usr/home/vlap/.acme.sh/sala.online.lt/sala.key"
pki sala cert "/usr/home/vlap/.acme.sh/sala.online.lt/sala.cert"
ca zero cert "/usr/home/vlap/.acme.sh/sala.online.lt/ca-zero.cert"
table aliases file:/etc/mail/aliases # ab, gm,
uolys, etc.
table virtuals file:/etc/mail/virtusername # uolys:
[email protected], etc.
table domains file:/etc/mail/local-host-names # on.lt, online.lt, etc.
table mxa file:/etc/mail/mailname # sala.online.lt
table ip file:/etc/mail/relay-ip # 88.222.204.19,
78.69.52.166, etc.
action "cyrus" lmtp "/var/cyrus/socket/lmtp" rcpt-to alias <aliases>
action "relay" relay
match from local !for local action "relay"
match from src <ip> !for domain <domains> action "relay"
match !from local for domain <domains> action "cyrus"
match from local for local action "cyrus"
Where to find a configuration example for the most widely applicable
best-of-breed SMTP with IMAP servers (OpenSMTPd with Cyrus)?
It is a pity to leave such a slim and clean OpenSMTPd, even though I
have thoroughly read all the manuals several times and tried various
options many times. Excluding "reject" and "relay" actions, and even
disabling the general PF direwall. The snag should be in some overlooked
little thing.
--
Vladas Palubinskas
[email protected]
https://vladas.palubinskas.lt/