gotthardp / rabbitmq-email

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

Wild card email_domains #24

Closed samjadmooppan closed 3 years ago

samjadmooppan commented 8 years ago

I am trying to route app.mydomain.com , app1.mydomain.com etc from postfix to rabbitmq. The entry i have made is

{email_domains, [{<<"*.mydomain.com">>, {<<"/">>, <<"email-in">>}} ]},

The exchange I am using is fanout type. But I am getting the following error on postfix.

C761B80083: to=arun@app.mydomain.com, relay=none, delay=254, delays=0.03/254/0/0.05, dsn=4.4.2, status=deferred (delivery temporarily suspended: conversation with hostname.mydomain.com[XX.XX.XX.XX] timed out while receiving the initial server greeting)

While When i make the following entry in rabbitmq.config, it delivers correctly to the queues.

 {email_domains,
     [{<<"app.mydomain.com">>, {<<"/">>, <<"email-in">>}}, {<<"app2.mydomain.com">>, {<<"/">>, <<"email-in">>}}
 ]},
gotthardp commented 8 years ago

Wildcards are not supported in email_domains, I'm afraid.

samjadmooppan commented 8 years ago

I had this working at some point of time with the exact same configuration in rabbitmq.config :( .But not sure how .

samjadmooppan commented 8 years ago

Achieved the desired results using Alternate Exchange mechanism :+1: