GMail and Yahoo not accepting DSN option from RCPT extended commands

i’m sending mail from my mail server using python sendmail along with NOTIFY,RET,ENVID options. When i send a mail in above said procedure to an outlook mail id i’m receiving dsn. But when i send a mail to either gmail or yahoo im not receiving dsn.

SMTP log when sent to outlook

send: 'ehlo ip-172-31-89-244.ec2.internal\r\n' reply: '250-VE1EUR03FT018.mail.protection.outlook.com Hello [34.203.167.82]\r\n' reply: '250-SIZE 49283072\r\n' reply: '250-PIPELINING\r\n' reply: '250-DSN\r\n' reply: '250-ENHANCEDSTATUSCODES\r\n' reply: '250-STARTTLS\r\n' reply: '250-8BITMIME\r\n' reply: '250-BINARYMIME\r\n' reply: '250-CHUNKING\r\n' reply: '250 SMTPUTF8\r\n' reply: retcode (250); Msg: VE1EUR03FT018.mail.protection.outlook.com Hello [34.203.167.82] SIZE 49283072 PIPELINING DSN ENHANCEDSTATUSCODES STARTTLS 8BITMIME BINARYMIME CHUNKING SMTPUTF8 send: 'mail FROM:<dsn-76@example.com> size=1392 RET=HDRS ENVID=76\r\n' reply: '250 2.1.0 Sender OK\r\n' reply: retcode (250); Msg: 2.1.0 Sender OK send: u'rcpt TO:<abc@outlook.com> NOTIFY=SUCCESS,FAILURE,DELAY\r\n' reply: '250 2.1.5 Recipient OK\r\n' reply: retcode (250); Msg: 2.1.5 Recipient OK send: 'data\r\n' reply: '354 Start mail input; end with <CRLF>.<CRLF>\r\n' reply: retcode (354); Msg: Start mail input; end with <CRLF>.<CRLF> data: (354, 'Start mail input; end with <CRLF>.<CRLF>') send: 'Content-Type: multipart/alternative;\r\n boundary="===============4828387674099477551=="\r\nMIME-Version: 1.0\r\nDate: Thu, 17 Jan 2019 12:21:49 +0530\r\nFrom: abc@example.com\r\nMessage-Id: <CAEFoQ7qve5kck0xaMnQwi-QNiTJqVSCN1qVDu_9F1kCy0kUpGA@mail.gmail.com>\r\nOriginal-Envelope-Id: 76\r\nResent-Date: Thu, 17 Jan 2019 12:21:49 +0530\r\nResent-From: srikanth vr1 <srikanthvr2@gmail.com>\r\nResent-Message-Id: <CAEFoQ7qve5kck0xaMnQwi-QNiTJqVSCN1qVDu_9F1kCy0kUpGA@mail.gmail.com>\r\nSubject: REGISTERED: test\r\nTo: abc@outlook.com\r\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; \r\n d=example.com; i=@example.com; \r\n q=dns/txt; s=dkim; t=1547707909; h=content-type : \r\n mime-version : date : from : message-id : resent-date : \r\n resent-from : resent-message-id : subject : to : date : \r\n from : subject; \r\n bh=4u6uddMjage5G2IhNFHSL+jOjAVzjaLpUnrgPqdbTdU=; \r\n b=q0n8iNOyPgkVYKuuGDcIRsobyr6ySnjIvApWqr30i6u/zLQGBu9KMEwZ\r\n deOyZlfWIo7tYoGUJYy5McqqevpwfCqVTeE1ButctqE9k6d+ggQZf6Zjqq\r\n PL2Rt4TJNmUY3hrpWvMYi353FnZ0N44tBLeRFDzJT1UV2/LIQRD/kwbmE=\r\n\r\n--===============4828387674099477551==\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset="us-ascii"\r\nContent-Transfer-Encoding: 7bit\r\n\r\ntest\r\n\r\n--===============4828387674099477551==\r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset="us-ascii"\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<div dir="ltr">test</div>\r\n\r\n--===============4828387674099477551==--\r\n.\r\n' reply: '250 2.6.0 <CAEFoQ7qve5kck0xaMnQwi-QNiTJqVSCN1qVDu_9F1kCy0kUpGA@mail.gmail.com> [InternalId=36941013765396, Hostname=VE1EUR03HT108.eop-EUR03.prod.protection.outlook.com] 8366 bytes in 0.875, 9.337 KB/sec Queued mail for delivery -> 250 2.1.5\r\n' reply: retcode (250); Msg: 2.6.0 <CAEFoQ7qve5kck0xaMnQwi-QNiTJqVSCN1qVDu_9F1kCy0kUpGA@mail.gmail.com> [InternalId=36941013765396, Hostname=VE1EUR03HT108.eop-EUR03.prod.protection.outlook.com] 8366 bytes in 0.875, 9.337 KB/sec Queued mail for delivery -> 250 2.1.5 data: (250, '2.6.0 <CAEFoQ7qve5kck0xaMnQwi-QNiTJqVSCN1qVDu_9F1kCy0kUpGA@mail.gmail.com> [InternalId=36941013765396, Hostname=VE1EUR03HT108.eop-EUR03.prod.protection.outlook.com] 8366 bytes in 0.875, 9.337 KB/sec Queued mail for delivery -> 250 2.1.5') send: 'quit\r\n' reply: '221 2.0.0 Service closing transmission channel\r\n' reply: retcode (221); Msg: 2.0.0 Service closing transmission channel 

