Detailed doc fo rabbitmq-email and postfix

254 views
Skip to first unread message

samjad mooppan

unread,
Jun 19, 2016, 9:12:27 AM6/19/16
to rabbitmq-users
Hi,

I am finding it difficut to get the rabbitmq-email and postfix to get working.

getting the following error while sending email
<s...@domain.com>: mail for domain.com loops back to
    myself

Michael Klishin

unread,
Jun 19, 2016, 9:53:02 AM6/19/16
to rabbitm...@googlegroups.com
Can you please post

More details about what exactly you are trying to do
RabbitMQ server logs contents
The entire stack trace (if it is not in the logs)

--
You received this message because you are subscribed to the Google Groups "rabbitmq-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rabbitmq-user...@googlegroups.com.
To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
MK

Staff Software Engineer, Pivotal/RabbitMQ

samjad mooppan

unread,
Jun 19, 2016, 10:34:41 AM6/19/16
to rabbitmq-users
Thanks Michael,

1.  I am working on an application which will push an email to RabbitMQ using Postfix and rabbitmq-email. The data will then be fetched from rabbitMQ queue and pushed to a database.

2. There is nothing on the rabbitmq logs. My configuration for rabbitmq-email is as follows

============
 {rabbitmq_email, [
    {server_config, [
        [{port, 25}, {protocol, tcp}, {domain, "app.mydomain.com"}, {address,{0,0,0,0}}]
    ]},
    {server_auth, rabbitmq},
    {server_starttls, true},
    {email_domains,
        [{<<"app.mydomain.com">>, {<<"/">>, <<"email-in">>}}
    ]},
    {email_queues,
        [{{<<"/">>, <<"email-out">>}, <<"app.mydomain.com">>}
    ]},
    {client_sender, "ar...@app.mydomain.com"},
    {client_config, [
        {relay, "app.mydomain.com"}
    ]}
  ]}

==================

3. The postfix configuration main.cf is as follows

==============

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no
disable_dns_lookups = yes
# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

#smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
myhostname = app.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = localhost.$mydomain, localhost, $myhostname
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
relay_domains = $mydestination, gmail.com, app.mydomain.com, activelobby.net, server.supportlobby.com
transport_maps = hash:/etc/postfix/transport
======================

4. The postfix transport file is

===========
app.mydomain.com smtp:app.mydomain.com:25
=============

5. When i try to send a mail to ar...@app.mydomain.com , the postfix logs shows the following

======
Jun 19 14:28:56 zimbra postfix/smtpd[2453]: connect from server.supportlobby.com[158.69.11.64]
Jun 19 14:28:56 zimbra postfix/smtpd[2453]: 1E549C1BEB: client=server.supportlobby.com[158.69.11.64]
Jun 19 14:28:56 zimbra postfix/cleanup[2458]: 1E549C1BEB: message-id=<c42fe5b1-ab74-fcec...@activelobby.net>
Jun 19 14:28:56 zimbra postfix/qmgr[2445]: 1E549C1BEB: from=<s...@activelobby.net>, size=2178, nrcpt=1 (queue active)
Jun 19 14:28:56 zimbra postfix/smtp[2459]: 1E549C1BEB: to=<ar...@app.mydomain.com>, relay=none, delay=0.03, delays=0.03/0/0/0, dsn=5.4.6, status=bounced (mail for app.mydomain.com loops back to myself)
Jun 19 14:28:56 zimbra postfix/cleanup[2458]: 3344FC1BEC: message-id=<201606191428...@app.mydomain.com>
Jun 19 14:28:56 zimbra postfix/smtpd[2453]: disconnect from server.supportlobby.com[158.69.11.64]
Jun 19 14:28:56 zimbra postfix/bounce[2460]: 1E549C1BEB: sender non-delivery notification: 3344FC1BEC
Jun 19 14:28:56 zimbra postfix/qmgr[2445]: 3344FC1BEC: from=<>, size=4084, nrcpt=1 (queue active)
Jun 19 14:28:56 zimbra postfix/qmgr[2445]: 1E549C1BEB: removed
Jun 19 14:28:56 zimbra postfix/smtp[2463]: 3344FC1BEC: to=<s...@activelobby.net>, relay=activelobby.net[158.69.11.64]:25, delay=0.41, delays=0.04/0.01/0.14/0.21, dsn=2.0.0, status=sent (250 OK id=1bEdie-0006yd-FO)
Jun 19 14:28:56 zimbra postfix/qmgr[2445]: 3344FC1BEC: removed
==========

6. The bounce message is

======
        The mail system

<ar...@app.mydomain.com>: mail for app.mydomain.com loops back to
    myself

===========
You received this message because you are subscribed to a topic in the Google Groups "rabbitmq-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/rabbitmq-users/pzKJDzBWSCI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to rabbitmq-user...@googlegroups.com.

To post to this group, send email to rabbitm...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages