Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#3110 closed support-request (fixed)

CCing to sysadmins does not result in a mail in sysadmins@ mailing list

Reported by: sa2ajj Owned by: verm
Priority: critical Milestone: sys - on-bb-infra
Version: Keywords:
Cc: verm, sysadmins

Description (last modified by verm)

I suspect the configuration of the mailing list prevents from accepting mails that are not explicitly destined to it.

I think trac is not sending emails out I will enable debugging and test this.

Change History (32)

comment:1 Changed 6 years ago by verm

  • Owner set to verm
  • Status changed from new to accepted

That's true. I'll fix this later today.

comment:2 Changed 6 years ago by sa2ajj

Any updates?

comment:3 Changed 6 years ago by verm

  • Resolution set to fixed
  • Status changed from accepted to closed

I set require_explicit_destination to False

If it still does not work please re-open this ticket.

comment:4 Changed 6 years ago by sa2ajj

Thank you.

What about just allowing mails from a particular e-mail address?

comment:5 Changed 6 years ago by verm

Allowing that and this setting have nothing to do with each other. What are you wanting to do?

comment:6 Changed 6 years ago by dustin

I think @sa2ajj's idea is to prevent spam while allowing email from trac@… (or whatever the sender is).

comment:7 Changed 6 years ago by sa2ajj

Yes, that's the idea behind my suggestion.

comment:8 Changed 6 years ago by sa2ajj

  • Resolution fixed deleted
  • Status changed from closed to reopened

I think it still does not work.

comment:9 Changed 6 years ago by sa2ajj

Any updates?

comment:10 Changed 6 years ago by verm

  • Cc sysadmins added

I'll try to look at it now.

comment:11 Changed 6 years ago by verm

testing

comment:12 Changed 6 years ago by verm

another test.

comment:13 Changed 6 years ago by verm

testing.

comment:14 Changed 6 years ago by sa2ajj

Amar, could you please add mailmans passwords to our shared secret in buildbot-infra?

comment:15 Changed 6 years ago by verm

  • Description modified (diff)
  • Priority changed from major to critical

I dropped it somewhere safe where you can access it see IRC please.

I will work on getting this going. Something very strange is going on that is unrelated to the list it's being blocked internally somewhere however logging is not catching the exact issue.

comment:16 Changed 6 years ago by verm

Testing.

comment:17 Changed 6 years ago by verm

Another test.

comment:18 Changed 6 years ago by verm

Testing 123.

comment:19 Changed 6 years ago by verm

Disabled bugs@ mailing to see if a single list will work as a testing measure.

comment:20 Changed 6 years ago by verm

OK, I've made headway, if I disable bugs@ in smtp_always_cc it sends to the mailing list. One strange thing I noticed is postfix is assigning the same mail ID to the mail it sends to mailman. I don't see why this would be a problem but I think it is causing mailman to collapse the emails. There is absolutely nothing in mailmans log. I will have to enable debugging to dig deeper.

comment:21 Changed 6 years ago by verm

Almost enough spam in this ticket to make a sandwich.

comment:22 Changed 6 years ago by verm

Actually I'm a vegetarian so let's say we almost have enough tofu for a sandwich.

comment:23 Changed 6 years ago by verm

At least only the three of us are being nagged by these updates...and some web viewers good thing I'm not shy.

comment:24 Changed 6 years ago by verm

Tofu is a good thing let's say excessive lettuce instead of spam.. too much lettuce can suck. (more tests!)

comment:25 Changed 6 years ago by dustin

For testing:

# echo "Test mail to bugs@buildbot.net and the sysadmin list."|sendmail -f trac@buildbot.net sysadmin@buildbot.net,bugs@buildbot.net

run on mx, gives maillog:

