My activities New request

contact atmail support

PH: +61 (7) 5357-6605

support@atmail.com

Follow

Catchall for messages for nonexistent users

Stewart -

PROBLEM
I need a catchall on my Atmail Server + WebMail system for nonexistent users.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

CAUSE
Should you want to have a catchall email address for emails addressed to users who do not exist, just do the following:

RESOLUTION

  1. Open up /usr/local/atmail/mailserver/configure
  2. Find this line
    mysql_user:
    driver = accept
    condition = ${lookup mysql {SELECT Account from UserSession WHERE Account='${local_part}@${domain}'} }
    retry_use_local_part
    transport=mysql_delivery
  3. Add below it
    mysql_nonuser:
    driver = accept
    condition = !${lookup mysql {SELECT Account from UserSession WHERE Account='${local_part}@${domain}'} }
    # retry_use_local_part
    transport=mysql_nonuser_delivery
  4. Then find the following
    mysql_autoreply:
    driver = autoreply
    headers = Content-Type: text/plain; charset=utf-8
    to = ${sender_address}
    from = ${sender_address}
    reply_to = "${local_part}@${domain}"
    subject = "AutoReply from ${local_part}@${domain}"
    text = ${lookup mysql {MYSQL_AUTOREPLY}{$value}}
    once = ${lookup mysql{SELECT concat(MailDir, "/autoreply.db") from Users where Account='${local_part}@${domain}'}}
    once_repeat = 1d
    once_file_size = 500K
  5. Add below it
    mysql_nonuser_delivery:
    driver = appendfile
    maildir_format
    mode = 0660
    mode_fail_narrower = false
    envelope_to_add = true
    return_path_add = true
    directory = /usr/local/atmail/users/u/s/user@foo.com
    You must first create an account that will receive the archive logs. Replace user@foo.com with the user that will recieve the messages, and u/s the first 2 letter prefix of the account.

  6. Restart Atmail Services
    /etc/init.d/atmailserver restart
Have more questions? Submit a request

Comments