Closed mforde84 closed 3 years ago
Hi. It would be hard to tell without knowing what code do you have as gen_smtp_server_session
callback module (1st argument of gen_smtp_server:start/2
)
Hey so the info I was able to find in the code was:
10.128.3.228 :: root -> grep gen_smtp_server *
rabbit_email_handler.erl:-behaviour(gen_smtp_server_session).
rabbitmq_email_app.erl: [{email_handler, {gen_smtp_server, start_link, [rabbit_email_handler, ServerConfig]},
this is an older tier2 plugin for rabbitmq-email. it hasnt been built successfully for a while, and its running an older version of erlang/21.3 and the build for gen_smtp is 0.15.x actually.
so reading the documentation on rabbitmq-email the gen_smtp server configuration is handled through the following advanced.conf
rabbitmq_email.server_config defines SMTP server parameters (same as in gen_smtp)
{rabbitmq_email, [
{server_config, [
[{port, 2525}, {protocol, tcp}, {domain, "example.com"},{auth, never}, {tls, never}, {address,{0,0,0,0}}]
]},
{server_auth, false},
{server_starttls, false},
...```
Note that this syntax is incorrect as it "double lists" the proplist:
{server_config, [
[{port, 2525}, {protocol, tcp}, {domain, "example.com"},{auth, never}, {tls, never}, {address,{0,0,0,0}}]
]}
It should be:
{server_config, [
{port, 2525}, {protocol, tcp}, {domain, "example.com"},{auth, never}, {tls, never}, {address,{0,0,0,0}}
]}
I found this while working on - https://github.com/gotthardp/rabbitmq-email/issues/45
Ah good catch
On November 11, 2021 3:52:40 PM Luke Bakken @.***> wrote:
Note that this syntax is incorrect as it "double lists" the proplist: {server_config, [ [{port, 2525}, {protocol, tcp}, {domain, "example.com"},{auth, never}, {tls, never}, {address,{0,0,0,0}}] ]}
It should be: {server_config, [ {port, 2525}, {protocol, tcp}, {domain, "example.com"},{auth, never}, {tls, never}, {address,{0,0,0,0}} ]}
I found this while working on - gotthardp/rabbitmq-email#45 — You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.
we were able to get the forwarding to work. it was both a postfix config issue, and an issue with the encoding the message relayed to rabbitmq-email plugin
technically this ticket can close, unless you want to keep it open for additional tracking purposes. up to you.
Ah, so the code was actually opensource https://github.com/gotthardp/rabbitmq-email/blob/master/src/rabbit_email_handler.erl
Thanks @lukebakken for your help!
Hello,
Im attempting to forwarding emails sent to postfix server to the smtp server but getting a bounce at the smtp server:
So the host receives the message through localhost:
without the forward transport defined, the postfix config works as intended, but once the transport is setup we get a bounce error:
Is there some authentication piece im missing on the gen_smtp end? Or do you have any insights into why gen_smtp server is bouncing messages like this?