Part 16. Plus addressing. Types of mailing addresses

The list of articles cycle

Support plus addressing for mail server

If there is a need to support the plus addressing on the mail server, then it will be necessary to customize our system.

In the Postfix configuration file - /etc/postfix/main.cf you must add a line

recipient_delimiter = +

if we have Dovecot in the role of LDA, we need to make additional settings. First in the file /etc/dovecot/conf.d/15-lda.conf should add or uncomment the line:

recipient_delimiter = +

And in the /etc/postfix/master.cf file, we need to modify our dovecot filter.

It should look like this:

# Dovecot LDA

dovecot unix - n n - - pipe

flags=DRhu user=virtual:virtual argv=/usr/lib/dovecot/dovecot-lda -f ${sender} -a $original_recipient} -d ${user}@${nexthop}

 

Mail addresses - what are they?

Ordinary address

Typically, email addresses look like this:

This email address is being protected from spambots. You need JavaScript enabled to view it.

 

This address consists of two parts - the local part, which is located before the "@" symbol and the domain part that is located after this character. Domain part must match Fully Qualified Domain Name (FQDN).

 

Non-domain addresses, such as:

user

can not be used. Emails come to such addresses must be rejected by the mail server.

The only exception is the address “postmaster”. Any mail server should accept mail at this address and deliver it to someone who is responsible for this email system. (See RFC2821 chapter 4.5.1.)

The local part of the address must be interpreted only by the host specified in the domain part of the address. This address format is defined in RFC2821 and RFC2822.

 

Plus addressing

A plus sign ("+") is one of the valid characters in email addresses according in RFC-5233.

The address in this case would look like this:

This email address is being protected from spambots. You need JavaScript enabled to view it.

where detail is absolutely arbitrary part. Thus, the user himself creates the required number of email aliases ready for use at any time. When delivering a message to the mailbox, the left part of the address is shortened and everything is removed from it, beginning with the character "+", that is, the message with any detail will get into the user's mailbox.

 

Comments in addresses

Similarly, the standards allow the use of comments directly in the address. For example:

user(comment)@domain.com

(comment)This email address is being protected from spambots. You need JavaScript enabled to view it.

user@(comment)domain.com

This email address is being protected from spambots. You need JavaScript enabled to view it.(comment)

In practice, such addressing is supported by a very small number of mail servers.

 

Address literals

If there is a (temporary) problem with the DNS system, address literals may be used for addressing (also referred to as domain literals). In this case, the mail address will look like this:

user@[10.11.12.13]

The use of domain literals was severely restricted to RFC822, but the new RFC2821 does not say anything about it. Such addresses can be seen from time to time. It should be noted that square brackets must be used for such addresses.

 

Source Route

The special form of the email address entry can determine the source route. Naturally, such a record is more than just an address. This is an address with the addition of mail routing information, which indicates which server should pass the message from the sender to the recipient. Source route address looks like this:

@dom1.com,@dom2.edu:user@domain.com

This means that the message will be sent to the domain server dom1.com, then it will go to dom2.edu and then will be forwarded to This email address is being protected from spambots. You need JavaScript enabled to view it.

Today, this format is outdated and most mail servers does not supported it. This is due to massive spamming.

(See RFC2821, RFC822, RFC1123)

 

Hack with Percentage

Similarly, for the source route there is a so-called hack with percentage. In this case, the address will look like this:

user%domain.com%dom2.edu@dom1.com

Just as in the previous case, the email will be sent to the mail server dom1.com, then it will go to dom2.edu and then will be forwarded to This email address is being protected from spambots. You need JavaScript enabled to view it.. A transit mail server when forwarding must delete a part of the address starting with "@" and replace the last character "%" with "@".

This method is also outdated and is not used in practice due to the risk of spamming.

Please note that there is no official document that makes the sign “%” special. This functionality depends solely on processing addresses by the receiving server.

 

Addressing in UUCP format

Sometime ago people exchanged messages with UUCP (Unix To Unix Copy).
Messages often passed through several servers. There was no centralized DNS system at that time, and nobody could know the addresses of all servers on the network. If you wanted to send someone a message, then you
had to know all the hosts between your computer and the recipient. The mailing address looked like:

serv1!serv2!serv3!user

It is recorded from left to right through which servers will pass the message until it reaches the recipient user. The last part of the address here is not the hostname, but the user's address.

Today it is still possible to find such address format, but this kind of addressing is considered unacceptable.

Similarly, there is the problem of mixing UUCP and modern addresses. For example

serv1!serv2!serv3!This email address is being protected from spambots. You need JavaScript enabled to view it.

There is no official rule for processing this addresses.

 

X.400 addressing

X.400 is a mail standard developed by ISO. Today it plays only a minor role, but there are companies that use it in their internal mail system with Internet access.
Mailing address in X.400 format will look like this:

S=postmaster; OU=it-department; P=office; A=domain; C=ua;

As you can see, it has no similarity to conventional addresses. Such addresses use a hierarchy of attributes and values. Here 'S' means 'surname', 'OU' - 'organisational unit', 'C' - 'country' and so on. Attributes are not always the same.

To interact with other mail servers, addresses are transformed into a regular form. For example:

S=postmaster/OU=it-department/P=office/A=domain/C=This email address is being protected from spambots. You need JavaScript enabled to view it.

 

The list of articles cycle

You can buy the book

"Mail server based on Postfix,

Dovecot and RoundCube"

in electronic form in the store

ХinХii