The regex mentioned in the other answer matches the user part of the email address (firstname.lastname@example.org). Here is some additional information.
To use the full email address as username, use the following regex (for example in
This means that your username is always your full email address (email@example.com) - no other existing username is allowed to send from that address - and you don't have to update an additional Postfix config file everytime you add a user.
This might be used on a server that has multiple domains configured. User firstname.lastname@example.org is only allowed to send from that address but not from email@example.com (different user and email, different person). The username john.doe would be ambiguous in this case.
Also, depending on your configuration, the smtpd_sender_login_maps setting, which has to point to this file, may be in the master.cf (instead of main.cf). The official Dovecot documentation has the following example (if you're using SASL/submission):
submission inet n - n - - smtpd
In this example, the setting should be adjusted to point to the right file and use regex or (better) pcre as type. Especially if a file called "virtual" is already used for another purpose (for example for virtual_alias_maps, as shown in an official Postfix example), another file should be used for the login mapping.