Jan 19 18:15:29 mx postfix/pickup[20590]: 8B2761FE2E9: uid=0 from=<trac@buildbot.net>
Jan 19 18:15:29 mx postfix/cleanup[22195]: 8B2761FE2E9: message-id=<20150119181529.8B2761FE2E9@mx.buildbot.net>
Jan 19 18:15:29 mx postfix/qmgr[69039]: 8B2761FE2E9: from=<trac@buildbot.net>, size=311, nrcpt=2 (queue active)
Jan 19 18:15:29 mx postfix/smtp[22197]: 8B2761FE2E9: to=<bugs@buildbot.net>, relay=192.168.80.241[192.168.80.241]:25, delay=0.03, delays=0.01/0.02/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 928A376D0A4)
Jan 19 18:15:29 mx postfix/smtp[22197]: 8B2761FE2E9: to=<sysadmin@buildbot.net>, relay=192.168.80.241[192.168.80.241]:25, delay=0.03, delays=0.01/0.02/0.01/0.01, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 928A376D0A4)
Jan 19 18:15:29 mx postfix/qmgr[69039]: 8B2761FE2E9: removed
Jan 19 18:15:32 mx postfix/smtpd[22198]: connect from unknown[192.168.80.241]
Jan 19 18:15:32 mx postfix/smtpd[22198]: 7928A1FE50E: client=unknown[192.168.80.241]
Jan 19 18:15:32 mx postfix/cleanup[22195]: 7928A1FE50E: message-id=<mailman.21.1421691330.58576.bugs@buildbot.net>
Jan 19 18:15:32 mx postfix/smtpd[22198]: disconnect from unknown[192.168.80.241]
Jan 19 18:15:32 mx postfix/qmgr[69039]: 7928A1FE50E: from=<bugs-bounces@buildbot.net>, size=1404, nrcpt=3 (queue active)
Jan 19 18:15:32 mx postfix/smtp[22197]: Untrusted TLS connection established to mx.darkbeer.org[64.71.190.22]:25: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)
Jan 19 18:15:32 mx postfix/smtp[22199]: Trusted TLS connection established to gmail-smtp-in.l.google.com[74.125.20.26]:25: TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)
Jan 19 18:15:32 mx postfix/smtp[22197]: 7928A1FE50E: to=<verm@darkbeer.org>, orig_to=<trac@buildbot.net>, relay=mx.darkbeer.org[64.71.190.22]:25, delay=0.47, delays=0/0/0.23/0.24, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 8BD2169007)
Jan 19 18:15:33 mx postfix/smtpd[22198]: connect from unknown[192.168.80.241]
Jan 19 18:15:33 mx postfix/smtpd[22198]: 839571FE524: client=unknown[192.168.80.241]
Jan 19 18:15:33 mx postfix/cleanup[22195]: 839571FE524: message-id=<mailman.23.1421691330.58576.bugs@buildbot.net>
Jan 19 18:15:33 mx postfix/smtpd[22198]: disconnect from unknown[192.168.80.241]
Jan 19 18:15:33 mx postfix/qmgr[69039]: 839571FE524: from=<mailman-bounces@buildbot.net>, size=3074, nrcpt=1 (queue active)
Jan 19 18:15:33 mx postfix/smtp[22199]: 7928A1FE50E: to=<djmitche@gmail.com>, orig_to=<trac@buildbot.net>, relay=gmail-smtp-in.l.google.com[74.125.20.26]:25, delay=1.1, delays=0/0.02/0.35/0.71, dsn=2.0.0, status=sent (250 2.0.0 OK 1421691333 up2si1444378pac.178 - gsmtp)
Jan 19 18:15:33 mx postfix/smtp[22199]: 7928A1FE50E: to=<rutsky.vladimir@gmail.com>, orig_to=<trac@buildbot.net>, relay=gmail-smtp-in.l.google.com[74.125.20.26]:25, delay=1.1, delays=0/0.02/0.35/0.71, dsn=2.0.0, status=sent (250 2.0.0 OK 1421691333 up2si1444378pac.178 - gsmtp)
Jan 19 18:15:33 mx postfix/qmgr[69039]: 7928A1FE50E: removed
Jan 19 18:15:33 mx postfix/smtp[22197]: Untrusted TLS connection established to mx.darkbeer.org[64.71.190.22]:25: TLSv1 with cipher ADH-AES256-SHA (256/256 bits)
Jan 19 18:15:33 mx postfix/smtp[22197]: 839571FE524: to=<verm@darkbeer.org>, orig_to=<mailadmin@buildbot.net>, relay=mx.darkbeer.org[64.71.190.22]:25, delay=0.18, delays=0/0/0.14/0.04, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 50B7E692A9)
Jan 19 18:15:33 mx postfix/qmgr[69039]: 839571FE524: removed

