Hi,
So I've been trying to send mail via the inject
command from the core.
But having trouble with that.
Currently, my list's subscription/unsubscription policy is confirm
which basically means the subscriber who sends an email should get a confirmation email when he/she sends the mail to unsubscribe/subscribe (right?)
As my user is trying to unsubscribe from the list (notgood@abcd.com) This is what I'm executing:
mailman inject -f - -q command notgood@abcd.com From: 1111@rise.xyz To: notgood-leave@abcd.com Subject: unsubs Message-ID: <2_19_am_30dec@rise.xyz>
messsssss
Currently my inject-ed mail is in deferred queue in postfix and unable to reach the destination due to which I'am not able to confirm to leave the list.
My postfix's logs are:
postfix/smtpd[12722]: connect from localhost[::1] postfix/smtpd[12722]: 479834565D: client=localhost[::1] postfix/cleanup[12726]: 479834565D: message-id=<157763017885.12683.12681065635725544097@Ratwik> postfix/qmgr[12526]: 479834565D: from=<notgood-bounces@abcd.com>, size=808, nrcpt=1 (queue active) postfix/smtpd[12722]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 postfix/qmgr[17475]: 479834565D: from=<notgood-bounces@abcd.com>, size=808, nrcpt=1 (queue active) postfix/error[21664]: 479834565D: to=<you@yourdomain.com>, relay=none, delay=15789, delays=15758/31/0/0.11, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out)
I also ran : postcat -vq 479834565D which gave me this:
postcat: name_mask: all postcat: inet_addr_local: configured 4 IPv4 addresses postcat: inet_addr_local: configured 2 IPv6 addresses *** ENVELOPE RECORDS deferred/4/479834565D *** message_size: 808 665 1 0 808 0 message_arrival_time: Mon Dec 30 02:19:26 2019 create_time: Mon Dec 30 02:19:26 2019 named_attribute: log_ident=479834565D named_attribute: rewrite_context=local sender: notgood-bounces@abcd.com named_attribute: log_client_name=localhost named_attribute: log_client_address=IPv6:::1 named_attribute: log_client_port=44800 named_attribute: log_message_origin=localhost[::1] named_attribute: log_helo_name=[192.168.0.111] named_attribute: log_protocol_name=ESMTP named_attribute: client_name=localhost named_attribute: reverse_client_name=localhost named_attribute: client_address=::1 named_attribute: client_port=44800 named_attribute: server_address=::1 named_attribute: server_port=25 named_attribute: helo_name=[192.168.0.111] named_attribute: protocol_name=ESMTP named_attribute: client_address_type=10 named_attribute: dsn_orig_rcpt=rfc822;you@yourdomain.com original_recipient: you@yourdomain.com recipient: you@yourdomain.com *** MESSAGE CONTENTS deferred/4/479834565D *** regular_text: Received: from [192.168.0.111] (localhost [IPv6:::1]) regular_text: by Ratwik.www.tendawifi.com (Postfix) with ESMTP id 479834565D regular_text: for <you@yourdomain.com>; Mon, 30 Dec 2019 02:19:26 +0530 (IST) regular_text: Subject: The results of your email commands regular_text: From: notgood-bounces@abcd.com regular_text: To: 1111@rise.xyz regular_text: MIME-Version: 1.0 regular_text: Content-Type: text/plain; charset="us-ascii" regular_text: Content-Transfer-Encoding: 7bit regular_text: Message-ID: <157765256493.25261.11498683579672973569@Ratwik> regular_text: Date: Mon, 30 Dec 2019 02:19:24 +0530 regular_text: Precedence: bulk regular_text: X-Mailman-Version: 3.3.1 regular_text: regular_text: The results of your email command are provided below. regular_text: regular_text: - Original message details: regular_text: From: 1111@rise.xyz regular_text: Subject: unsubs regular_text: Date: Mon, 30 Dec 2019 02:19:24 +0530 regular_text: Message-ID: <2_19_am_30dec@rise.xyz> regular_text: regular_text: - Results: regular_text: No such command: unsubs regular_text: No such command: ooooonooooo regular_text: regular_text: - Done. *** HEADER EXTRACTED deferred/4/479834565D *** *** MESSAGE FILE END deferred/4/479834565D ***
My smtp.log
file in mailman/var/logs/
shows:
smtp to notgood@abcd.com for 1 recips, completed in 0.19297552108764648 seconds post to notgood@abcd.com from notgood-bounces@abcd.com, 598 bytes
Also I had updated mailman.cfg
file in /mailman/etc/
with this:
[mta] incoming: mailman.mta.postfix.LMTP outgoing: mailman.mta.deliver.deliver lmtp_host: 127.0.0.1 lmtp_port: 8024 smtp_host: localhost smtp_port: 25 configuration: python:mailman.config.postfix
Also, as various forums were pointing towards that port 25 might be blocked, I ran : telnet localhost 25 which gave me 220 status code (which means it's open right?)
How can I fix this so that my mail gets to the list-leave
and thus receive confirmation to do the same??
Thank You
On 12/30/19 6:48 AM, ritwik p wrote:
As my user is trying to unsubscribe from the list (notgood@abcd.com) This is what I'm executing:
mailman inject -f - -q command notgood@abcd.com From: 1111@rise.xyz To: notgood-leave@abcd.com Subject: unsubs Message-ID: <2_19_am_30dec@rise.xyz>
messsssss
You need one additional thing. The command runner doesn't look at the To: address to determine this is a -leave request. The lmtp runner did that and put subaddress=leave in the message metadata, so your message was treated as a -request message. The inject command you want is
mailman inject -f - -q command -m subaddress=leave notgood@abcd.com
It also would have worked if you had put 'unsubscribe' rather than 'unsubs' in the Subject: as 'unsubscribe' is a valid command and 'unsubs' is not.
Currently my inject-ed mail is in deferred queue in postfix and unable to reach the destination due to which I'am not able to confirm to leave the list.
This is not a Mailman issue. Postfix cannot connect to port 25 at nullmx.domainmanager.com[45.63.18.247] to deliver the mail.
My postfix's logs are:
postfix/smtpd[12722]: connect from localhost[::1] postfix/smtpd[12722]: 479834565D: client=localhost[::1] postfix/cleanup[12726]: 479834565D: message-id=<157763017885.12683.12681065635725544097@Ratwik> postfix/qmgr[12526]: 479834565D: from=<notgood-bounces@abcd.com>, size=808, nrcpt=1 (queue active) postfix/smtpd[12722]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 postfix/qmgr[17475]: 479834565D: from=<notgood-bounces@abcd.com>, size=808, nrcpt=1 (queue active) postfix/error[21664]: 479834565D: to=<you@yourdomain.com>, relay=none, delay=15789, delays=15758/31/0/0.11, dsn=4.4.1, status=deferred (delivery temporarily suspended: connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out)
I also ran : postcat -vq 479834565D which gave me this: ... regular_text: - Results: regular_text: No such command: unsubs regular_text: No such command: ooooonooooo regular_text: regular_text: - Done.
It would have shown a confirmation request if you had either added -m subaddress=leave to the inject command or put 'unsubscribe' in the Subject:
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Hey Mark, Thanks for replying.
Mark Sapiro wrote:
It also would have worked if you had put 'unsubscribe' rather than 'unsubs' in the Subject: as 'unsubscribe' is a valid command and 'unsubs' is not.
This Worked :) Here's what I executed:
mailman inject -f - -q command notgood@abcd.com From: 1111@rise.xyz To: notgood-leave@abcd.com Subject: unsubscribe Message-ID: <1_37_pm_31dec@rise.xyz>
unsubscribe
Which has now generated 2 SMTP requests My new SMTP logs are:
smtp to notgood@abcd.com for 1 recips, completed in 0.30856752395629883 seconds post to notgood@abcd.com from notgood-confirm+2dc8268db9cdf0dd2861f2733bf466640c6f4eda@abcd.com, 979 bytes smtp to notgood@abcd.com for 1 recips, completed in 0.05134224891662598 seconds post to notgood@abcd.com from notgood-bounces@abcd.com, 616 bytes
And my Postfix logs are:
connect from localhost[::1] postfix/smtpd[7873]: A823945640: client=localhost[::1] postfix/cleanup[7878]: A823945640: message-id=<157777969122.7709.13375533265519975517@Ratwik> postfix/qmgr[3336]: A823945640: from=<notgood-bounces@abcd.com>, size=1194, nrcpt=1 (queue active) postfix/smtpd[7873]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 postfix/smtpd[7873]: connect from localhost[::1] postfix/smtpd[7873]: BC9A945650: client=localhost[::1] postfix/cleanup[7878]: BC9A945650: message-id=<157777969130.7709.11350895285421379080@Ratwik> postfix/qmgr[3336]: BC9A945650: from=<notgood-bounces@abcd.com>, size=825, nrcpt=1 (queue active) postfix/smtpd[7873]: disconnect from localhost[::1] ehlo=1 mail=1 rcpt=1 data=1 quit=1 commands=5 postfix/smtp[7880]: connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out postfix/smtp[7879]: connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out postfix/smtp[7879]: A823945640: to=<you@yourdomain.com>, relay=none, delay=31, delays=0.06/0.01/31/0, dsn=4.4.1, status=deferred (connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out) postfix/smtp[7880]: BC9A945650: to=<you@yourdomain.com>, relay=none, delay=31, delays=0.05/0.01/31/0, dsn=4.4.1, status=deferred (connect to nullmx.domainmanager.com[45.63.18.247]:25: Connection timed out)
As there are 2 queue IDs in my postfix logs, I ran: postcat -vq QUEUE_ID , for each of the queue ID. One of them had my result: Confirmation email sent to 111.rise.xyz to leave notgood@abcd.com and the other had the whole confirmation email which is stuck in postfix's deferred queue :(
This is not a Mailman issue. Postfix cannot connect to port 25 at nullmx.domainmanager.com[45.63.18.247] to deliver the mail.
I tried allowing/opening port 25 on my firewall and nothing happened. I think my ISP is blocking port 25, Is there a workaround to this??
Thanks Mark :)
On 12/31/19 1:33 AM, ritwik p wrote:
As there are 2 queue IDs in my postfix logs, I ran: postcat -vq QUEUE_ID , for each of the queue ID. One of them had my result: Confirmation email sent to 111.rise.xyz to leave notgood@abcd.com and the other had the whole confirmation email which is stuck in postfix's deferred queue :(
The fact that they are stuck in Postfix is irrelevant to what you are trying to do. You can read the confirmation request with Postcat, so you know what it says. You don't need to receive it yu email.
You can confirm by injecting a message to the command queue with
Subject: comfirm (the token from the email>
This is not a Mailman issue. Postfix cannot connect to port 25 at nullmx.domainmanager.com[45.63.18.247] to deliver the mail.
I tried allowing/opening port 25 on my firewall and nothing happened. I think my ISP is blocking port 25, Is there a workaround to this??
It is not unusual for ISPs to block outbound port 25. You may be able to use the submission port (587) with TLS authentication if the MX accepts that.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mark Sapiro wrote:
You can confirm by injecting a message to the command queue with Subject: comfirm (the token from the email>
Thanks Mark. This worked and I am now able to leave the list.
I have also been able to recreate the issue --> https://gitlab.com/mailman/mailman/issues/553 and will work on the same now. Any tips?
A doubt though:
I set-ed my list's unsubscription_policy
to confirm_then_moderate
and it showed : <SubscriptionPolicy.confirm_then_moderate: 3>. What does "3" mean (same thing for <SubscriptionPolicy.confirm: 1>) ? is it option number?
Also, I think the docs need to be updated, as when i set-ed my list's unsubscription_policy
to confirm_then_moderate
in the mailman shell and exited the shell, it reverted back to confirm
and it took me quite some time to figure out the command commit()
to keep the mentioned change.
Thanks Mark :)
On 1/1/20 8:09 AM, ritwik p wrote:
A doubt though: I set-ed my list's
unsubscription_policy
toconfirm_then_moderate
and it showed : <SubscriptionPolicy.confirm_then_moderate: 3>. What does "3" mean (same thing for <SubscriptionPolicy.confirm: 1>) ? is it option number?
SubscriptionPolicy is an enum. enums have names and numeric values. Look at the definition.
Also, I think the docs need to be updated, as when i set-ed my list's
unsubscription_policy
toconfirm_then_moderate
in the mailman shell and exited the shell, it reverted back toconfirm
and it took me quite some time to figure out the commandcommit()
to keep the mentioned change.
In mailman shell everything you change is part of a transaction. At any point you can commit() to commit the transaction or abort() to abort it. exit() will exit without committing, but control-D will do an implicit commit upon exit.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
On Wed, Jan 1, 2020, at 8:38 AM, Mark Sapiro wrote:
On 1/1/20 8:09 AM, ritwik p wrote:
A doubt though: I set-ed my list's
unsubscription_policy
toconfirm_then_moderate
and it showed : <SubscriptionPolicy.confirm_then_moderate: 3>. What does "3" mean (same thing for <SubscriptionPolicy.confirm: 1>) ? is it option number?SubscriptionPolicy is an enum. enums have names and numeric values. Look at the definition.
Also, I think the docs need to be updated, as when i set-ed my list's
unsubscription_policy
toconfirm_then_moderate
in the mailman shell and exited the shell, it reverted back toconfirm
and it took me quite some time to figure out the commandcommit()
to keep the mentioned change.In mailman shell everything you change is part of a transaction. At any point you can commit() to commit the transaction or abort() to abort it. exit() will exit without committing, but control-D will do an implicit commit upon exit.
I think it would be good to print this information in the banner when Mailman shell starts up. I have created https://gitlab.com/mailman/mailman/issues/658 for this.
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
Mailman-Developers mailing list -- mailman-developers@python.org To unsubscribe send an email to mailman-developers-leave@python.org https://mail.python.org/mailman3/lists/mailman-developers.python.org/ Mailman FAQ: https://wiki.list.org/x/AgA3
Security Policy: https://wiki.list.org/x/QIA9
-- thanks, Abhilash Raj (maxking)
Hey Abhilash, thanks for replying.
It certainly would be beneficial for anyone using the shell.
Thanks
On 12/31/19 3:50 AM, ritwik p wrote:
Mark Sapiro wrote:
It also would have worked if you had put 'unsubscribe' rather than 'unsubs' in the Subject: as 'unsubscribe' is a valid command and 'unsubs' is not.
Why Does postfix reads the "Subject" as a command??
That part has nothing to to with Postfix. That was Mailman's command processor which accepts a Mailman email command in the message's Subject:
-- Mark Sapiro <mark@msapiro.net> The highway is for gamblers, San Francisco Bay Area, California better use your sense - B. Dylan
participants (3)
-
Abhilash Raj
-
Mark Sapiro
-
ritwik p