Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
/ Chris Green wrote on Thu 8.Nov'12 at 18:13:10 + / > On Thu, Nov 08, 2012 at 11:06:35AM -0600, Derek Martin wrote: > > On Thu, Nov 08, 2012 at 01:03:07PM +, Jamie Paul Griffin wrote: > > > Hi Chris, personally, i'd stick with what your current set-up. > > > > Ditto. I don't currently do this but that's only because port 25 is > > blocked by my ISP. I've run my mail this way before and would do it > > again if it were a practical option. > > > Er, we're talking (or at least I'm talking) about mail delivery *from* > your ISP to your computer at home (or wherever). Your ISP blocking port > 25 won't affect this at all, it's your receiving computer that needs to > have port 25 open. > > -- > Chris Green Yes as far as I know, the ISP blocking port 25 thing is for sending mail out, in which case you can use your mta to send through a smarthost. Receiving I set up DNS to forward mail to my IP, and port forwarding on my router at home to the machine that has an smtp daemon listening on port 25 or as Patrick said, listening on a different port like the submission port for example.
Re: Questions about pipe-message and pipe_decode=yes
On Thu, Nov 08, 2012 at 11:20:20PM +0100, Suvayu Ali wrote: > Hi Mutt users, > > I am a new Mutt user and I recently came across muttprint; I am > absolutely blown away by the quality of prints I can get from my emails. > However I could not find a way to interactively choose from mutt the > printer I want to print to (or print to file for that matter). So I > setup muttprint to use the most used case by default, and pipe the > message to muttprint for other cases. > > macro index,pager \cp "muttprint --printer " > > Now I have a few scripts that I use to parse message headers for > filtering and other stuff. So I set pipe_decode=no. This however means > the above printing macro produces horendous prints with all the "weed" > included from the email. > 2. Is it possible to remove the "weed" when I use with >pipe_decode=no in some other way? have your macro set pipe_decode=yes, pipe the message to muttprint, and then set it back to no. -Jeremy pgpwmsXajKVC4.pgp Description: PGP signature
Questions about pipe-message and pipe_decode=yes
Hi Mutt users, I am a new Mutt user and I recently came across muttprint; I am absolutely blown away by the quality of prints I can get from my emails. However I could not find a way to interactively choose from mutt the printer I want to print to (or print to file for that matter). So I setup muttprint to use the most used case by default, and pipe the message to muttprint for other cases. macro index,pager \cp "muttprint --printer " Now I have a few scripts that I use to parse message headers for filtering and other stuff. So I set pipe_decode=no. This however means the above printing macro produces horendous prints with all the "weed" included from the email. So I was wondering if either of these are possible: 1. Accept arguments to print_command interactively. Do I just ask for user input from my muttprint script wrapper and mutt will wait for me to enter my choice? 2. Is it possible to remove the "weed" when I use with pipe_decode=no in some other way? 3. Is it possible to have pipe_decode=yes and yet leave certain headers intact so my filtering scripts and muttprint work without a hitch? Thanks for any suggestions, -- Suvayu Open source is the future. It sets us free.
Re: pipe headers to a file on send from compose window -> solution
On Thu, Nov 08, 2012 at 09:47:26PM +0100, Eric Smith wrote: > Jeremy > > This is how I did it: > > set sendmail = "/home/eric/bin/get_subject_and_send.sh" > > $ cat /home/eric/bin/get_subject_and_send.sh > > #!/bin/bash cat /dev/stdin| tee >(SUBJECT=`formail -z -x Subject`;echo > "^Subject:.*$SUBJECT">>/home/eric/serialised_subjects;echo perl -ni -e > \"print if not /$SUBJECT/ \" /home/eric/serialised_subjects|at now > +50 days | /usr/lib/sendmail -t -oem -oi -f eric.sm...@trustfood.org Might I recommend using $@ instead of hardcoding the values to sendmail there? Will make the script more of a generic "log the subject and pass to sendmail". I mean, if the script works, it works, but I don't like hardcoding things like that, and mutt will pass its own arguments to the sendmail program. > It passes my tests. Now I just need conditional define and undefine of the > sendmail var. There are plenty of hooks for this, depending on how you want to do it. Holler if you need help! -Jeremy pgpduv07kCSxs.pgp Description: PGP signature
Re: pipe headers to a file on send from compose window -> solution
Jeremy This is how I did it: set sendmail = "/home/eric/bin/get_subject_and_send.sh" $ cat /home/eric/bin/get_subject_and_send.sh #!/bin/bash cat /dev/stdin| tee >(SUBJECT=`formail -z -x Subject`;echo "^Subject:.*$SUBJECT">>/home/eric/serialised_subjects;echo perl -ni -e \"print if not /$SUBJECT/ \" /home/eric/serialised_subjects|at now +50 days | /usr/lib/sendmail -t -oem -oi -f eric.sm...@trustfood.org It passes my tests. Now I just need conditional define and undefine of the sendmail var. This is nice to use to white list mail in spam filtering. You might want to set a condition to only run the script when Subject: is longer than n chars. Eric Jeremy Kitchen wrote on Thu-08-Nov 12 7:55PM > On Thu, Nov 08, 2012 at 10:15:45AM +0100, Eric Smith wrote: > > Thanks Jeremy > > > > Task is to create a serialised list of Subject lines for mails posted to > > lists. > > > > Why? So that procmail can filter any incoming list mail by using > > `egrep -f' on this serialised Subject list and these (presumed) > > replies to my posting may then be dropped in my main inbox. > > > > I only want to extract the Subject lines mails to lists, > > so I will have send-hook rules for mail to these known lists. > > I would need to define this macro only for mails to these lists > > (and then define "y" back to send-message). > > > > (The script to which the headers are piped will also schedule an > > at job to strip the Subject line from the file in n days). > > > > I do something like this with postfix alwaysbcc and procmail, > > but would prefer something more specific and efficient. Best > > place to do it is at the time of send-message when the Subject > > line is definitive. > > are you using SMTP or sendmail to inject your mail? You could configure > mutt to use a different sendmail which is your custom processor which > also injects the message into the queue (probably by calling sendmail > directly) > > If you're using SMTP, you could switch to using sendmail with the above > mentioned wrapper and configure an external smtp client like ssmtp or > such. > > I may be missing something, but I poked through the docs and I'm just > not seeing really any other way to do it. > > If you find a solution, though, please let us know, I for one am > interested in your idea :) > > -Jeremy
Re: pipe headers to a file on send from compose window
On Thu, Nov 08, 2012 at 10:15:45AM +0100, Eric Smith wrote: > Thanks Jeremy > > Task is to create a serialised list of Subject lines for mails posted to > lists. > > Why? So that procmail can filter any incoming list mail by using > `egrep -f' on this serialised Subject list and these (presumed) > replies to my posting may then be dropped in my main inbox. > > I only want to extract the Subject lines mails to lists, > so I will have send-hook rules for mail to these known lists. > I would need to define this macro only for mails to these lists > (and then define "y" back to send-message). > > (The script to which the headers are piped will also schedule an > at job to strip the Subject line from the file in n days). > > I do something like this with postfix alwaysbcc and procmail, > but would prefer something more specific and efficient. Best > place to do it is at the time of send-message when the Subject > line is definitive. are you using SMTP or sendmail to inject your mail? You could configure mutt to use a different sendmail which is your custom processor which also injects the message into the queue (probably by calling sendmail directly) If you're using SMTP, you could switch to using sendmail with the above mentioned wrapper and configure an external smtp client like ssmtp or such. I may be missing something, but I poked through the docs and I'm just not seeing really any other way to do it. If you find a solution, though, please let us know, I for one am interested in your idea :) -Jeremy pgpAdjh9a61GQ.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Thu, Nov 08, 2012 at 11:06:35AM -0600, Derek Martin wrote: > On Thu, Nov 08, 2012 at 01:03:07PM +, Jamie Paul Griffin wrote: > > Hi Chris, personally, i'd stick with what your current set-up. > > Ditto. I don't currently do this but that's only because port 25 is > blocked by my ISP. I've run my mail this way before and would do it > again if it were a practical option. > Er, we're talking (or at least I'm talking) about mail delivery *from* your ISP to your computer at home (or wherever). Your ISP blocking port 25 won't affect this at all, it's your receiving computer that needs to have port 25 open. -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
* Derek Martin [11-08-12 12:06]: > On Thu, Nov 08, 2012 at 01:03:07PM +, Jamie Paul Griffin wrote: > > Hi Chris, personally, i'd stick with what your current set-up. > > Ditto. I don't currently do this but that's only because port 25 is > blocked by my ISP. I've run my mail this way before and would do it > again if it were a practical option. Why not change postfix master.cf to use another port > 1024? Not a big thing, one line to edit and restart postfix. -- (paka)Patrick Shanahan Plainfield, Indiana, USA HOG # US1244711 http://wahoo.no-ip.orgPhoto Album: http://wahoo.no-ip.org/gallery2 http://en.opensuse.org openSUSE Community Member Registered Linux User #207535@ http://linuxcounter.net
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Thu, Nov 08, 2012 at 01:03:07PM +, Jamie Paul Griffin wrote: > Hi Chris, personally, i'd stick with what your current set-up. Ditto. I don't currently do this but that's only because port 25 is blocked by my ISP. I've run my mail this way before and would do it again if it were a practical option. -- Derek D. Martinhttp://www.pizzashack.org/ GPG Key ID: 0xDFBEAD02 -=-=-=-=- This message is posted from an invalid address. Replying to it will result in undeliverable mail due to spam prevention. Sorry for the inconvenience. pgpYNShC3vIom.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 10:48:45AM -0600, Derek Martin wrote: > On Wed, Nov 07, 2012 at 02:15:41PM +, Chris Green wrote: > > What does everyone else here do for collecting mail and filtering mail > > with mutt? > > Fetchmail and procmail. Ugly, but ubiquitous and reliable. A friend > pointed me at something "better" for mail filtering, but I can't > recall what it was... mainly because I haven't gotten around to > looking into it, on account of the fact that my current solution works > well and requires no learning curve. Learning a new mail filter > system is very low on the priority list. I'm guessing 'sieve'. Haven't tried it. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Asking whether markets are efficient is like asking whether people are smart. pgpY9juePS2uk.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
fetchmail + maildrop works for me. -- Mark H. Wood, Lead System Programmer mw...@iupui.edu Asking whether markets are efficient is like asking whether people are smart. pgpGksnsN8kgQ.pgp Description: PGP signature
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
/ Chris Green wrote on Thu 8.Nov'12 at 10:51:59 + / > On Wed, Nov 07, 2012 at 04:33:58PM -0600, David Champion wrote: > > * On 07 Nov 2012, Derek Martin wrote: > > > On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > > > > server retrying if my SMTP server isn't running (or connected). That's > > > > one of the reasons I'd quite like to move away from SMTP. It *should* > > > > be OK but I'm relying on the other end to behave properly. > > > > > > It will. It has to. If it didn't, e-mail on the internet would be > > > horribly unreliable. > > > > I hate to break it to you, but :) > > > > I've used IMAP pickup in the past and it's OK for some IMAP servers. A > > year or two ago my employer moved my mailbox to MS Exchange. Exchange > > doesn't (necessarily?) hand you the exact e-mail it received. It > > parses incoming mail, stores the parsed components, and reconstructs > > the message the best it can figure when you pick it up via IMAP or POP. > > Along the way it might modify or remove some components for no good > > reason; for example, multipart/alternative with text/plan and text/html > > invisibly becomes just a text/html message. I've also heard of its > > breaking crypto, although I haven't seen that myself for a while. > > > > So I forward my mail via SMTP away from my employer now. > > > Yes, I realise there are good and bad places that deliver mail to you! :-) > > If I move from SMTP delivery to collecting it myself (from POP3 or IMAP) > it will be from exactly the same source, my Tsohost web hosting service > which (in many people's opinions) is excellent. > > All I have to do is change the ultimate destination of all my E-Mail > from zbmc.eu (whose MX record points at my home LAN) to a POP3 mailbox > on the TsoHost servers and then collect from that POP3 mailbox. > > I'm thinking in fact that I'm going to stay with much the same system as > I already have but my Python filter script will collect E-Mail direct > from the Tsohost POP3 server instead of having it fed into its standard > input by the .forward. I already have *another* Python script that > collects mail from a Tsohost POP3 box so I know how to do that already, > all I need to do is merge a few bits of existing code. > > -- > Chris Green Hi Chris, personally, i'd stick with what your current set-up. Since I set up my own mta and security software i've never been happier with it. I much prefer the flexibility of being able to control almost all aspects of my mail delivery, reading and sending; including the DNS configuration etc... What I did do, though, is look into OS's and software that provide the security we all need, whether collecting mail from remote IMAP storage or POP3, or having it routed directly using smtp. I stick with BSD systems and use a number of different security software on my end to deal with zombies, malware filtering, spam filtering, etc. They are all generally well documented as you no doubt know, and certainly great efforts have been made to make installation and configuration of these software easy(-ish). The only downfall I think is the time involved with setting up and upgrading and monitoring these things. So, do you have the time and will to invest in doing that? As you've written some nice tools already, it sounds like you know what you're doing so stick with it i'd say. Plus, for me, I find it great fun and interesting learning about these things. I've learned loads by getting stuck in and engrossed in it all. Some people, however, have been there and done that and simply just can't be bothered with it anymore and/or would rather spend their time on something else. Jamie
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Wed, Nov 07, 2012 at 04:33:58PM -0600, David Champion wrote: > * On 07 Nov 2012, Derek Martin wrote: > > On Wed, Nov 07, 2012 at 08:48:08PM +, Chris Green wrote: > > > server retrying if my SMTP server isn't running (or connected). That's > > > one of the reasons I'd quite like to move away from SMTP. It *should* > > > be OK but I'm relying on the other end to behave properly. > > > > It will. It has to. If it didn't, e-mail on the internet would be > > horribly unreliable. > > I hate to break it to you, but :) > > I've used IMAP pickup in the past and it's OK for some IMAP servers. A > year or two ago my employer moved my mailbox to MS Exchange. Exchange > doesn't (necessarily?) hand you the exact e-mail it received. It > parses incoming mail, stores the parsed components, and reconstructs > the message the best it can figure when you pick it up via IMAP or POP. > Along the way it might modify or remove some components for no good > reason; for example, multipart/alternative with text/plan and text/html > invisibly becomes just a text/html message. I've also heard of its > breaking crypto, although I haven't seen that myself for a while. > > So I forward my mail via SMTP away from my employer now. > Yes, I realise there are good and bad places that deliver mail to you! :-) If I move from SMTP delivery to collecting it myself (from POP3 or IMAP) it will be from exactly the same source, my Tsohost web hosting service which (in many people's opinions) is excellent. All I have to do is change the ultimate destination of all my E-Mail from zbmc.eu (whose MX record points at my home LAN) to a POP3 mailbox on the TsoHost servers and then collect from that POP3 mailbox. I'm thinking in fact that I'm going to stay with much the same system as I already have but my Python filter script will collect E-Mail direct from the Tsohost POP3 server instead of having it fed into its standard input by the .forward. I already have *another* Python script that collects mail from a Tsohost POP3 box so I know how to do that already, all I need to do is merge a few bits of existing code. -- Chris Green
Re: What are the current fetchmail/getmail and/or procmail/maildrop utilities?
On Thu, Nov 08, 2012 at 03:17:35AM +0200, Nikola Petrov wrote: > On Wed, Nov 07, 2012 at 05:35:45PM +, Chris Green wrote: > > > I am using imapfilter with lua configuration file for my imap account. > > > That does the job for me and I like the fact that I declare my filters > > > with actual code(be it lua, python or what not) > > > > > How does that actually work? I've found its home at > > https://github.com/lefcha/imapfilter > > but the documentation doesn't really tell me what it does (maybe my fault!). > > > > Does it move E-Mails around on the IMAP server, or does it collect them > > from the IMAP server and deliver them to you locally? Or does it do > > something else? > > No it doesn't deliver them to you. It sort of filters them online on the > server. You can then use something like offlineimap to deliver them > locally to you. I use imapfilter + offlineimap + notmuch + mutt and I am > far from happy with my setup at the moment. > OK, thanks for the description, I don't think it's quite where I want to be. -- Chris Green
Re: pipe headers to a file on send from compose window
Thanks Jeremy Task is to create a serialised list of Subject lines for mails posted to lists. Why? So that procmail can filter any incoming list mail by using `egrep -f' on this serialised Subject list and these (presumed) replies to my posting may then be dropped in my main inbox. I only want to extract the Subject lines mails to lists, so I will have send-hook rules for mail to these known lists. I would need to define this macro only for mails to these lists (and then define "y" back to send-message). (The script to which the headers are piped will also schedule an at job to strip the Subject line from the file in n days). I do something like this with postfix alwaysbcc and procmail, but would prefer something more specific and efficient. Best place to do it is at the time of send-message when the Subject line is definitive. -- Eric Smith Jeremy Kitchen wrote on Thu-08-Nov 12 2:53AM > On Thu, Nov 08, 2012 at 12:37:27AM +0100, Eric Smith wrote: > > When piping a message from the compose menu, I receive only the > > body of the mail and not its headers. > > > > I want to capture the headers before sending the mail and am > > using this macro. > > > > macro compose ,y > > "/home/eric/bin/get_subject" > > > > The headers are not being passed to the script get_subject. > > What would be the solution? > > I really want to say that this is because you're only piping the > attachment you currently have highlighted. Now, I'm not sure how to do > what you're asking for, but I think that's what's going on underneath. > > One question though, what are you attempting to do with this? Perhaps we > can help you find a better way to do it. > > It seems to me you're trying to capture outgoing subject lines with > a script? (just judging by the name of your script) > > -Jeremy