comment:26 Changed 6 years ago by dustin

So, 8B2761FE2E9 is sending the message *to* mailman. 7928A1FE50E is the response from bugs@… (given the from= address). 839571FE524 is a mailman bounce, going to verm@darkbeer. Any idea what that says?

comment:27 Changed 6 years ago by dustin

Interesting, I also got a bounce from mailman because "Message has implicit destination"

comment:28 Changed 6 years ago by dustin

Corresponding logs from lists.bb.net:/var/log/maillog:

Jan 19 18:15:29 lists postfix/smtpd[59157]: connect from unknown[192.168.80.235]
Jan 19 18:15:29 lists postfix/smtpd[59157]: 928A376D0A4: client=unknown[192.168.80.235]
Jan 19 18:15:29 lists postfix/cleanup[59160]: 928A376D0A4: message-id=<20150119181529.8B2761FE2E9@mx.buildbot.net>
Jan 19 18:15:29 lists postfix/smtpd[59157]: disconnect from unknown[192.168.80.235]
Jan 19 18:15:29 lists postfix/qmgr[58569]: 928A376D0A4: from=<trac@buildbot.net>, size=471, nrcpt=2 (queue active)
Jan 19 18:15:29 lists postfix/pipe[59161]: 928A376D0A4: to=<bugs@buildbot.net>, relay=mailman, delay=0.08, delays=0/0/0/0.07, dsn=2.0.0, status=sent (delivered via mailman service)
Jan 19 18:15:29 lists postfix/pipe[59161]: 928A376D0A4: to=<sysadmin@buildbot.net>, relay=mailman, delay=0.08, delays=0/0/0/0.07, dsn=2.0.0, status=sent (delivered via mailman service)
Jan 19 18:15:29 lists postfix/qmgr[58569]: 928A376D0A4: removed
Jan 19 18:15:32 lists postfix/smtpd[59157]: connect from unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/smtpd[59157]: 7746476D0A6: client=unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/cleanup[59160]: 7746476D0A6: message-id=<mailman.21.1421691330.58576.bugs@buildbot.net>
Jan 19 18:15:32 lists postfix/smtpd[59157]: disconnect from unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/qmgr[58569]: 7746476D0A6: from=<bugs-bounces@buildbot.net>, size=1220, nrcpt=1 (queue active)
Jan 19 18:15:32 lists postfix/smtpd[59157]: connect from unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/smtpd[59157]: 7861A76D0A7: client=unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/cleanup[59160]: 7861A76D0A7: message-id=<mailman.23.1421691330.58576.bugs@buildbot.net>
Jan 19 18:15:32 lists postfix/qmgr[58569]: 7861A76D0A7: from=<bugs-bounces@buildbot.net>, size=2687, nrcpt=1 (queue active)
Jan 19 18:15:32 lists postfix/smtpd[59157]: disconnect from unknown[192.168.80.241]
Jan 19 18:15:32 lists postfix/smtp[59163]: 7746476D0A6: to=<trac@buildbot.net>, relay=192.168.80.235[192.168.80.235]:25, delay=0.01, delays=0/0/0.01/0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 7928A1FE50E)
Jan 19 18:15:32 lists postfix/qmgr[58569]: 7746476D0A6: removed
Jan 19 18:15:32 lists postfix/pipe[59161]: 7861A76D0A7: to=<bugs-owner@buildbot.net>, relay=mailman, delay=0.08, delays=0/0/0/0.07, dsn=2.0.0, status=sent (delivered via mailman service)
Jan 19 18:15:32 lists postfix/qmgr[58569]: 7861A76D0A7: removed
Jan 19 18:15:33 lists postfix/smtpd[59157]: connect from unknown[192.168.80.241]
Jan 19 18:15:33 lists postfix/smtpd[59157]: 837A876D0A8: client=unknown[192.168.80.241]
Jan 19 18:15:33 lists postfix/cleanup[59160]: 837A876D0A8: message-id=<mailman.23.1421691330.58576.bugs@buildbot.net>
Jan 19 18:15:33 lists postfix/smtpd[59157]: disconnect from unknown[192.168.80.241]
Jan 19 18:15:33 lists postfix/qmgr[58569]: 837A876D0A8: from=<mailman-bounces@buildbot.net>, size=2885, nrcpt=1 (queue active)
Jan 19 18:15:33 lists postfix/smtp[59163]: 837A876D0A8: to=<mailadmin@buildbot.net>, relay=192.168.80.235[192.168.80.235]:25, delay=0, delays=0/0/0/0, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 839571FE524)
Jan 19 18:15:33 lists postfix/qmgr[58569]: 837A876D0A8: removed