SMTP log when sent to gmail

send: 'ehlo ip-172-31-89-244.ec2.internal\r\n' reply: '250-mx.google.com at your service, [34.203.167.82]\r\n' reply: '250-SIZE 157286400\r\n' reply: '250-8BITMIME\r\n' reply: '250-STARTTLS\r\n' reply: '250-ENHANCEDSTATUSCODES\r\n' reply: '250-PIPELINING\r\n' reply: '250-CHUNKING\r\n' reply: '250 SMTPUTF8\r\n' reply: retcode (250); Msg: mx.google.com at your service, [34.203.167.82] SIZE 157286400 8BITMIME STARTTLS ENHANCEDSTATUSCODES PIPELINING CHUNKING SMTPUTF8 send: 'mail FROM:<dsn-77@example.com> size=1394 RET=HDRS ENVID=77\r\n' reply: '250 2.1.0 OK p19-v6si3114094ejj.94 - gsmtp\r\n' reply: retcode (250); Msg: 2.1.0 OK p19-v6si3114094ejj.94 - gsmtp send: u'rcpt TO:<abc@gmail.com> NOTIFY=SUCCESS,FAILURE,DELAY\r\n' reply: '250 2.1.5 OK p19-v6si3114094ejj.94 - gsmtp\r\n' reply: retcode (250); Msg: 2.1.5 OK p19-v6si3114094ejj.94 - gsmtp send: 'data\r\n' reply: '354  Go ahead p19-v6si3114094ejj.94 - gsmtp\r\n' reply: retcode (354); Msg: Go ahead p19-v6si3114094ejj.94 - gsmtp data: (354, 'Go ahead p19-v6si3114094ejj.94 - gsmtp') send: 'Content-Type: multipart/alternative;\r\n boundary="===============2153953495280056619=="\r\nMIME-Version: 1.0\r\nDate: Thu, 17 Jan 2019 12:28:54 +0530\r\nFrom: abc@example.com\r\nMessage-Id: <CAEFoQ7p5QHdEEjDHLaMh-GnSjcwqFKG7ASdFqaVoUZz6-3DVcw@mail.gmail.com>\r\nOriginal-Envelope-Id: 77\r\nResent-Date: Thu, 17 Jan 2019 12:28:54 +0530\r\nResent-From: srikanth vr1 <abc@gmail.com>\r\nResent-Message-Id: <CAEFoQ7p5QHdEEjDHLaMh-GnSjcwqFKG7ASdFqaVoUZz6-3DVcw@mail.gmail.com>\r\nSubject: REGISTERED: test\r\nTo: abc@gmail.com\r\nDKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; \r\n d=example.com; i=@example.com; \r\n q=dns/txt; s=dkim; t=1547708334; h=content-type : \r\n mime-version : date : from : message-id : resent-date : \r\n resent-from : resent-message-id : subject : to : date : \r\n from : subject; \r\n bh=4r/lVPfZ7dZjsNwHEGhBbR/HBl5Nd6TIhMAgBJYGzsI=; \r\n b=hNRVKYa7d2DK7MD6nEPKEZrG3oR7ZTZkCLly9FfQWC+kHJzA91q72nXG\r\n eVxupk1VBcATvceewzW06VUXhKBMdciKPfqzJoATm90oQEYxiDLEp8dWeM\r\n TjWKPM7//yNimuoyMzFdnFumk6tIlf+MOiDZ8CZi28p3ulUcDOV2qm0EM=\r\n\r\n--===============2153953495280056619==\r\nMIME-Version: 1.0\r\nContent-Type: text/plain; charset="us-ascii"\r\nContent-Transfer-Encoding: 7bit\r\n\r\ntest\r\n\r\n--===============2153953495280056619==\r\nMIME-Version: 1.0\r\nContent-Type: text/html; charset="us-ascii"\r\nContent-Transfer-Encoding: 7bit\r\n\r\n<div dir="ltr">test</div>\r\n\r\n--===============2153953495280056619==--\r\n.\r\n' reply: '250 2.0.0 OK 1547708335 p19-v6si3114094ejj.94 - gsmtp\r\n' reply: retcode (250); Msg: 2.0.0 OK 1547708335 p19-v6si3114094ejj.94 - gsmtp data: (250, '2.0.0 OK 1547708335 p19-v6si3114094ejj.94 - gsmtp') send: 'quit\r\n' reply: '221 2.0.0 closing connection p19-v6si3114094ejj.94 - gsmtp\r\n' reply: retcode (221); Msg: 2.0.0 closing connection p19-v6si3114094ejj.94 - gsmtp 

