ix-ai / smtp

This is a SMTP docker container for sending emails. You can also relay emails to gmail and amazon SES.
MIT License
97 stars 15 forks source link

Relay as gmail is sending a copy to inbox #35

Closed albgen closed 10 months ago

albgen commented 10 months ago

Hello,

i've tested to send an email using gmail as realy and it works but the problem is that i see a copy on my gmail inbox too. Why is that? Any chance to disable this behaviour?

thank you

tlex commented 10 months ago

This is something that you will need to check in gmail. As far as I remember, gmail automatically copies all the messages sent in the "Sent" label.

The only workaround I can think of is creating a rule that filters those messages and archives or deletes

albgen commented 10 months ago

I don't think it has to do with gmail. I have tried another smtp software as relay and i don't any copy after sending.

albgen commented 9 months ago

Just checked the source code of the https://github.com/ix-ai/smtp/blob/master/entrypoint.sh The address used for gmail is not the relay one, but the normal smtp used for client mail smtp.gmail.com The address for relay is: smtp-relay.gmail.com

The difference is that if you use the smtp.gmail.com you have a lot of limits and one of the most restrictive is that you cannot send more than 100emails per day(amoung th fact that you find a copy on the sent folder) While using the relay, you can up to 10k emails per day!

tlex commented 9 months ago

Well, in this case you can always use SMARTHOST_ADDRESS, SMARTHOST_ALIASES, SMARTHOST_USER and SMARTHOST_PASSWORD instead of GMAIL_USER and GMAIL_PASSWORD. And to reproduce the behavior, you can set SMARTHOST_ALIASES=*.gmail.com

albgen commented 9 months ago

does not work even with SMARTHOST_ADDRESS, SMARTHOST_ALIASES, SMARTHOST_USER and SMARTHOST_PASSWORD This is the docker-compose file: image

This is the error i see on the log: image

Seems like the username and password are not copied on the right place...