Einzelne E-Mail Adresse sperren

  • Hmm so after some testing...
    Set "no" on "po_active" in "mail_users" has the result, that the user can't login anymore to the account = that's ok.
    BUT it also has the result, that someone else can't send any mails to the account:


    Code
    1. Apr 28 21:09:52 server postfix/pipe[22891]: DD02F1A36004: to=<[email protected]>, relay=maildrop, delay=0.33, delays=0.27/0/0/0.05, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )


    So this is not, like it should be :/


    The Sender gehts an E-Mail from the server:

    Quote from Undelivered Mail Returned to Sender

    This is the mail system at host SERVER.I'm sorry to have to inform you that your message could notbe delivered to one or more recipients. It's attached below.For further assistance, please send mail to postmaster.If you do so, please include this problem report. You candelete your own text from the attached returned message. The mail system[email protected]>[/email]: user unknown. Command output: Invalid user specified.

  • I'll test in few minutes. Be a bit patient please...

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Mutschas


    Confirmed. You can workaround this issue by editing the /etc/dovecot/dovecot-sql.conf file and removing the AND po_active = 'yes' condition from the user_query SQL query. Once done, don't forget to restart Dovecot.


    to resume, the user_query must be as follow

    Code
    1. user_query = \
    2. SELECT \
    3. CONCAT('{MTA_VIRTUAL_MAIL_DIR}/', SUBSTRING(mail_addr, LOCATE('@', mail_addr) +1), '/', mail_acc) AS home, \
    4. '{MTA_MAILBOX_UID}' AS 'uid', \
    5. '{MTA_MAILBOX_GID}' AS 'gid', \
    6. CONCAT('*:bytes=', quota, 'B') AS 'quota_rule'\
    7. FROM mail_users \
    8. WHERE mail_addr = '%u' \
    9. AND status = 'ok'

    Note that all those issues will be addressed in Serie 1.5.0 (Many changes are needed to fix these issues and the current Serie is not a good candidate for those changes).

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • Thank you Nuxwin, but i'm so sorry. I hope you are not angry. I do not use Dovecot i use Courier.


    So for Courier, just edit the /etc/courier/authmysqlrc and remove the " AND po_active = 'yes'"?
    But if so, what is the identifier for the disabled email-address?
    For now, it's po_active.
    So if i want to disable [email protected] and not 123@abc,de, the only thing i should do is to set "po_active" in the database of the mailadress to "no". But if the SQL-Statement don't use this anymore, how works the disabling?

  • @Mutschas


    With courier, that is not possible because the query for user check and login check is the same. Cyrus SASL and maildrop MDA both use the same query through authdaemon. I'll see if I can setup dedicated SQL query for maildrop MDA.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206

  • @Mutschas


    Will this be added in future?

    In serie 1.5.0, we will fix those issues.

    Is it difficult to change from courier to dovecot?

    Assuming tha you're using latest release, you can switch to Dovecot as follow:


    Shell-Script
    1. # cd <your_imscp_archive_dir_matching_your_current_imscp_version>
    2. # perl imscp-autoinstall -dar po

    Then, when asked, select Dovecot instead of Courier. This will automatically turn your Courier mailboxes into Dovecot mailboxes.

    badge.php?id=1239063037&bid=2518&key=1747635596&format=png&z=547451206