You can see in gmail log DSN in not coming in list of options being used. same thing happening with yahoo too.

Thanks in advance

Logstash isn’t accepting the self signed certificates and throws a sslv3 alert handshake failure

I have set up an elsatic stack in my laptop and I have configured full stack (filebeat, logstash, elasticsearch and kibana) in it. But now I need to connect filebeat and logstash in a secure manner using SSL. But after using the self signed certificates taht I have created on my own it throws the following error when I try to verify the certificate with following curl request

curl -v –cacert ca.crt https://localhost:5044

The error –>

  • error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure
  • stopped the pause stream!
  • Closing connection 0 curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure

It gives the above sslv3 handshake failure.

I have followed the following guideline to create the self signed certificate that can be configured with logstash https://benjaminknofe.com/blog/2018/07/08/logstash-authentication-with-ssl-certificates/ I have followed those steps that suitable to my implementation.

Here is the full handshake output that i have received from the curl request

* Rebuilt URL to: https://localhost:5044/ *   Trying 127.0.0.1... * TCP_NODELAY set * Connected to localhost (127.0.0.1) port 5044 (#0) * ALPN, offering h2 * ALPN, offering http/1.1 * successfully set certificate verify locations: *   CAfile: ca.crt   CApath: /etc/ssl/certs * TLSv1.2 (OUT), TLS handshake, Client hello (1): * TLSv1.2 (IN), TLS handshake, Server hello (2): * TLSv1.2 (IN), TLS handshake, Certificate (11): * TLSv1.2 (IN), TLS handshake, Server key exchange (12): * TLSv1.2 (IN), TLS handshake, Request CERT (13): * TLSv1.2 (IN), TLS handshake, Server finished (14): * TLSv1.2 (OUT), TLS handshake, Certificate (11): * TLSv1.2 (OUT), TLS handshake, Client key exchange (16): * TLSv1.2 (OUT), TLS change cipher, Client hello (1): * TLSv1.2 (OUT), TLS handshake, Finished (20): * TLSv1.2 (IN), TLS alert, Server hello (2): * error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake        failure * stopped the pause stream! * Closing connection 0 curl: (35) error:14094410:SSL routines:ssl3_read_bytes:sslv3 alert handshake failure 

Here is my logstash.config file tha used in openssl key creation. I have given common name as localhost because that’s how I mapped in /etc/hosts 127.0.0.1 localhost

[req] distinguished_name = req_distinguished_name req_extensions = v3_req prompt = no  [req_distinguished_name] countryName                     = XX stateOrProvinceName             = XXXXXX localityName                    = XXXXXX postalCode                      = XXXXXX organizationName                = XXXXXX organizationalUnitName          = XXXXXX commonName                      = localhost emailAddress                    = XXXXXX  [v3_req] keyUsage = keyEncipherment, dataEncipherment extendedKeyUsage = serverAuth subjectAltName = @alt_names  [alt_names] DNS.1 = localhost 

logstash input plugin

input { beats { port => 5044 ssl => true ssl_certificate_authorities => ["/home/ssl/ca.crt"] ssl_certificate => "/home/ssl/logstash.crt" ssl_key => "/home/ssl/logstash.key" #ssl_verify_mode => "force_peer" client_inactivity_timeout => 1000 } }

I expected to have configured ssl certificates that are accepted by logstash. But they are not accepted when I try to verify them with the curl reuqests

Formal definition of an empty stack accepting PDA

PDA’s are usually defined using the 7-tuple convention.

$ M=(Q, \Sigma, \Gamma, \delta, q_{0}, Z, F)$

F is the set of accepting states.

I want to design a PDA accepting by empty stack, so using this notation makes no sense, as I don’t need F and I want to make the acceptance condition clear.

How is this usually done? Can I just dismiss F?

$ M’=(Q, \Sigma, \Gamma, \delta, q_{0}, Z)$

Override site’s registration restriction on accepting invite

We have a custom module that uses the invite module to send invitation to non users. Our site is set to allow registration only by administrator to avoid spam. When the invitees accept the invite they cannot register as its not allowed by the site. Is there a way to override registration restriction when invitees try to register?

We are looking into duplicating registration form on another route then routing the invitees to register there instead of default route.

Any other suggestions to handle this situation?

Nondeterministic automaton accepting only words whose first letter is identical to their next to last letter

I was asked this question and could not come to the correct answer:

Let $ L$ be the language of all words over $ \{a,b\}$ where the first letter is identical to the letter that is next to last. (Pay attention – every word with length 2 is in the language.)

Sketch a nondeterministic automaton that accepts this language.

Any help would be appreciated.