Editing Blackhole List for E-mails Sent Through HIO-MAIL-01 Follow

The mail relay server in the Hillsboro datacenter, HIO-MAIL-01, is used by GlasPacLX and LX Mobile to send out e-mails to customers or to other systems. Due to the heavy use of invalid e-mail addresses for customers without e-mail addresses or known typos, an e-mail black hole system has been configured on the mail relay server to prevent backlog of e-mails that cannot be delivered.

The e-mail black hole system consists of two Postfix mapping files, one is used to black hole entire domains (/etc/postfix/blackhole_domain) and the other is used to black hole specific e-mail addresses (/etc/postfix/blackhole_addr).

To edit either Postfix mapping file on the mail relay server, SSH on to the server using PuTTY or another SSH client and log on to the server with the "srvadmin" user account. The password for the account is stored in the Systems KeePass database under: Systems / Linux/Unix.

To edit either file, use the sudo command to run vi or nano. For consistency, please use tabs and not spaces to delimit each field in both files.

The syntax of the /etc/postfix/blackhole_domain file to black hole specific e-mail domains is:

<Domain>                discard:silently

If you want to black hole e-mails destined for the domain "notvalid.com", add the following to the specific section of the file (each section has a comment to denote what each section is for):

notvalid.com              discard:silently

Do not prefix the domain with "@".

The syntax of the /etc/postfix/blackhole_addr file used to black hole a specific e-mail address is:

<E-mail Address>      blackhole@localhost

Note that if the domain portion of the e-mail address is already listed in the /etc/postfix/blackhole_domain file, the e-mail address does not need to be added to /etc/postfix/blackhole_addr.

If you want to black hole the e-mails destined for the address "doe@noone.com", add the following line to the file:

doe@noone.com         blackhole@localhost

After you have finished editing the file, saving it and exiting out of the editor, run "sudo postmap /etc/postfix/<filename>" on the mapping file(s) that have been edited (replacing "<filename>" with the actual file name). This will update the corresponding compiled version of the file that Postfix uses to do look-ups when processing e-mails.

Next, run "sudo postfix reload" to tell Postfix that a change has been made and to pick up the changes to the compiled mapping files.

To verify that e-mails sent to either the domain or e-mail address, use the grep command to look for either the e-mail address or domain against /var/log/mail.log.

For e-mails with addresses that are sent to the black hole, you should see a log entry that looks similar to the following:

postfix/local[<PID>]: <Message-ID>: to=<blackhole@localhost>, orig_to=<E-mail Address>, relay=local, delay=0.12, delays=0.12/0/0/0, dsn=2.0.0, status=sent (delivered to file: /dev/null)

For e-mails destined for black holed domains, you should see a log entry that looks similar to the following:

postfix/discard[<PID>]: <Message-ID>: to=<E-mail Address>, relay=none, delay=0.31, delays=0.31/0/0/0, dsn=2.0.0, status=sent (silently)

 

Have more questions? Submit a request

Comments

Powered by Zendesk