• We value your experience with Plesk during 2024
    Plesk strives to perform even better in 2025. To help us improve further, please answer a few questions about your experience with Plesk Obsidian 2024.
    Please take this short survey:

    https://pt-research.typeform.com/to/AmZvSXkx
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Issue Mail: [email protected] does not work (recipient_delimiter = +)

GerdSchrewe

Basic Pleskian
Ubuntu 18.04, Plesk 17.8.11, Update 69. Postfix and Dovecot.

Problem:
When i send an E-Mail to [email protected] everything works fine.
When i send an E-Mail to [email protected] the mail is not delivered and simply vanishes, but in maillog appears: status=sent (delivered via plesk_virtual service)

mail.error:
Oct 6 18:30:36 server2 postfix-local[1997]: cannot chdir to mailname dir info+anything: No such file or directory
Oct 6 18:30:36 server2 postfix-local[1997]: Unknown user: [email protected]

maillog:
server2:~# less /var/log/mail.log
Oct 6 18:30:36 server2 postfix/qmgr[1136]: 6A3AA1201916: from=<[email protected]>, size=1821, nrcpt=1 (queue active)
Oct 6 18:30:36 server2 postfix-local[1997]: postfix-local: [email protected], to=info+[email protected]
=/var/qmail/mailnames
Oct 6 18:30:36 server2 postfix/smtpd[1425]: disconnect from web4.xyz.de[88.xxx.xxx.xxx] ehlo=2 starttls=1 mail=1 rcpt=1 data=1 quit=1 commands=7
Oct 6 18:30:36 server2 postfix-local[1997]: cannot chdir to mailname dir info+anything: No such file or directory
Oct 6 18:30:36 server2 postfix-local[1997]: Unknown user: [email protected]
Oct 6 18:30:36 server2 postfix/pipe[1996]: 6A3AA1201916: to=<[email protected]>, relay=plesk_virtual, delay=0.24, delays=0.22/0.01/0/0.01, dsn=2.0.0,
status=sent (delivered via plesk_virtual service)
Oct 6 18:30:36 server2 postfix/qmgr[1136]: 6A3AA1201916: removed

Is it a bug? Both adresses should work.
See:
recipient_delimiter (default: empty)
Postfix Configuration Parameters

# Handle Postfix-style extensions.
recipient_delimiter = +
# Handle both Postfix and qmail extensions (Postfix 2.11 and later).
recipient_delimiter = +-
Postfix Configuration Parameters


Thanx a lot for help!
Paul
 
Last edited:
Hi Paul,

I had a problem similar to yours, but instead of alias@domain.com was name@alias.com
It seems it is something with Postfix

I tried these 2 solutions

The first one tells you that, if you have the line receive_override_options in /etc/postfix/main.cf or /etc/postix/master.cf, just comment it and restart Postfix
Mail aliases do not work on Plesk server: Unknown user: [email protected]

If this does not help, try this one. It tells you to comment all the lines which starts with virtual in /etc/postfix/main.cf and restart Postfix
PLESK PostFix Error Local Loop in maillog, how to troubleshoot

The second option was the one which solved my problem.

Hope this helps!
Greetings.
 
Hi Aleix, thank you very much for your suggestions.

Unfortunately this not the case!

Everything works fine with normal Mail-Aliases configured in Plesk. e.g.

- [email protected] <-- works fine


The bad error occurs when using a plus-alias Mail address like:

[email protected].

Such mails simply disappear / get lost!


This plus-alias is handled by the postfix config option "recipient_delimiter = +". This makes sure that every thing between + and @ is "removed" for finding the "real" user mailbox... so:

- [email protected] ----resolves-postfix-internal-to----> [email protected]

When you have a look at the postfix doku Postfix Configuration Parameters you can read the detailed Information.

In a normal postfix + dovecot setup postfix recieves a mail, checks if the "real real address" behind the plus-alias is existing and spools the Mail. Afterwords the mail would be forwarded to the LDA (local delivery agent), e.g. "dovecot-lda" which puts the mail into user's mailbox/inbox.

With the current Plesk setup, there is a special plesk application which does the LDA job.

It is configured as transport "plesk_virtual" (in main.cf/master.cf) which starts the program "/usr/lib/plesk-9.0/postfix-local".

When you have a look at the log of the 1st message, you will see:

- this transport is used: "relay=plesk_virtual"

- the postfix-local application produces errors: "cannot chdir..." & "Unknown user"

- BUT postfix-local sends an "OK" to the postfix, so postfix thinks the Mail is delivered: "status=sent (delivered via plesk_virtual service)"

...unfortunately, there is no mail delivered at all.

So there are 2 Problems with the plesk-local program:

1.) when plesk-local is failing, it *must* return a bad error-code to postfix, so postfix could deliver a temp SMTP error -> plesk-local has to be fixed

example smtp error on lda failure: "451 4.3.0 Error: queue file write error"

2.) a configured recipient_delimiter should be handled in a correct way. -> postfix config has to be updated (fix address_mapping)

Note: In a normal postfix + dovecot setup postfix, the mapping of the plus-alias is done at postfix side. When using multiple transports for spam-filtering, you have to set the smtpd option "receive_override_options=no_address_mappings" to prevent the rewrite.

This Log shows the line with address_mapping on a standard postfix+dovecot installation:
postfix/pipe[2148]: 92CD62998F: to=<[email protected]>, orig_to=<[email protected]>, relay=dovecot, delay=0.25, delays=0.12/0.01/0/0.12, dsn=2.0.0, status=sent (delivered via dovecot service)

So, I guess, this issue has definitely to be handled by a staff member / developer of plesk!
 
See Postfix: Not delivering messages with recipient delimiter

in master.cf, change
Code:
plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib/plesk-9.0/postfix-local -f ${sender} -d ${recipient} -p /var/qmail/mailnames
to
Code:
plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=/usr/lib/plesk-9.0/postfix-local -f ${sender} -d ${user}@${nexthop} -p /var/qmail/mailnames
and do a `postfix reload`.
 
Last edited by a moderator:
I have just made the above changes to /etc/postfix/master.cf, and they do work (Plesk Onyx/Debian/postfix 3.x). My case was to enable plus-addressed replies to mail from Discourse (forums tool). The more generic (i.e. if you don't have Plesk) fixes described here don't actually solve the problem (it is not clear to me if they are needed or not; I left them in).
 
I don't know but master.cf seem to be overwriten when updatinf plesk
may be we could use a script to replace the line with a cron

Code:
#!/bin/bash

OLD_REGEX="plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=\/usr\/lib\/plesk-9\.0\/postfix-local -f \${sender} -d \${recipient}"

NEW="plesk_virtual unix - n n - - pipe flags=DORhu user=popuser:popuser argv=\/usr\/lib\/plesk-9.0\/postfix-local -f \${sender} -d \${user}@\${nexthop}"

sed -i "s/$OLD_REGEX/$NEW/g" /etc/postfix/master.cf
 
Back
Top