comment:29 Changed 6 years ago by dustin

Relevant mailman logs are pretty minimal:

/usr/local/mailman/logs/smtp:Jan 19 18:15:32 2015 (58578) <mailman.21.1421691330.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds
/usr/local/mailman/logs/smtp:Jan 19 18:15:32 2015 (58578) <mailman.23.1421691330.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds
/usr/local/mailman/logs/smtp:Jan 19 18:15:33 2015 (58578) <mailman.23.1421691330.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds
/usr/local/mailman/logs/vette:Jan 19 18:15:30 2015 (58576) bugs post from trac@buildbot.net held, message-id=<20150119181529.8B2761FE2E9@mx.buildbot.net>: Message has implicit destination

comment:30 Changed 6 years ago by dustin

Postfix invokes mailman with

mailman   unix  -       n      n       -       -       pipe
        flags=FR user=mailman argv=/usr/local/mailman/bin/postfix-to-mailman.py
        ${nexthop} ${user}

and that script has at the top of it,

# To configure a virtual domain to connect to mailman, edit Postfix thusly:
#
# /etc/postfix/main.cf:
#    relay_domains = ... lists.example.com
#    transport_maps = hash:/etc/postfix/transport
#    mailman_destination_recipient_limit = 1
#
# /etc/postfix/transport:
#   lists.example.com   mailman:
#
# /etc/postfix/master.cf
#    mailman unix  -       n       n       -       -       pipe
#      flags=FR user=mailman:mailman
#      argv=/var/mailman/postfix-to-mailman.py ${nexthop} ${user}

But I don't see mailman_destination_recipient_limit = 1 in main.cf.

I'll add it and try again.

comment:31 Changed 6 years ago by dustin

  • Resolution set to fixed
  • Status changed from reopened to closed
Jan 19 20:43:21 2015 (58576) bugs post from trac@buildbot.net held, message-id=<20150119204321.4B0321FE2EF@mx.buildbot.net>: Message has implicit destination

==> /usr/local/mailman/logs/smtp <==
Jan 19 20:43:22 2015 (58578) <20150119204321.4B0321FE2EF@mx.buildbot.net> smtp to sysadmin for 5 recips, completed in 0.006 seconds

==> /usr/local/mailman/logs/post <==
Jan 19 20:43:22 2015 (58578) post to sysadmin from trac@buildbot.net, size=1392, message-id=<20150119204321.4B0321FE2EF@mx.buildbot.net>, success

==> /usr/local/mailman/logs/smtp <==
Jan 19 20:43:22 2015 (58578) <mailman.32.1421700201.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds
Jan 19 20:43:22 2015 (58578) <mailman.34.1421700201.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds
Jan 19 20:43:24 2015 (58578) <mailman.34.1421700201.58576.bugs@buildbot.net> smtp to bugs for 1 recips, completed in 0.003 seconds

Great success! The issue with implicit destinations is an artifact of the test method (no headers in the email itself). The post to sysadmins (which allows implicit destinations) worked fine.

comment:32 Changed 6 years ago by sa2ajj

So some bugs will be coming twice :)

Note: See TracTickets for help on using tickets.