gotthardp / rabbitmq-email

SMTP Gateway Plugin for RabbitMQ
Mozilla Public License 2.0
180 stars 20 forks source link

Channel error in logs when email plugin receives SMTP message for fanout exchange. #63

Open big-edd opened 6 months ago

big-edd commented 6 months ago

Hello,

When an SMTP message is received, we see the following in the logs.. ..

2024-04-09 04:55:08.709201+00:00 [info] <0.4071.0> rabbitmq.local SMTP connection from {10,0,0,1}
2024-04-09 04:55:08.709201+00:00 [info] <0.4071.0>
2024-04-09 04:55:08.710524+00:00 [error] <0.4087.0> Channel error on connection <0.4075.0> (<rabbit@rabbitmq.1712632031.4075.0>, vhost: '/', user: 'none'), channel 1:
2024-04-09 04:55:08.710524+00:00 [error] <0.4087.0> operation exchange.declare caused a channel exception precondition_failed: inequivalent arg 'type' for exchange 'smtp-in' in vhost '/': received 'topic' but current is 'fanout'
2024-04-09 04:55:08.714496+00:00 [info] <0.4071.0> EHLO from client.hosts.local
2024-04-09 04:55:08.714496+00:00 [info] <0.4071.0>
2024-04-09 04:55:08.717182+00:00 [info] <0.4071.0> text/plain message from tester@rabbitmq.local to [<<"smtp@rabbitmq.local">>] queued as 7e87e9c6820c31f2af278a34c25ce476
2024-04-09 04:55:08.717182+00:00 [info] <0.4071.0>

Note: The message still finds its way to the queues, so things are still working as expected.

No such message appears when publishing to the exchange directly with AMQP rather than SMTP.. ..

2024-04-09 04:57:26.497542+00:00 [info] <0.4164.0> accepting AMQP connection <0.4164.0> ([10.0.0.1:46986](http://10.0.0.1:46986/) -> [192.168.168.1:5672](http://192.168.168.1:5672/))
2024-04-09 04:57:26.499672+00:00 [info] <0.4164.0> connection <0.4164.0> ([10.0.0.1:46986](http://10.0.0.1:46986/) -> [192.168.168.1:5672](http://192.168.168.1:5672/)): user 'smtp_producer' authenticated and granted access to vhost '/'
2024-04-09 04:57:26.502051+00:00 [info] <0.4164.0> closing AMQP connection <0.4164.0> ([10.0.0.1:46986](http://10.0.0.1:46986/) -> [192.168.168.1:5672](http://192.168.168.1:5672/), vhost: '/', user: 'smtp_producer')

Cheers, Eddie.

lukebakken commented 6 months ago

Originally reported here:

https://groups.google.com/g/rabbitmq-users/c/LpjKAIV_zcU

@big-edd - Could you please supply the following information?

Thanks. Anything you can do to make it easier for me to set up an environment and reproduce the issue makes it more likely that I have time to fix it.

big-edd commented 6 months ago

Will do, but it might take some time to bring all of that together this time.

lukebakken commented 6 months ago

Thank you! No hurry!