Postfix - all attachment extraction at the server side - node.js

How can I extract all the attachments coming to the postfix email server? in order to save it to another (efficient) file server. I don't want to log in for every user and extract the attachments for the individual users but extract all the attachments (as file objects or file stream) as it comes to the postfix server and save it. While extracting, the routine should know which user an attachment belong but it should not go by user way. I specially want to avoid the login session/cycle.
As the second option - if I can get a push notification about a users attachment as it arrives. I am sure there are ways to do that - please let me know best ways to do it. And then extract attachment(s) for the user whose email with attachment(s) has just arrived. Still, I don't want log-in/out cycle to extract. It has to be done such a way that no individual password would be necessary.
Guessing lot of solutions would come in in python, thats great though. It would be also helpful if I get some NodeJS solution to do this.
Please help, and don't mix your solution with these two options - one at a time solution please - either one :)

Have a thorough google for postfix, procmail and uudeview - That combo will allow you to save attachments on a file server.
As a starting point have a look here:
https://kuther.net/howtos/howto-receive-mail-and-save-attachment-fetchmail-procmail-and-metamail
...and here...
http://www.mugginsoft.com/content/postfix-automatically-decode-zipped-attachments
HTH
Regards
Frank

Related

NetSuite Saved Search Print Criteria Information

I would like to be able to print the Criteria information that I used in the footer of the PDF of a Saved Search. I have tried looking at making an Advanced PDF to handle this, but I cannot find the field to pull in the criteria information into either the Saved Search or the Advanced PDF. Any assistance would be greatly appreciated.
Edit: I have created a Saved Search in NetSuite that displays all of the Inventory Receipts made the previous week. We have to print this Saved Search and check it against the actual paper receipts to verify counts and receipts. When the Saved Search prints to PDF it does not show the criteria information for which the Saved Search was run to prove to Internal Audit that we have run this report for the correct dates. I would like a way to print the Criteria information for this Saved Search along with a timestamp of when the Saved Search was run and the users that ran the Saved Search. Is there a way to pull in this additional information in a Saved Search or Advanced PDF somehow?
add a custom Print button
button goes to a suitlet that renders the PDF
before you render, load the search and pass the search.filters in to addCustomDataSource() api of the render module
Ok, I read your edit and comment with regard to my comment. There's three big things here.
I don't think you should pursue a dev route with this. You can schedule the report for automated email once a day and prove that it came from a saved search which is the same saved search every time. This will save you an infinite amount of hassle
Developing this as your first script is going to be hard. I'm happy to help. But when I tell you it's going to be a lot of code, I mean it. See this old post I did https://stackoverflow.com/a/61066928/11323304
If you still want to pursue a dev route with this (which is totally fine), start with emulating the user event code on a custom suitelet like I posted above in my answer. You're going to need N/serverWidget/ui N/search and N/xml. The rest is all in the UserEvent functions and global context variable.
If all this still goes well over your head. Don't sweat it. Comment back, and we'll build something step by step. But, I highly, highly, highly encourage you to check out the automated email capabilities of NetSuite before trying to develop something special.

in discord.py, How do I make a bot command that reaches multiple replies, saving the data into a variable?

I want to be able to create a command that lets me get a response from a user which will then be saved as a variable, that'll be saved into another file for safekeeping.
(an example would be making a character sheet in direct messages, where you need to input multiple messages to get the desired outcome.)
I'm stuck and need help with finding a reliable way to make replies and to be able to stock the ones sent by the user. Thank you in advance.
I am not sure, but i think what you are looking for is wait_for
There are two examples in the discord.py docs, the first example covers wait_for message. It can be found on this url: https://discordpy.readthedocs.io/en/latest/api.html?highlight=wait_for#discord.Client.wait_for

Lotusscript logic for repeating calendar options, but in separate app

I need to use the "repeat options" subform in the mail file in an application that tracks our implementations.
I have looked at the code behind this in the mail file, but it is way too complex for my needs, as I just want the whole logic on how to get the various dates/times I need to create a document for. I have seen some calls to a method, generateRepeatDatesExt(), but I did a search and couldn't find any trace of it.
Anyone knows where that thing is hidden? Or better, anyone has a sample app that creates repeating dates that use the repeat options found in the mail file?
Any help, pointers, samples are welcomed!!!
Thanks a lot...
I found a really nice demo application that does exactly what I need, and it was done by Julian Robichaux a while back. Details and sample file can be found here: http://www.nsftools.com/tips/NotesTips.htm#repeatdates

Python Gmail Attachment

After reading this question I ran the script:
How can I download all emails with attachments from Gmail?.
For some reason, not all my labels or messages with attachments are downloading. I think it's either there is a problem with identifying the labels or that I have seven gmail accounts that I sent out. For example my main one is example1#gmail.com but I can send mail as example_2#gmail.com from example1#gmail.com
I did find gmailbackup (another python module) and have it running currently. The problem is that it doesn't download attachments that I've been able to find in the documentation and in the program. I am trying to jerry rig these two source codes together, but I am having problems in reading and understanding the script of gmailbackup.
So the problem was with the m.select() function. The m.list() function does not make a list for you to query for each label.
So I added these lines:
m.list()
inboxes = list(m.list())
for item in inboxes[1]:
mailbox = item.split('"')[3]
m.select(mailbox) # here you a can choose a mail box like INBOX instead
There are probably better and more efficient ways of doing this, however I was in a hurry. Using re and matches module would probably be great to build in.
Edit:
There is a second way of applying a filter that adds the label attached to anything attached and downloading from that label.
Edit 2
Gmail has a limit to downloads per day, so if you are dealing with large emails you might want to track what you have already downloaded.

Any way to get SharePoint to STOP converting attachment file names to all lower case on inbound emails?

I have a document library that is successfully receiving and saving attachments from inbound emails. The problem is that it is taking my nice, mixed-case file names and converting them to all lower case. I have looked on the Internet for a solution and only found a bunch of "me too" people with the same issue. Is there any way to control this behavior? Since the file name becomes the link text it would be nice if SharePoint left it alone.
It's a known bug according to:
http://social.technet.microsoft.com/Forums/en-US/sharepointgeneral/thread/0daedbf4-ddd1-4dd9-b7f0-70c03dc4afc4/
(links to the update packages are there, too)

Resources