How am I notified about a new GPG message? - gnupg

I'm reading a little about GPG and keypair (public/private keys).
I'm trying to understand the basic mechanism but I do have a question. If someone sends me a file (using my public key), where will I receive it? I mean, how am I notified that someone sent a file to me?

GPG doesn't handle message delivery, only encryption. A lot of the features assume the file will be sent by email, and some email programs have built-in gpg support, but you can use any file delivery system you like.

Related

How to parse Rop commands in EcDoRpcExt2 functions?

I have been researching the Exchange protocol to see how email is sent and received through the Exchange protocol. But the Rop commands used during Rpc calls can be a pain to parse. This makes it impossible for me to get the complete information of the mailbox through the hook.
The function called by Rpc is EcDoRpcExt2
Here's what Microsoft said about it:
https://learn.microsoft.com/en-us/openspecs/exchange_server_protocols/ms-oxcrpc/1842194b-c530-4b64-a778-0e663029785c
The Rop command is in parameter rgbIn
I wonder how it is parsed internally/by the server. I can barely get what I want from the document. It's too complicated

websphere MQ Message get error?

Recently I attended an interview, he asked this question
I am putting messages in Q. Manager, but client unable to get that messages, what is the problem can you explain it?
(All permission are ok, and put and get are enable state).
There are a 101 possible reasons. That is why MQ provides an MQRC back to the application, and further information in the AMQERR01.LOG. Without either of those you cannot even begin to guess. (P.S. I suspect that would have been a suitable reply in an interview!!)
But, since you ask for us to guess, here's a few more different from those Valerie suggested.
Perhaps the client channel max message length is shorter than the messages on the queue.
The codepage between client and queue manager may be such that data cannot be converted.
Client application get buffer isn't big enough
Hasn't specified accept truncated and the message was bigger than the buffer
AMS is in use and he's not the intended recipient (different from permissions)
This is a very broad question, would need to check error code received by client. Could be programming situation where client is getting based on a specific message or correl ID that does not exist. Could be that channel auth is blocking client. Also, it could be that the putting application did not commit the messages so they are not really available for the get.

Using `mail` to locally send messages to yourself

I have a daemon that executes some commands every two days. When it encounters any error, I want it to notify me. I know that bash can look up the /var/mail/user and tell me if there any new messages in this file. But I never used messages before. I think I have to use the mail command to do that.
However when I try to look up information about the usage of the command, I only read about sending actual emails, not local messages to users. So how would I send a message to myself, so that when I execute mail I'd get You have new mail.
If all you need is to be notified by your automated task, you could use something else than mails. Chatbots, for instance.
I personally use nimrod : https://www.nimrod-messenger.io
It's messenger only but other chat systems are planned.

Trigger a shell script on mail arrival

How can I trigger a shell script on an email arrival that extracts the mail in a text file? I want to extract the information in the mail, process it to determine the request and send an automated response to that request. The mail will basically consist of a data request and the response will have the requested data in a text file attached to it.
Look into the documentation of your MTA (mail transfer agent). Many of them allow to run scripts or hooks when mail arrives and certain other conditions are met.
If you're using Linux and want a pure client solution (i.e. independent of the mail server software), then you should look at procmail. The documentation contains lots of useful tips and hints how to set up the tool (like performance considerations) and how to properly set up the environment so your script executes correctly.
It also contains examples like a service which responds to "ping" mails.

Efficiently get unretrieved message Ids from a POP3 server

I understand most of the POP3 protocol, but one thing that bothers me is how POP3 clients efficiently get a list of unretrieved message ids from the POP3 server. Many services like Yahoo and Gmail now offer gigs of space and most people (myself included), rarely if ever delete an email message.
I'm currently implementing a simple POP3 client in C#, though the question that I'm asking should be language agnostic.
On the client side I store a list of ALL the retrieved message ids that I've ever retrieved. There is no need for this client to ever delete messages, mark messages ad having been read etc. All it needs to do is get the newest email messages since the last time that it connected to the POP3 server.
Am I right in assuming that the algorithm goes something like this:
Retrieve ALL message IDs from the POP3 server. This list grows daily and can become megabytes in size easily.
Compare this list of message IDs with the message IDs I have already retrieved (this list being stored client side) and identify what mail messages I actually have to retrieve from the server.
Retrieve the mail messages one at a time from the server using the results from step 2 above.
Is there any way to make this more efficient?
There's no really efficient way to do this, because POP was never designed for leaving messages in the mailbox permanently - it's designed for the use-case where you fetch your mail once and delete it.
A better approach to the whole problem would be to use IMAP instead, which is designed for efficient storage.

Resources