From 2a0d18320ae298fe2a434e8e4811e080e5622f71 Mon Sep 17 00:00:00 2001 From: Som23Git <93936168+Som23Git@users.noreply.github.com> Date: Thu, 29 Aug 2024 21:07:50 +0530 Subject: [PATCH] Added more details on authentication with an example snippet and reference screenshot from the postal webUI --- content/3.features/smtp-authentication.md | 25 ++++++++++++++++++++++- 1 file changed, 24 insertions(+), 1 deletion(-) diff --git a/content/3.features/smtp-authentication.md b/content/3.features/smtp-authentication.md index 3cf62bf..17223ab 100644 --- a/content/3.features/smtp-authentication.md +++ b/content/3.features/smtp-authentication.md @@ -11,9 +11,32 @@ For sending outgoing emails through the Postal SMTP server you will need to gene When authenticating to the SMTP server, there are three supported authentication types. * `PLAIN` - the credentials are passed in plain text to the server. When using this, you can provide any string as the username (e.g. `x`) and the password should contain your credential string. -* `LOGIN` - the credentials are passed Base64-encoded to the server. As above, you can use anything as the username and the password should contain the credential string (Base64-encoded). +* `LOGIN` - the credentials are passed Base64-encoded to the server. As above, you can use anything as the username and the password should contain the credential string (Base64-encoded). Check the example below: + ``` + # Example snippet: + # Let's assume, you use "$ telnet 25" + Trying + Connected to + Escape character is '^]'. + 220 postal.example.com ESMTP Postal/GWLMYC7F + + # You start from here: + HELO example.com + 250 postal.example.com + AUTH LOGIN + 334 VXNlcm5hbWU6 + c29tLXNtdHAtdXNlcg== >> you would need to enter any or your smtp username in base64 - try command - "echo -n 'your-username' | base64" + 334 UGFzc3dvcmQ6 + OElLM0Q4ckFOQW9obTl0QnpQcVpkRlhi >> you would need to enter your smtp key generated in the web UI in base64 - try command - "echo -n '8IK3D8rXXNAohm9tBzPqZdFXb' | base64" + 235 Granted for / + ``` * `CRAM-MD5` - this is a challenge-response mechanism based on the HMAC-MD5 algorithm. Unlike the above two mechanism, the username does matter and should contain the organization and server permalinks separated by a `/` or `_` character. The password used should be the value from your credential. +To get the `Credentials`, you can go to the Postal home > Credentials > Click or Add a Credential > Copy the username and the generated key. + +![smtp_credentials](https://github.com/user-attachments/assets/be0bf380-b369-49d8-83b5-e824561e0c15) + + ## From/Sender validation When sending outgoing email through the SMTP server, it is important that the `From` header contains a domain that is owned by the server or its organization. If this it not valid, you will receive a `530 From/Sender name is not valid` error.